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.
@@ -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
- // 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 = await snaptrade.referenceData.getCurrencyExchangeRatePair({
39
- "currencyPair": "currencyPair_example",
40
- })
41
-
42
- console.log(getCurrencyExchangeRatePairResponse)
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
- // 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
- })
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
134
- // basePath: "https://api.snaptrade.com/api/v1",
135
- consumerKey: "YOUR_CONSUMER_KEY",
136
- clientId: "YOUR_CLIENT_ID",
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
- console.log(getSecurityTypesResponse)
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
181
- // basePath: "https://api.snaptrade.com/api/v1",
182
- consumerKey: "YOUR_CONSUMER_KEY",
183
- clientId: "YOUR_CLIENT_ID",
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 = await snaptrade.referenceData.getStockExchanges()
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
227
- // basePath: "https://api.snaptrade.com/api/v1",
228
- consumerKey: "YOUR_CONSUMER_KEY",
229
- clientId: "YOUR_CLIENT_ID",
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
- "substring": "apple",
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
279
- // basePath: "https://api.snaptrade.com/api/v1",
280
- consumerKey: "YOUR_CONSUMER_KEY",
281
- clientId: "YOUR_CLIENT_ID",
282
- })
283
-
284
- const getSymbolsByTickerResponse = await snaptrade.referenceData.getSymbolsByTicker({
285
- "ticker": "ticker_example",
286
- })
287
-
288
- console.log(getSymbolsByTickerResponse)
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
333
- // basePath: "https://api.snaptrade.com/api/v1",
334
- consumerKey: "YOUR_CONSUMER_KEY",
335
- clientId: "YOUR_CLIENT_ID",
336
- })
337
-
338
- const listAllBrokerageAuthorizationTypeResponse = await snaptrade.referenceData.listAllBrokerageAuthorizationType({
339
- "brokerage": "QUESTRADE,ALPACA",
340
- })
341
-
342
- console.log(listAllBrokerageAuthorizationTypeResponse)
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
385
- // basePath: "https://api.snaptrade.com/api/v1",
386
- consumerKey: "YOUR_CONSUMER_KEY",
387
- clientId: "YOUR_CLIENT_ID",
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 = await snaptrade.referenceData.listAllBrokerages()
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
432
- // basePath: "https://api.snaptrade.com/api/v1",
433
- consumerKey: "YOUR_CONSUMER_KEY",
434
- clientId: "YOUR_CLIENT_ID",
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
- console.log(listAllCurrenciesResponse)
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
479
- // basePath: "https://api.snaptrade.com/api/v1",
480
- consumerKey: "YOUR_CONSUMER_KEY",
481
- clientId: "YOUR_CLIENT_ID",
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 = await snaptrade.referenceData.listAllCurrenciesRates()
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
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
525
- // basePath: "https://api.snaptrade.com/api/v1",
526
- consumerKey: "YOUR_CONSUMER_KEY",
527
- clientId: "YOUR_CLIENT_ID",
528
- })
529
-
530
- const symbolSearchUserAccountResponse = await snaptrade.referenceData.symbolSearchUserAccount({
531
- "userId": "John.doe@snaptrade.com",
532
- "userSecret": "USERSECRET123",
533
- "accountId": "accountId_example",
534
- "substring": "apple",
535
- })
536
-
537
- console.log(symbolSearchUserAccountResponse)
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