snaptrade-typescript-sdk 8.6.0 → 8.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.konfig/generate-id.txt +1 -1
- package/README.md +9 -11
- package/configuration.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/session-event.d.ts +6 -0
- package/dist/models/symbol.d.ts +7 -0
- package/docs/AccountInformationApi.md +120 -120
- package/docs/ApiDisclaimerApi.md +10 -11
- package/docs/ApiStatusApi.md +8 -9
- package/docs/AuthenticationApi.md +66 -66
- package/docs/ConnectionsApi.md +58 -57
- package/docs/ErrorLogsApi.md +10 -11
- package/docs/OptionsApi.md +80 -82
- package/docs/PortfolioManagementApi.md +433 -434
- package/docs/ReferenceDataApi.md +117 -119
- package/docs/TradingApi.md +152 -156
- package/docs/TransactionsAndReportingApi.md +40 -37
- package/models/session-event.ts +6 -0
- package/models/symbol.ts +9 -0
- package/package.json +1 -1
package/docs/ReferenceDataApi.md
CHANGED
|
@@ -26,21 +26,21 @@ Method | HTTP request | Description
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
29
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
30
30
|
|
|
31
31
|
const snaptrade = new Snaptrade({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
const getCurrencyExchangeRatePairResponse =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
33
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
34
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
35
|
+
clientId: "YOUR_CLIENT_ID",
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const getCurrencyExchangeRatePairResponse =
|
|
39
|
+
await snaptrade.referenceData.getCurrencyExchangeRatePair({
|
|
40
|
+
currencyPair: "currencyPair_example",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
console.log(getCurrencyExchangeRatePairResponse);
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
|
|
@@ -77,19 +77,18 @@ Name | Type | Description | Notes
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
80
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
81
81
|
|
|
82
82
|
const snaptrade = new Snaptrade({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
83
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
84
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
85
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
86
|
+
clientId: "YOUR_CLIENT_ID",
|
|
87
|
+
});
|
|
88
88
|
|
|
89
|
-
const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo()
|
|
90
|
-
|
|
91
|
-
console.log(getPartnerInfoResponse)
|
|
89
|
+
const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo();
|
|
92
90
|
|
|
91
|
+
console.log(getPartnerInfoResponse);
|
|
93
92
|
```
|
|
94
93
|
|
|
95
94
|
|
|
@@ -127,19 +126,19 @@ This endpoint does not need any parameter.
|
|
|
127
126
|
|
|
128
127
|
|
|
129
128
|
```typescript
|
|
130
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
129
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
131
130
|
|
|
132
131
|
const snaptrade = new Snaptrade({
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
const getSecurityTypesResponse = await snaptrade.referenceData.getSecurityTypes()
|
|
132
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
133
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
134
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
135
|
+
clientId: "YOUR_CLIENT_ID",
|
|
136
|
+
});
|
|
140
137
|
|
|
141
|
-
|
|
138
|
+
const getSecurityTypesResponse =
|
|
139
|
+
await snaptrade.referenceData.getSecurityTypes();
|
|
142
140
|
|
|
141
|
+
console.log(getSecurityTypesResponse);
|
|
143
142
|
```
|
|
144
143
|
|
|
145
144
|
|
|
@@ -174,19 +173,19 @@ This endpoint does not need any parameter.
|
|
|
174
173
|
|
|
175
174
|
|
|
176
175
|
```typescript
|
|
177
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
176
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
178
177
|
|
|
179
178
|
const snaptrade = new Snaptrade({
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
})
|
|
179
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
180
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
181
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
182
|
+
clientId: "YOUR_CLIENT_ID",
|
|
183
|
+
});
|
|
185
184
|
|
|
186
|
-
const getStockExchangesResponse =
|
|
187
|
-
|
|
188
|
-
console.log(getStockExchangesResponse)
|
|
185
|
+
const getStockExchangesResponse =
|
|
186
|
+
await snaptrade.referenceData.getStockExchanges();
|
|
189
187
|
|
|
188
|
+
console.log(getStockExchangesResponse);
|
|
190
189
|
```
|
|
191
190
|
|
|
192
191
|
|
|
@@ -220,21 +219,20 @@ This endpoint does not need any parameter.
|
|
|
220
219
|
|
|
221
220
|
|
|
222
221
|
```typescript
|
|
223
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
222
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
224
223
|
|
|
225
224
|
const snaptrade = new Snaptrade({
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
})
|
|
225
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
226
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
227
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
228
|
+
clientId: "YOUR_CLIENT_ID",
|
|
229
|
+
});
|
|
231
230
|
|
|
232
231
|
const getSymbolsResponse = await snaptrade.referenceData.getSymbols({
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
console.log(getSymbolsResponse)
|
|
232
|
+
substring: "apple",
|
|
233
|
+
});
|
|
237
234
|
|
|
235
|
+
console.log(getSymbolsResponse);
|
|
238
236
|
```
|
|
239
237
|
|
|
240
238
|
|
|
@@ -272,21 +270,21 @@ Name | Type | Description | Notes
|
|
|
272
270
|
|
|
273
271
|
|
|
274
272
|
```typescript
|
|
275
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
273
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
276
274
|
|
|
277
275
|
const snaptrade = new Snaptrade({
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
})
|
|
283
|
-
|
|
284
|
-
const getSymbolsByTickerResponse =
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
276
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
277
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
278
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
279
|
+
clientId: "YOUR_CLIENT_ID",
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
const getSymbolsByTickerResponse =
|
|
283
|
+
await snaptrade.referenceData.getSymbolsByTicker({
|
|
284
|
+
ticker: "ticker_example",
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
console.log(getSymbolsByTickerResponse);
|
|
290
288
|
```
|
|
291
289
|
|
|
292
290
|
|
|
@@ -326,21 +324,21 @@ Name | Type | Description | Notes
|
|
|
326
324
|
|
|
327
325
|
|
|
328
326
|
```typescript
|
|
329
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
327
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
330
328
|
|
|
331
329
|
const snaptrade = new Snaptrade({
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
})
|
|
337
|
-
|
|
338
|
-
const listAllBrokerageAuthorizationTypeResponse =
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
330
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
331
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
332
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
333
|
+
clientId: "YOUR_CLIENT_ID",
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
const listAllBrokerageAuthorizationTypeResponse =
|
|
337
|
+
await snaptrade.referenceData.listAllBrokerageAuthorizationType({
|
|
338
|
+
brokerage: "QUESTRADE,ALPACA",
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
console.log(listAllBrokerageAuthorizationTypeResponse);
|
|
344
342
|
```
|
|
345
343
|
|
|
346
344
|
|
|
@@ -378,19 +376,19 @@ Name | Type | Description | Notes
|
|
|
378
376
|
|
|
379
377
|
|
|
380
378
|
```typescript
|
|
381
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
379
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
382
380
|
|
|
383
381
|
const snaptrade = new Snaptrade({
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
})
|
|
382
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
383
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
384
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
385
|
+
clientId: "YOUR_CLIENT_ID",
|
|
386
|
+
});
|
|
389
387
|
|
|
390
|
-
const listAllBrokeragesResponse =
|
|
391
|
-
|
|
392
|
-
console.log(listAllBrokeragesResponse)
|
|
388
|
+
const listAllBrokeragesResponse =
|
|
389
|
+
await snaptrade.referenceData.listAllBrokerages();
|
|
393
390
|
|
|
391
|
+
console.log(listAllBrokeragesResponse);
|
|
394
392
|
```
|
|
395
393
|
|
|
396
394
|
|
|
@@ -425,19 +423,19 @@ This endpoint does not need any parameter.
|
|
|
425
423
|
|
|
426
424
|
|
|
427
425
|
```typescript
|
|
428
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
426
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
429
427
|
|
|
430
428
|
const snaptrade = new Snaptrade({
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
})
|
|
436
|
-
|
|
437
|
-
const listAllCurrenciesResponse = await snaptrade.referenceData.listAllCurrencies()
|
|
429
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
430
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
431
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
432
|
+
clientId: "YOUR_CLIENT_ID",
|
|
433
|
+
});
|
|
438
434
|
|
|
439
|
-
|
|
435
|
+
const listAllCurrenciesResponse =
|
|
436
|
+
await snaptrade.referenceData.listAllCurrencies();
|
|
440
437
|
|
|
438
|
+
console.log(listAllCurrenciesResponse);
|
|
441
439
|
```
|
|
442
440
|
|
|
443
441
|
|
|
@@ -472,19 +470,19 @@ This endpoint does not need any parameter.
|
|
|
472
470
|
|
|
473
471
|
|
|
474
472
|
```typescript
|
|
475
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
473
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
476
474
|
|
|
477
475
|
const snaptrade = new Snaptrade({
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
})
|
|
476
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
477
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
478
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
479
|
+
clientId: "YOUR_CLIENT_ID",
|
|
480
|
+
});
|
|
483
481
|
|
|
484
|
-
const listAllCurrenciesRatesResponse =
|
|
485
|
-
|
|
486
|
-
console.log(listAllCurrenciesRatesResponse)
|
|
482
|
+
const listAllCurrenciesRatesResponse =
|
|
483
|
+
await snaptrade.referenceData.listAllCurrenciesRates();
|
|
487
484
|
|
|
485
|
+
console.log(listAllCurrenciesRatesResponse);
|
|
488
486
|
```
|
|
489
487
|
|
|
490
488
|
|
|
@@ -518,24 +516,24 @@ This endpoint does not need any parameter.
|
|
|
518
516
|
|
|
519
517
|
|
|
520
518
|
```typescript
|
|
521
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
519
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
522
520
|
|
|
523
521
|
const snaptrade = new Snaptrade({
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
})
|
|
529
|
-
|
|
530
|
-
const symbolSearchUserAccountResponse =
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
522
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
523
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
524
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
525
|
+
clientId: "YOUR_CLIENT_ID",
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
const symbolSearchUserAccountResponse =
|
|
529
|
+
await snaptrade.referenceData.symbolSearchUserAccount({
|
|
530
|
+
userId: "John.doe@snaptrade.com",
|
|
531
|
+
userSecret: "USERSECRET123",
|
|
532
|
+
accountId: "accountId_example",
|
|
533
|
+
substring: "apple",
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
console.log(symbolSearchUserAccountResponse);
|
|
539
537
|
```
|
|
540
538
|
|
|
541
539
|
|