snaptrade-typescript-sdk 8.29.0 → 8.29.1
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/README.md +107 -70
- package/dist/api/account-information-api-generated.d.ts +6 -6
- package/dist/api/account-information-api-generated.js +3 -3
- package/dist/api/options-api-generated.d.ts +10 -10
- package/dist/api/options-api-generated.js +5 -5
- package/dist/api/reference-data-api-generated.d.ts +2 -2
- package/dist/api/reference-data-api-generated.js +1 -1
- package/dist/api/trading-api-generated.d.ts +2 -2
- package/dist/api/trading-api-generated.js +1 -1
- package/dist/browser.js +1 -1
- package/dist/configuration.d.ts +5 -0
- package/dist/configuration.js +1 -1
- package/dist/models/options-position.d.ts +0 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/8.29.1)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -184,13 +184,14 @@ const getAllUserHoldingsResponse =
|
|
|
184
184
|
Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
|
185
185
|
|
|
186
186
|
#### 🔄 Return
|
|
187
|
+
|
|
187
188
|
[AccountHoldings](./models/account-holdings.ts)
|
|
188
189
|
|
|
189
190
|
#### 🌐 Endpoint
|
|
190
191
|
|
|
191
192
|
`/holdings` `GET`
|
|
192
193
|
|
|
193
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
194
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
194
195
|
|
|
195
196
|
---
|
|
196
197
|
|
|
@@ -218,16 +219,17 @@ const getUserAccountBalanceResponse =
|
|
|
218
219
|
|
|
219
220
|
##### accountId: `string`
|
|
220
221
|
|
|
221
|
-
The ID of the account get
|
|
222
|
+
The ID of the account to get balances.
|
|
222
223
|
|
|
223
224
|
#### 🔄 Return
|
|
225
|
+
|
|
224
226
|
[Balance](./models/balance.ts)
|
|
225
227
|
|
|
226
228
|
#### 🌐 Endpoint
|
|
227
229
|
|
|
228
230
|
`/accounts/{accountId}/balances` `GET`
|
|
229
231
|
|
|
230
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
232
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
231
233
|
|
|
232
234
|
---
|
|
233
235
|
|
|
@@ -258,13 +260,14 @@ const getUserAccountDetailsResponse =
|
|
|
258
260
|
The ID of the account to get detail of.
|
|
259
261
|
|
|
260
262
|
#### 🔄 Return
|
|
263
|
+
|
|
261
264
|
[Account](./models/account.ts)
|
|
262
265
|
|
|
263
266
|
#### 🌐 Endpoint
|
|
264
267
|
|
|
265
268
|
`/accounts/{accountId}` `GET`
|
|
266
269
|
|
|
267
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
270
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
268
271
|
|
|
269
272
|
---
|
|
270
273
|
|
|
@@ -293,20 +296,21 @@ const getUserAccountOrdersResponse =
|
|
|
293
296
|
|
|
294
297
|
##### accountId: `string`
|
|
295
298
|
|
|
296
|
-
The ID of the account get
|
|
299
|
+
The ID of the account to get orders.
|
|
297
300
|
|
|
298
301
|
##### state: `'all' | 'open' | 'executed'`
|
|
299
302
|
|
|
300
303
|
defaults value is set to \"all\"
|
|
301
304
|
|
|
302
305
|
#### 🔄 Return
|
|
306
|
+
|
|
303
307
|
[AccountOrderRecord](./models/account-order-record.ts)
|
|
304
308
|
|
|
305
309
|
#### 🌐 Endpoint
|
|
306
310
|
|
|
307
311
|
`/accounts/{accountId}/orders` `GET`
|
|
308
312
|
|
|
309
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
313
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
310
314
|
|
|
311
315
|
---
|
|
312
316
|
|
|
@@ -334,16 +338,17 @@ const getUserAccountPositionsResponse =
|
|
|
334
338
|
|
|
335
339
|
##### accountId: `string`
|
|
336
340
|
|
|
337
|
-
The ID of the account get positions.
|
|
341
|
+
The ID of the account to get positions.
|
|
338
342
|
|
|
339
343
|
#### 🔄 Return
|
|
344
|
+
|
|
340
345
|
[Position](./models/position.ts)
|
|
341
346
|
|
|
342
347
|
#### 🌐 Endpoint
|
|
343
348
|
|
|
344
349
|
`/accounts/{accountId}/positions` `GET`
|
|
345
350
|
|
|
346
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
351
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
347
352
|
|
|
348
353
|
---
|
|
349
354
|
|
|
@@ -374,13 +379,14 @@ The ID of the account to fetch holdings for.
|
|
|
374
379
|
##### userSecret: `string`
|
|
375
380
|
|
|
376
381
|
#### 🔄 Return
|
|
382
|
+
|
|
377
383
|
[AccountHoldingsAccount](./models/account-holdings-account.ts)
|
|
378
384
|
|
|
379
385
|
#### 🌐 Endpoint
|
|
380
386
|
|
|
381
387
|
`/accounts/{accountId}/holdings` `GET`
|
|
382
388
|
|
|
383
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
389
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
384
390
|
|
|
385
391
|
---
|
|
386
392
|
|
|
@@ -406,13 +412,14 @@ const listUserAccountsResponse =
|
|
|
406
412
|
##### userSecret: `string`
|
|
407
413
|
|
|
408
414
|
#### 🔄 Return
|
|
415
|
+
|
|
409
416
|
[Account](./models/account.ts)
|
|
410
417
|
|
|
411
418
|
#### 🌐 Endpoint
|
|
412
419
|
|
|
413
420
|
`/accounts` `GET`
|
|
414
421
|
|
|
415
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
422
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
416
423
|
|
|
417
424
|
---
|
|
418
425
|
|
|
@@ -443,13 +450,14 @@ const updateUserAccountResponse =
|
|
|
443
450
|
The ID of the account to update.
|
|
444
451
|
|
|
445
452
|
#### 🔄 Return
|
|
453
|
+
|
|
446
454
|
[Account](./models/account.ts)
|
|
447
455
|
|
|
448
456
|
#### 🌐 Endpoint
|
|
449
457
|
|
|
450
458
|
`/accounts/{accountId}` `PUT`
|
|
451
459
|
|
|
452
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
460
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
453
461
|
|
|
454
462
|
---
|
|
455
463
|
|
|
@@ -465,13 +473,14 @@ const checkResponse = await snaptrade.apiStatus.check();
|
|
|
465
473
|
```
|
|
466
474
|
|
|
467
475
|
#### 🔄 Return
|
|
476
|
+
|
|
468
477
|
[Status](./models/status.ts)
|
|
469
478
|
|
|
470
479
|
#### 🌐 Endpoint
|
|
471
480
|
|
|
472
481
|
`/` `GET`
|
|
473
482
|
|
|
474
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
483
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
475
484
|
|
|
476
485
|
---
|
|
477
486
|
|
|
@@ -494,13 +503,14 @@ const deleteSnapTradeUserResponse =
|
|
|
494
503
|
##### userId: `string`
|
|
495
504
|
|
|
496
505
|
#### 🔄 Return
|
|
506
|
+
|
|
497
507
|
[DeleteUserResponse](./models/delete-user-response.ts)
|
|
498
508
|
|
|
499
509
|
#### 🌐 Endpoint
|
|
500
510
|
|
|
501
511
|
`/snapTrade/deleteUser` `DELETE`
|
|
502
512
|
|
|
503
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
513
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
504
514
|
|
|
505
515
|
---
|
|
506
516
|
|
|
@@ -528,7 +538,7 @@ const getUserJWTResponse = await snaptrade.authentication.getUserJWT({
|
|
|
528
538
|
|
|
529
539
|
`/snapTrade/encryptedJWT` `GET`
|
|
530
540
|
|
|
531
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
541
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
532
542
|
|
|
533
543
|
---
|
|
534
544
|
|
|
@@ -548,7 +558,7 @@ const listSnapTradeUsersResponse =
|
|
|
548
558
|
|
|
549
559
|
`/snapTrade/listUsers` `GET`
|
|
550
560
|
|
|
551
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
561
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
552
562
|
|
|
553
563
|
---
|
|
554
564
|
|
|
@@ -592,7 +602,7 @@ const loginSnapTradeUserResponse =
|
|
|
592
602
|
|
|
593
603
|
`/snapTrade/login` `POST`
|
|
594
604
|
|
|
595
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
605
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
596
606
|
|
|
597
607
|
---
|
|
598
608
|
|
|
@@ -623,13 +633,14 @@ SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as
|
|
|
623
633
|
Open SSH RSA public key
|
|
624
634
|
|
|
625
635
|
#### 🔄 Return
|
|
636
|
+
|
|
626
637
|
[UserIDandSecret](./models/user-idand-secret.ts)
|
|
627
638
|
|
|
628
639
|
#### 🌐 Endpoint
|
|
629
640
|
|
|
630
641
|
`/snapTrade/registerUser` `POST`
|
|
631
642
|
|
|
632
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
643
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
633
644
|
|
|
634
645
|
---
|
|
635
646
|
|
|
@@ -660,13 +671,14 @@ The ID of a brokerage authorization object.
|
|
|
660
671
|
##### userSecret: `string`
|
|
661
672
|
|
|
662
673
|
#### 🔄 Return
|
|
674
|
+
|
|
663
675
|
[BrokerageAuthorization](./models/brokerage-authorization.ts)
|
|
664
676
|
|
|
665
677
|
#### 🌐 Endpoint
|
|
666
678
|
|
|
667
679
|
`/authorizations/{authorizationId}` `GET`
|
|
668
680
|
|
|
669
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
681
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
670
682
|
|
|
671
683
|
---
|
|
672
684
|
|
|
@@ -692,13 +704,14 @@ const listBrokerageAuthorizationsResponse =
|
|
|
692
704
|
##### userSecret: `string`
|
|
693
705
|
|
|
694
706
|
#### 🔄 Return
|
|
707
|
+
|
|
695
708
|
[BrokerageAuthorization](./models/brokerage-authorization.ts)
|
|
696
709
|
|
|
697
710
|
#### 🌐 Endpoint
|
|
698
711
|
|
|
699
712
|
`/authorizations` `GET`
|
|
700
713
|
|
|
701
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
714
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
702
715
|
|
|
703
716
|
---
|
|
704
717
|
|
|
@@ -732,7 +745,7 @@ The ID of the Authorization to delete.
|
|
|
732
745
|
|
|
733
746
|
`/authorizations/{authorizationId}` `DELETE`
|
|
734
747
|
|
|
735
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
748
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
736
749
|
|
|
737
750
|
---
|
|
738
751
|
|
|
@@ -769,7 +782,7 @@ Optional comma seperated list of session IDs used to filter the request on speci
|
|
|
769
782
|
|
|
770
783
|
`/sessionEvents` `GET`
|
|
771
784
|
|
|
772
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
785
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
773
786
|
|
|
774
787
|
---
|
|
775
788
|
|
|
@@ -794,13 +807,14 @@ const listUserErrorsResponse = await snaptrade.errorLogs.listUserErrors({
|
|
|
794
807
|
##### userSecret: `string`
|
|
795
808
|
|
|
796
809
|
#### 🔄 Return
|
|
810
|
+
|
|
797
811
|
[UserErrorLog](./models/user-error-log.ts)
|
|
798
812
|
|
|
799
813
|
#### 🌐 Endpoint
|
|
800
814
|
|
|
801
815
|
`/snapTrade/listUserErrors` `GET`
|
|
802
816
|
|
|
803
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
817
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
804
818
|
|
|
805
819
|
---
|
|
806
820
|
|
|
@@ -830,11 +844,12 @@ const getOptionStrategyResponse = await snaptrade.options.getOptionStrategy({
|
|
|
830
844
|
|
|
831
845
|
#### ⚙️ Parameters
|
|
832
846
|
|
|
833
|
-
#####
|
|
847
|
+
##### underlying_symbol_id: `string`
|
|
834
848
|
|
|
835
|
-
##### legs:
|
|
849
|
+
##### legs: `OptionLeg`
|
|
850
|
+
[`OptionLeg`](./models/option-leg.ts)[]
|
|
836
851
|
|
|
837
|
-
#####
|
|
852
|
+
##### strategy_type: `string`
|
|
838
853
|
|
|
839
854
|
##### userId: `string`
|
|
840
855
|
|
|
@@ -842,16 +857,17 @@ const getOptionStrategyResponse = await snaptrade.options.getOptionStrategy({
|
|
|
842
857
|
|
|
843
858
|
##### accountId: `string`
|
|
844
859
|
|
|
845
|
-
The ID of the account
|
|
860
|
+
The ID of the account to create the option strategy object in.
|
|
846
861
|
|
|
847
862
|
#### 🔄 Return
|
|
863
|
+
|
|
848
864
|
[StrategyQuotes](./models/strategy-quotes.ts)
|
|
849
865
|
|
|
850
866
|
#### 🌐 Endpoint
|
|
851
867
|
|
|
852
868
|
`/accounts/{accountId}/optionStrategy` `POST`
|
|
853
869
|
|
|
854
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
870
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
855
871
|
|
|
856
872
|
---
|
|
857
873
|
|
|
@@ -879,7 +895,7 @@ const getOptionsChainResponse = await snaptrade.options.getOptionsChain({
|
|
|
879
895
|
|
|
880
896
|
##### accountId: `string`
|
|
881
897
|
|
|
882
|
-
The ID of the account get
|
|
898
|
+
The ID of the account to get the options chain from.
|
|
883
899
|
|
|
884
900
|
##### symbol: `string`
|
|
885
901
|
|
|
@@ -889,7 +905,7 @@ Universal symbol ID if symbol
|
|
|
889
905
|
|
|
890
906
|
`/accounts/{accountId}/optionsChain` `GET`
|
|
891
907
|
|
|
892
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
908
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
893
909
|
|
|
894
910
|
---
|
|
895
911
|
|
|
@@ -918,20 +934,21 @@ const getOptionsStrategyQuoteResponse =
|
|
|
918
934
|
|
|
919
935
|
##### accountId: `string`
|
|
920
936
|
|
|
921
|
-
The ID of the account
|
|
937
|
+
The ID of the account the strategy will be placed in.
|
|
922
938
|
|
|
923
939
|
##### optionStrategyId: `string`
|
|
924
940
|
|
|
925
941
|
Option strategy id obtained from response when creating option strategy object
|
|
926
942
|
|
|
927
943
|
#### 🔄 Return
|
|
944
|
+
|
|
928
945
|
[StrategyQuotes](./models/strategy-quotes.ts)
|
|
929
946
|
|
|
930
947
|
#### 🌐 Endpoint
|
|
931
948
|
|
|
932
949
|
`/accounts/{accountId}/optionStrategy/{optionStrategyId}` `GET`
|
|
933
950
|
|
|
934
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
951
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
935
952
|
|
|
936
953
|
---
|
|
937
954
|
|
|
@@ -958,16 +975,17 @@ const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({
|
|
|
958
975
|
|
|
959
976
|
##### accountId: `string`
|
|
960
977
|
|
|
961
|
-
The ID of the account
|
|
978
|
+
The ID of the account to fetch options holdings for.
|
|
962
979
|
|
|
963
980
|
#### 🔄 Return
|
|
981
|
+
|
|
964
982
|
[OptionsPosition](./models/options-position.ts)
|
|
965
983
|
|
|
966
984
|
#### 🌐 Endpoint
|
|
967
985
|
|
|
968
986
|
`/accounts/{accountId}/options` `GET`
|
|
969
987
|
|
|
970
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
988
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
971
989
|
|
|
972
990
|
---
|
|
973
991
|
|
|
@@ -994,9 +1012,9 @@ const placeOptionStrategyResponse = await snaptrade.options.placeOptionStrategy(
|
|
|
994
1012
|
|
|
995
1013
|
#### ⚙️ Parameters
|
|
996
1014
|
|
|
997
|
-
#####
|
|
1015
|
+
##### order_type: `string`
|
|
998
1016
|
|
|
999
|
-
#####
|
|
1017
|
+
##### time_in_force: `string`
|
|
1000
1018
|
|
|
1001
1019
|
##### price: `number`
|
|
1002
1020
|
|
|
@@ -1008,20 +1026,21 @@ Trade Price if limit or stop limit order
|
|
|
1008
1026
|
|
|
1009
1027
|
##### accountId: `string`
|
|
1010
1028
|
|
|
1011
|
-
The ID of the account
|
|
1029
|
+
The ID of the account to execute the strategy in.
|
|
1012
1030
|
|
|
1013
1031
|
##### optionStrategyId: `string`
|
|
1014
1032
|
|
|
1015
1033
|
Option strategy id obtained from response when creating option strategy object
|
|
1016
1034
|
|
|
1017
1035
|
#### 🔄 Return
|
|
1036
|
+
|
|
1018
1037
|
[StrategyOrderRecord](./models/strategy-order-record.ts)
|
|
1019
1038
|
|
|
1020
1039
|
#### 🌐 Endpoint
|
|
1021
1040
|
|
|
1022
1041
|
`/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute` `POST`
|
|
1023
1042
|
|
|
1024
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1043
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1025
1044
|
|
|
1026
1045
|
---
|
|
1027
1046
|
|
|
@@ -1046,13 +1065,14 @@ const getCurrencyExchangeRatePairResponse =
|
|
|
1046
1065
|
A currency pair based on currency code for example, {CAD-USD}
|
|
1047
1066
|
|
|
1048
1067
|
#### 🔄 Return
|
|
1068
|
+
|
|
1049
1069
|
[ExchangeRatePairs](./models/exchange-rate-pairs.ts)
|
|
1050
1070
|
|
|
1051
1071
|
#### 🌐 Endpoint
|
|
1052
1072
|
|
|
1053
1073
|
`/currencies/rates/{currencyPair}` `GET`
|
|
1054
1074
|
|
|
1055
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1075
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1056
1076
|
|
|
1057
1077
|
---
|
|
1058
1078
|
|
|
@@ -1068,13 +1088,14 @@ const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo();
|
|
|
1068
1088
|
```
|
|
1069
1089
|
|
|
1070
1090
|
#### 🔄 Return
|
|
1091
|
+
|
|
1071
1092
|
[PartnerData](./models/partner-data.ts)
|
|
1072
1093
|
|
|
1073
1094
|
#### 🌐 Endpoint
|
|
1074
1095
|
|
|
1075
1096
|
`/snapTrade/partners` `GET`
|
|
1076
1097
|
|
|
1077
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1098
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1078
1099
|
|
|
1079
1100
|
---
|
|
1080
1101
|
|
|
@@ -1091,13 +1112,14 @@ const getSecurityTypesResponse =
|
|
|
1091
1112
|
```
|
|
1092
1113
|
|
|
1093
1114
|
#### 🔄 Return
|
|
1115
|
+
|
|
1094
1116
|
[SecurityType](./models/security-type.ts)
|
|
1095
1117
|
|
|
1096
1118
|
#### 🌐 Endpoint
|
|
1097
1119
|
|
|
1098
1120
|
`/securityTypes` `GET`
|
|
1099
1121
|
|
|
1100
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1122
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1101
1123
|
|
|
1102
1124
|
---
|
|
1103
1125
|
|
|
@@ -1114,13 +1136,14 @@ const getStockExchangesResponse =
|
|
|
1114
1136
|
```
|
|
1115
1137
|
|
|
1116
1138
|
#### 🔄 Return
|
|
1139
|
+
|
|
1117
1140
|
[Exchange](./models/exchange.ts)
|
|
1118
1141
|
|
|
1119
1142
|
#### 🌐 Endpoint
|
|
1120
1143
|
|
|
1121
1144
|
`/exchanges` `GET`
|
|
1122
1145
|
|
|
1123
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1146
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1124
1147
|
|
|
1125
1148
|
---
|
|
1126
1149
|
|
|
@@ -1142,13 +1165,14 @@ const getSymbolsResponse = await snaptrade.referenceData.getSymbols({
|
|
|
1142
1165
|
##### substring: `string`
|
|
1143
1166
|
|
|
1144
1167
|
#### 🔄 Return
|
|
1168
|
+
|
|
1145
1169
|
[UniversalSymbol](./models/universal-symbol.ts)
|
|
1146
1170
|
|
|
1147
1171
|
#### 🌐 Endpoint
|
|
1148
1172
|
|
|
1149
1173
|
`/symbols` `POST`
|
|
1150
1174
|
|
|
1151
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1175
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1152
1176
|
|
|
1153
1177
|
---
|
|
1154
1178
|
|
|
@@ -1177,13 +1201,14 @@ The ticker of the UniversalSymbol to get.
|
|
|
1177
1201
|
OPTIONAL IN PATH Can be used instead of the ticker ; The ID of the UniversalSymbol to get.
|
|
1178
1202
|
|
|
1179
1203
|
#### 🔄 Return
|
|
1204
|
+
|
|
1180
1205
|
[UniversalSymbol](./models/universal-symbol.ts)
|
|
1181
1206
|
|
|
1182
1207
|
#### 🌐 Endpoint
|
|
1183
1208
|
|
|
1184
1209
|
`/symbols/{ticker}` `GET`
|
|
1185
1210
|
|
|
1186
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1211
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1187
1212
|
|
|
1188
1213
|
---
|
|
1189
1214
|
|
|
@@ -1208,13 +1233,14 @@ const listAllBrokerageAuthorizationTypeResponse =
|
|
|
1208
1233
|
Comma separated value of brokerage slugs
|
|
1209
1234
|
|
|
1210
1235
|
#### 🔄 Return
|
|
1236
|
+
|
|
1211
1237
|
[BrokerageAuthorizationTypeReadOnly](./models/brokerage-authorization-type-read-only.ts)
|
|
1212
1238
|
|
|
1213
1239
|
#### 🌐 Endpoint
|
|
1214
1240
|
|
|
1215
1241
|
`/brokerageAuthorizationTypes` `GET`
|
|
1216
1242
|
|
|
1217
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1243
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1218
1244
|
|
|
1219
1245
|
---
|
|
1220
1246
|
|
|
@@ -1231,13 +1257,14 @@ const listAllBrokeragesResponse =
|
|
|
1231
1257
|
```
|
|
1232
1258
|
|
|
1233
1259
|
#### 🔄 Return
|
|
1260
|
+
|
|
1234
1261
|
[Brokerage](./models/brokerage.ts)
|
|
1235
1262
|
|
|
1236
1263
|
#### 🌐 Endpoint
|
|
1237
1264
|
|
|
1238
1265
|
`/brokerages` `GET`
|
|
1239
1266
|
|
|
1240
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1267
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1241
1268
|
|
|
1242
1269
|
---
|
|
1243
1270
|
|
|
@@ -1254,13 +1281,14 @@ const listAllCurrenciesResponse =
|
|
|
1254
1281
|
```
|
|
1255
1282
|
|
|
1256
1283
|
#### 🔄 Return
|
|
1284
|
+
|
|
1257
1285
|
[Currency](./models/currency.ts)
|
|
1258
1286
|
|
|
1259
1287
|
#### 🌐 Endpoint
|
|
1260
1288
|
|
|
1261
1289
|
`/currencies` `GET`
|
|
1262
1290
|
|
|
1263
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1291
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1264
1292
|
|
|
1265
1293
|
---
|
|
1266
1294
|
|
|
@@ -1277,13 +1305,14 @@ const listAllCurrenciesRatesResponse =
|
|
|
1277
1305
|
```
|
|
1278
1306
|
|
|
1279
1307
|
#### 🔄 Return
|
|
1308
|
+
|
|
1280
1309
|
[ExchangeRatePairs](./models/exchange-rate-pairs.ts)
|
|
1281
1310
|
|
|
1282
1311
|
#### 🌐 Endpoint
|
|
1283
1312
|
|
|
1284
1313
|
`/currencies/rates` `GET`
|
|
1285
1314
|
|
|
1286
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1315
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1287
1316
|
|
|
1288
1317
|
---
|
|
1289
1318
|
|
|
@@ -1312,18 +1341,19 @@ const symbolSearchUserAccountResponse =
|
|
|
1312
1341
|
|
|
1313
1342
|
##### accountId: `string`
|
|
1314
1343
|
|
|
1315
|
-
The ID of the account
|
|
1344
|
+
The ID of the account to search for symbols within.
|
|
1316
1345
|
|
|
1317
1346
|
##### substring: `string`
|
|
1318
1347
|
|
|
1319
1348
|
#### 🔄 Return
|
|
1349
|
+
|
|
1320
1350
|
[UniversalSymbol](./models/universal-symbol.ts)
|
|
1321
1351
|
|
|
1322
1352
|
#### 🌐 Endpoint
|
|
1323
1353
|
|
|
1324
1354
|
`/accounts/{accountId}/symbols` `POST`
|
|
1325
1355
|
|
|
1326
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1356
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1327
1357
|
|
|
1328
1358
|
---
|
|
1329
1359
|
|
|
@@ -1352,18 +1382,19 @@ const cancelUserAccountOrderResponse =
|
|
|
1352
1382
|
|
|
1353
1383
|
##### accountId: `string`
|
|
1354
1384
|
|
|
1355
|
-
The ID of the account
|
|
1385
|
+
The ID of the account to cancel the order in.
|
|
1356
1386
|
|
|
1357
|
-
#####
|
|
1387
|
+
##### brokerage_order_id: `string`
|
|
1358
1388
|
|
|
1359
1389
|
#### 🔄 Return
|
|
1390
|
+
|
|
1360
1391
|
[AccountOrderRecord](./models/account-order-record.ts)
|
|
1361
1392
|
|
|
1362
1393
|
#### 🌐 Endpoint
|
|
1363
1394
|
|
|
1364
1395
|
`/accounts/{accountId}/orders/cancel` `POST`
|
|
1365
1396
|
|
|
1366
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1397
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1367
1398
|
|
|
1368
1399
|
---
|
|
1369
1400
|
|
|
@@ -1394,11 +1425,11 @@ const getOrderImpactResponse = await snaptrade.trading.getOrderImpact({
|
|
|
1394
1425
|
|
|
1395
1426
|
##### userSecret: `string`
|
|
1396
1427
|
|
|
1397
|
-
#####
|
|
1428
|
+
##### account_id: `string`
|
|
1398
1429
|
|
|
1399
1430
|
##### action:
|
|
1400
1431
|
|
|
1401
|
-
#####
|
|
1432
|
+
##### order_type:
|
|
1402
1433
|
|
|
1403
1434
|
##### price: `number`
|
|
1404
1435
|
|
|
@@ -1408,22 +1439,23 @@ Trade Price if limit or stop limit order
|
|
|
1408
1439
|
|
|
1409
1440
|
Stop Price. If stop loss or stop limit order, the price to trigger the stop
|
|
1410
1441
|
|
|
1411
|
-
#####
|
|
1442
|
+
##### time_in_force:
|
|
1412
1443
|
|
|
1413
1444
|
##### units: `number`
|
|
1414
1445
|
|
|
1415
1446
|
Trade Units
|
|
1416
1447
|
|
|
1417
|
-
#####
|
|
1448
|
+
##### universal_symbol_id: `string`
|
|
1418
1449
|
|
|
1419
1450
|
#### 🔄 Return
|
|
1451
|
+
|
|
1420
1452
|
[ManualTradeAndImpact](./models/manual-trade-and-impact.ts)
|
|
1421
1453
|
|
|
1422
1454
|
#### 🌐 Endpoint
|
|
1423
1455
|
|
|
1424
1456
|
`/trade/impact` `POST`
|
|
1425
1457
|
|
|
1426
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1458
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1427
1459
|
|
|
1428
1460
|
---
|
|
1429
1461
|
|
|
@@ -1466,7 +1498,7 @@ Should be set to True if providing tickers.
|
|
|
1466
1498
|
|
|
1467
1499
|
`/accounts/{accountId}/quotes` `GET`
|
|
1468
1500
|
|
|
1469
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1501
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1470
1502
|
|
|
1471
1503
|
---
|
|
1472
1504
|
|
|
@@ -1497,11 +1529,11 @@ const placeForceOrderResponse = await snaptrade.trading.placeForceOrder({
|
|
|
1497
1529
|
|
|
1498
1530
|
##### userSecret: `string`
|
|
1499
1531
|
|
|
1500
|
-
#####
|
|
1532
|
+
##### account_id: `string`
|
|
1501
1533
|
|
|
1502
1534
|
##### action:
|
|
1503
1535
|
|
|
1504
|
-
#####
|
|
1536
|
+
##### order_type:
|
|
1505
1537
|
|
|
1506
1538
|
##### price: `number`
|
|
1507
1539
|
|
|
@@ -1511,22 +1543,23 @@ Trade Price if limit or stop limit order
|
|
|
1511
1543
|
|
|
1512
1544
|
Stop Price. If stop loss or stop limit order, the price to trigger the stop
|
|
1513
1545
|
|
|
1514
|
-
#####
|
|
1546
|
+
##### time_in_force:
|
|
1515
1547
|
|
|
1516
1548
|
##### units: `number`
|
|
1517
1549
|
|
|
1518
1550
|
Trade Units
|
|
1519
1551
|
|
|
1520
|
-
#####
|
|
1552
|
+
##### universal_symbol_id: `string`
|
|
1521
1553
|
|
|
1522
1554
|
#### 🔄 Return
|
|
1555
|
+
|
|
1523
1556
|
[AccountOrderRecord](./models/account-order-record.ts)
|
|
1524
1557
|
|
|
1525
1558
|
#### 🌐 Endpoint
|
|
1526
1559
|
|
|
1527
1560
|
`/trade/place` `POST`
|
|
1528
1561
|
|
|
1529
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1562
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1530
1563
|
|
|
1531
1564
|
---
|
|
1532
1565
|
|
|
@@ -1550,22 +1583,23 @@ const placeOCOOrderResponse = await snaptrade.trading.placeOCOOrder({
|
|
|
1550
1583
|
|
|
1551
1584
|
##### userSecret: `string`
|
|
1552
1585
|
|
|
1553
|
-
#####
|
|
1586
|
+
##### first_trade_id:
|
|
1554
1587
|
|
|
1555
1588
|
The ID of first trade object obtained from trade/impact endpoint
|
|
1556
1589
|
|
|
1557
|
-
#####
|
|
1590
|
+
##### second_trade_id:
|
|
1558
1591
|
|
|
1559
1592
|
The ID of second trade object obtained from trade/impact endpoint
|
|
1560
1593
|
|
|
1561
1594
|
#### 🔄 Return
|
|
1595
|
+
|
|
1562
1596
|
[AccountOrderRecord](./models/account-order-record.ts)
|
|
1563
1597
|
|
|
1564
1598
|
#### 🌐 Endpoint
|
|
1565
1599
|
|
|
1566
1600
|
`/trade/oco` `POST`
|
|
1567
1601
|
|
|
1568
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1602
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1569
1603
|
|
|
1570
1604
|
---
|
|
1571
1605
|
|
|
@@ -1595,13 +1629,14 @@ The ID of trade object obtained from trade/impact endpoint
|
|
|
1595
1629
|
##### userSecret: `string`
|
|
1596
1630
|
|
|
1597
1631
|
#### 🔄 Return
|
|
1632
|
+
|
|
1598
1633
|
[AccountOrderRecord](./models/account-order-record.ts)
|
|
1599
1634
|
|
|
1600
1635
|
#### 🌐 Endpoint
|
|
1601
1636
|
|
|
1602
1637
|
`/trade/{tradeId}` `POST`
|
|
1603
1638
|
|
|
1604
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1639
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1605
1640
|
|
|
1606
1641
|
---
|
|
1607
1642
|
|
|
@@ -1650,13 +1685,14 @@ Optional comma seperated list of brokerage authorization IDs used to filter the
|
|
|
1650
1685
|
Optional comma seperated list of types to filter activities by. This is not an exhaustive list, if we fail to match to these types, we will return the raw description from the brokerage. Potential values include - DIVIDEND - BUY - SELL - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN - EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN - INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN - INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI - FXT
|
|
1651
1686
|
|
|
1652
1687
|
#### 🔄 Return
|
|
1688
|
+
|
|
1653
1689
|
[UniversalActivity](./models/universal-activity.ts)
|
|
1654
1690
|
|
|
1655
1691
|
#### 🌐 Endpoint
|
|
1656
1692
|
|
|
1657
1693
|
`/activities` `GET`
|
|
1658
1694
|
|
|
1659
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1695
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1660
1696
|
|
|
1661
1697
|
---
|
|
1662
1698
|
|
|
@@ -1704,13 +1740,14 @@ Optional, increases frequency of data points for the total value and contributio
|
|
|
1704
1740
|
Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
|
1705
1741
|
|
|
1706
1742
|
#### 🔄 Return
|
|
1743
|
+
|
|
1707
1744
|
[PerformanceCustom](./models/performance-custom.ts)
|
|
1708
1745
|
|
|
1709
1746
|
#### 🌐 Endpoint
|
|
1710
1747
|
|
|
1711
1748
|
`/performance/custom` `GET`
|
|
1712
1749
|
|
|
1713
|
-
[🔙 Back to Table of Contents](#table-of-contents)
|
|
1750
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1714
1751
|
|
|
1715
1752
|
---
|
|
1716
1753
|
|