For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Support Center
OverviewAPIResources
OverviewAPIResources
  • REST API Endpoints
      • GETContact Info Dependents
      • GETContact Info Item
      • GETContact Info Items
      • GETContact Info L Dependents
      • POSTMarket Data Subscription Create
      • GETMarket Data Subscription Dependents
      • GETMarket Data Subscription Item
      • GETMarket Data Subscription Items
      • GETMarket Data Subscription L Dependents
      • GETMarket Data Subscription List
      • POSTMarket Data Subscription Update
      • GETOrganization Find
      • GETOrganization Item
      • GETOrganization Items
      • GETOrganization List
      • GETOrganization Suggest
      • GETSecond Market Data Subscription Dependents
      • GETSecond Market Data Subscription Item
      • GETSecond Market Data Subscription Items
      • GETSecond Market Data Subscription L Dependents
      • GETSecond Market Data Subscription List
      • POSTTradovate Subscription Create
      • GETTradovate Subscription Dependents
      • GETTradovate Subscription Item
      • GETTradovate Subscription Items
      • GETTradovate Subscription L Dependents
      • GETTradovate Subscription List
      • POSTTradovate Subscription Update
      • POSTAccept Trading Permission
      • POSTActivate Second Market Data Subscription Renewal
      • POSTAdd Market Data Subscription
      • POSTAdd Second Market Data Subscription
      • POSTAdd Tradovate Subscription
      • POSTCancel Everything
      • POSTCancel Second Market Data Subscription
      • POSTCancel Second Market Data Subscription Renewal
      • POSTExpire Market Data Subscription
      • POSTCancel Tradovate Subscription
      • POSTCreate Evaluation Accounts
      • POSTCreate Evaluation Users
      • POSTCreate Trading Permission
      • GETUser Find
      • POSTGet Account Trading Permissions
      • POSTGet Second Market Data Subscription Cost
      • GETUser Item
      • GETUser Items
      • GETUser List
      • POSTModify Credentials
      • POSTModify Email Address
      • POSTModify Password
      • POSTOpen Demo Account
      • POSTRequest Trading Permission
      • POSTRevoke Trading Permission
      • POSTRevoke Trading Permissions
      • POSTSign Up Organization Member
      • GETUser Suggest
      • POSTSync Request
      • POSTAdd Entitlement Subscription
      • POSTChange Plugin Permission
      • POSTUser Plugin Create
      • GETUser Plugin Dependents
      • GETUser Plugin Item
      • GETUser Plugin Items
      • GETUser Plugin L Dependents
      • GETUser Plugin List
      • POSTUser Plugin Update
      • GETUser Property Dependents
      • GETUser Property Item
      • GETUser Property Items
      • GETUser Property L Dependents
      • GETUser Session Item
      • GETUser Session Items
      • GETUser Session Stats Dependents
      • GETUser Session Stats Item
      • GETUser Session Stats Items
      • GETUser Session Stats L Dependents
      • GETUser Session Stats List
Support Center
LogoLogo
REST API EndpointsUsers

Sync Request

POST
https://demo.tradovateapi.com/v1/user/syncrequest
POST
/v1/user/syncrequest
1const url = 'https://demo.tradovateapi.com/v1/user/syncrequest';
2const options = {
3 method: 'POST',
4 headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5 body: '{}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
200Successful
1{
2 "users": [
3 {
4 "name": "string",
5 "timestamp": "2024-01-15T09:30:00Z",
6 "email": "string",
7 "status": "Active",
8 "professional": true,
9 "id": 1,
10 "organizationId": 1,
11 "introducingPartnerId": 1
12 }
13 ],
14 "contractGroups": [
15 {
16 "name": "string",
17 "id": 1
18 }
19 ],
20 "accounts": [
21 {
22 "name": "string",
23 "userId": 1,
24 "accountType": "Customer",
25 "active": true,
26 "clearingHouseId": 1,
27 "riskCategoryId": 1,
28 "autoLiqProfileId": 1,
29 "marginAccountType": "Hedger",
30 "legalStatus": "Corporation",
31 "timestamp": "2024-01-15T09:30:00Z",
32 "id": 1,
33 "evaluationSize": 1.1,
34 "readonly": true,
35 "ccEmail": "string"
36 }
37 ],
38 "accountRiskStatuses": [
39 {
40 "id": 1,
41 "adminAction": "AgreedOnLiqOnlyModeByAutoLiq",
42 "adminTimestamp": "2024-01-15T09:30:00Z",
43 "liquidateOnly": "2024-01-15T09:30:00Z",
44 "userTriggeredLiqOnly": true
45 }
46 ],
47 "marginSnapshots": [
48 {
49 "timestamp": "2024-01-15T09:30:00Z",
50 "riskTimePeriodId": 1,
51 "initialMargin": 1.1,
52 "maintenanceMargin": 1.1,
53 "totalUsedMargin": 1.1,
54 "fullInitialMargin": 1.1,
55 "positionMargin": 1.1,
56 "id": 1,
57 "autoLiqLevel": 1.1,
58 "liqOnlyLevel": 1.1
59 }
60 ],
61 "userAccountAutoLiqs": [
62 {
63 "id": 1,
64 "changesLocked": true,
65 "marginPercentageAlert": 1.1,
66 "dailyLossPercentageAlert": 1.1,
67 "dailyLossAlert": 1.1,
68 "marginPercentageLiqOnly": 1.1,
69 "dailyLossPercentageLiqOnly": 1.1,
70 "dailyLossLiqOnly": 1.1,
71 "marginPercentageAutoLiq": 1.1,
72 "dailyLossPercentageAutoLiq": 1.1,
73 "dailyLossAutoLiq": 1.1,
74 "weeklyLossAutoLiq": 1.1,
75 "flattenTimestamp": "2024-01-15T09:30:00Z",
76 "trailingMaxDrawdown": 1.1,
77 "trailingMaxDrawdownLimit": 1.1,
78 "trailingMaxDrawdownMode": "EOD",
79 "dailyProfitAutoLiq": 1.1,
80 "weeklyProfitAutoLiq": 1.1,
81 "doNotUnlock": true
82 }
83 ],
84 "cashBalances": [
85 {
86 "accountId": 1,
87 "timestamp": "2024-01-15T09:30:00Z",
88 "tradeDate": {
89 "year": 1,
90 "month": 1,
91 "day": 1
92 },
93 "currencyId": 1,
94 "amount": 1.1,
95 "id": 1,
96 "realizedPnL": 1.1,
97 "weekRealizedPnL": 1.1,
98 "amountSOD": 1.1
99 }
100 ],
101 "currencies": [
102 {
103 "name": "string",
104 "id": 1,
105 "symbol": "string"
106 }
107 ],
108 "positions": [
109 {
110 "accountId": 1,
111 "contractId": 1,
112 "timestamp": "2024-01-15T09:30:00Z",
113 "tradeDate": {
114 "year": 1,
115 "month": 1,
116 "day": 1
117 },
118 "netPos": 1,
119 "bought": 1,
120 "boughtValue": 1.1,
121 "sold": 1,
122 "soldValue": 1.1,
123 "prevPos": 1,
124 "id": 1,
125 "netPrice": 1.1,
126 "prevPrice": 1.1
127 }
128 ],
129 "fillPairs": [
130 {
131 "positionId": 1,
132 "buyFillId": 1,
133 "sellFillId": 1,
134 "qty": 1,
135 "buyPrice": 1.1,
136 "sellPrice": 1.1,
137 "active": true,
138 "id": 1
139 }
140 ],
141 "orders": [
142 {
143 "accountId": 1,
144 "timestamp": "2024-01-15T09:30:00Z",
145 "action": "Buy",
146 "ordStatus": "Canceled",
147 "admin": true,
148 "id": 1,
149 "contractId": 1,
150 "spreadDefinitionId": 1,
151 "executionProviderId": 1,
152 "ocoId": 1,
153 "parentId": 1,
154 "linkedId": 1
155 }
156 ],
157 "contracts": [
158 {
159 "name": "string",
160 "contractMaturityId": 1,
161 "id": 1
162 }
163 ],
164 "contractMaturities": [
165 {
166 "productId": 1,
167 "expirationMonth": 1,
168 "expirationDate": "2024-01-15T09:30:00Z",
169 "isFront": true,
170 "id": 1,
171 "firstIntentDate": "2024-01-15T09:30:00Z",
172 "underlyingId": 1
173 }
174 ],
175 "products": [
176 {
177 "name": "string",
178 "currencyId": 1,
179 "productType": "CommonStock",
180 "description": "string",
181 "exchangeId": 1,
182 "contractGroupId": 1,
183 "status": "Inactive",
184 "valuePerPoint": 1.1,
185 "priceFormatType": "Decimal",
186 "priceFormat": 1,
187 "tickSize": 1.1,
188 "id": 1,
189 "riskDiscountContractGroupId": 1,
190 "months": "string",
191 "isSecured": true
192 }
193 ],
194 "exchanges": [
195 {
196 "name": "string",
197 "id": 1
198 }
199 ],
200 "spreadDefinitions": [
201 {
202 "timestamp": "2024-01-15T09:30:00Z",
203 "spreadType": "Bundle",
204 "uds": true,
205 "id": 1
206 }
207 ],
208 "commands": [
209 {
210 "orderId": 1,
211 "timestamp": "2024-01-15T09:30:00Z",
212 "commandType": "Cancel",
213 "commandStatus": "AtExecution",
214 "id": 1,
215 "clOrdId": "string",
216 "senderId": 1,
217 "userSessionId": 1,
218 "activationTime": "2024-01-15T09:30:00Z",
219 "customTag50": "string",
220 "isAutomated": true
221 }
222 ],
223 "commandReports": [
224 {
225 "commandId": 1,
226 "timestamp": "2024-01-15T09:30:00Z",
227 "commandStatus": "AtExecution",
228 "id": 1,
229 "rejectReason": "AccountClosed",
230 "text": "string",
231 "ordStatus": "Canceled"
232 }
233 ],
234 "executionReports": [
235 {
236 "commandId": 1,
237 "name": "string",
238 "accountId": 1,
239 "contractId": 1,
240 "timestamp": "2024-01-15T09:30:00Z",
241 "orderId": 1,
242 "execType": "Canceled",
243 "action": "Buy",
244 "id": 1,
245 "tradeDate": {
246 "year": 1,
247 "month": 1,
248 "day": 1
249 },
250 "execRefId": "string",
251 "ordStatus": "Canceled",
252 "cumQty": 1,
253 "avgPx": 1.1,
254 "lastQty": 1,
255 "lastPx": 1.1,
256 "rejectReason": "AccountClosed",
257 "text": "string",
258 "exchangeOrderId": "string"
259 }
260 ],
261 "orderVersions": [
262 {
263 "orderId": 1,
264 "orderQty": 1,
265 "orderType": "Limit",
266 "id": 1,
267 "price": 1.1,
268 "stopPrice": 1.1,
269 "maxShow": 1,
270 "pegDifference": 1.1,
271 "timeInForce": "Day",
272 "expireTime": "2024-01-15T09:30:00Z",
273 "text": "string"
274 }
275 ],
276 "fills": [
277 {
278 "orderId": 1,
279 "contractId": 1,
280 "timestamp": "2024-01-15T09:30:00Z",
281 "tradeDate": {
282 "year": 1,
283 "month": 1,
284 "day": 1
285 },
286 "action": "Buy",
287 "qty": 1,
288 "price": 1.1,
289 "active": true,
290 "finallyPaired": 1,
291 "id": 1
292 }
293 ],
294 "orderStrategies": [
295 {
296 "accountId": 1,
297 "timestamp": "2024-01-15T09:30:00Z",
298 "contractId": 1,
299 "orderStrategyTypeId": 1,
300 "action": "Buy",
301 "status": "ActiveStrategy",
302 "id": 1,
303 "initiatorId": 1,
304 "params": "string",
305 "uuid": "string",
306 "failureMessage": "string",
307 "senderId": 1,
308 "customTag50": "string",
309 "userSessionId": 1
310 }
311 ],
312 "orderStrategyLinks": [
313 {
314 "orderStrategyId": 1,
315 "orderId": 1,
316 "label": "string",
317 "id": 1
318 }
319 ],
320 "userProperties": [
321 {
322 "userId": 1,
323 "propertyId": 1,
324 "id": 1,
325 "value": "string"
326 }
327 ],
328 "properties": [
329 {
330 "name": "string",
331 "propertyType": "Boolean",
332 "id": 1,
333 "enumOptions": "string",
334 "defaultValue": "string"
335 }
336 ],
337 "userPlugins": [
338 {
339 "userId": 1,
340 "timestamp": "2024-01-15T09:30:00Z",
341 "planPrice": 1.1,
342 "pluginName": "string",
343 "approval": true,
344 "startDate": {
345 "year": 1,
346 "month": 1,
347 "day": 1
348 },
349 "paidAmount": 1.1,
350 "id": 1,
351 "creditCardTransactionId": 1,
352 "cashBalanceLogId": 1,
353 "creditCardId": 1,
354 "accountId": 1,
355 "entitlementId": 1,
356 "expirationDate": {
357 "year": 1,
358 "month": 1,
359 "day": 1
360 },
361 "autorenewal": true,
362 "planCategories": "string"
363 }
364 ],
365 "orderStrategyTypes": [
366 {
367 "name": "string",
368 "enabled": true,
369 "id": 1
370 }
371 ]
372}
### Used with WebSocket protocol. Returns all data associated with the user. This endpoint is essential for efficient use of the WebSocket API. ```js const URL = 'wss://live.tradovateapi.com/v1/websocket' const myWebSocket = new WebSocket(URL) //authorize websocket with your access token myWebSocket.onopen = function() { myWebSocket.send(`authorize\n0\n\n${accessToken}`) } const requestBody = { users: [12345] } myWebSocket.send(`user/syncrequest\n1\n\n${JSON.stringify(requestBody)}`) //starts a subscription to real-time user data. ```
Was this page helpful?
Previous

Add Entitlement Subscription

Next
Built with

Used with WebSocket protocol. Returns all data associated with the user.

This endpoint is essential for efficient use of the WebSocket API.

1const URL = 'wss://live.tradovateapi.com/v1/websocket'
2
3const myWebSocket = new WebSocket(URL)
4
5//authorize websocket with your access token
6myWebSocket.onopen = function() {
7 myWebSocket.send(`authorize\n0\n\n${accessToken}`)
8}
9
10const requestBody = {
11 users: [12345]
12}
13
14myWebSocket.send(`user/syncrequest\n1\n\n${JSON.stringify(requestBody)}`)
15
16//starts a subscription to real-time user data.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
userslist of longsOptional
accountslist of longsOptional
splitResponsesbooleanOptional

Response

SyncMessage
userslist of objects
contractGroupslist of objects
accountslist of objects
accountRiskStatuseslist of objects
marginSnapshotslist of objects
userAccountAutoLiqslist of objects
cashBalanceslist of objects
currencieslist of objects
positionslist of objects
fillPairslist of objects
orderslist of objects
contractslist of objects
contractMaturitieslist of objects
productslist of objects
exchangeslist of objects
spreadDefinitionslist of objects
commandslist of objects
commandReportslist of objects
executionReportslist of objects
orderVersionslist of objects
fillslist of objects
orderStrategieslist of objects
orderStrategyLinkslist of objects
userPropertieslist of objects
propertieslist of objects
userPluginslist of objects
orderStrategyTypeslist of objects