logo
Trading

Check the impact of a trade on an account

post
https://api.snaptrade.com/api/v1/trade/impact

Return the trade object and it's impact on the account for the specified order.

Execute an API Request

Query
userIdstringrequired

SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.

userSecretstringrequired

SnapTrade User Secret (generated when registering user)

Request Body
account_idstring (format: uuid)
actionstring

Trade Action

order_typestring

Order Type

pricenumber or null

Trade Price if limit or stop limit order

stopnumber or null

Stop Price. If stop loss or stop limit order, the price to trigger the stop

time_in_forcestring

Trade time in force examples:

  • FOK - Fill Or Kill
  • Day - Day
  • GTC - Good Til Canceled
unitsnumber or null

Trade Units. Cannot work with notional value.

universal_symbol_idstring (format: uuid)
notional_value or null

Dollar amount to trade. Cannot work with units. Can only work for market order types and day for time in force. Only available for Alpaca, Alpaca Paper, and Robinhood.

Authorization
Request
Installation
$
npm install snaptrade-typescript-sdk
1
Loading...

Response fields

object

Manual Trade and Impact object

tradeobject

A manual trade object

trade_impactsarray of objects
combined_remaining_balanceobject

Balance

1
{
2
"trade": {
3
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
4
"account": "2bcd7cc3-e922-4976-bce1-9855556801c3",
5
"order_type": "Limit",
6
"time_in_force": "string",
7
"symbol": {
8
"brokerage_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
9
"universal_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
10
"currency": {
11
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
12
"code": "USD",
13
"name": "US Dollar"
14
},
15
"local_id": "1048101",
16
"description": "Metaverse Global ETF",
17
"symbol": "MVGP.U.TO"
18
},
19
"action": "BUY",
20
"units": 0,
21
"price": 31.33
22
},
23
"trade_impacts": [
24
{
25
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
26
"account": "2bcd7cc3-e922-4976-bce1-9855556801c3",
27
"order_type": "Limit",
28
"time_in_force": "string",
29
"symbol": {
30
"brokerage_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
31
"universal_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
32
"currency": {
33
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
34
"code": "USD",
35
"name": "US Dollar"
36
},
37
"local_id": "1048101",
38
"description": "Metaverse Global ETF",
39
"symbol": "MVGP.U.TO"
40
},
41
"action": "BUY",
42
"units": 0,
43
"price": 31.33
44
}
45
],
46
"combined_remaining_balance": {
47
"account": {
48
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
49
"brokerage_authorization": "2bcd7cc3-e922-4976-bce1-9858296801c3",
50
"portfolio_group": "2bcd7cc3-e922-4976-bce1-9858296801c3",
51
"name": "Registered Retirement Savings Account",
52
"number": "Q6542138443",
53
"institution_name": "Alpaca",
54
"created_date": "2021-06-04T16:26:46.523Z",
55
"meta": {
56
"type": "Margin",
57
"status": "ACTIVE",
58
"institution_name": "Alpaca"
59
},
60
"cash_restrictions": [
61
{
62
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
63
"account": "2bcd7cc3-e922-4976-bce1-9858296801c3",
64
"currency": "2bcd7cc3-e922-4976-bce1-9858296801c3",
65
"type": "ALLOCATE_MAX",
66
"amount": 100
67
}
68
],
69
"sync_status": {
70
"transactions": {
71
"initial_sync_completed": true,
72
"last_successful_sync": "2022-01-24",
73
"first_transaction_date": "2022-01-24"
74
},
75
"holdings": {
76
"initial_sync_completed": true,
77
"last_successful_sync": "2024-06-28 18:42:46.561408+00:00"
78
}
79
},
80
"balance": {
81
"total": null
82
}
83
},
84
"currency": {
85
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
86
"code": "USD",
87
"name": "US Dollar"
88
},
89
"cash": 1.11
90
}
91
}