snaptrade-typescript-sdk 5.0.0 → 6.1.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.
Files changed (52) hide show
  1. package/.konfig/generate-id.txt +1 -1
  2. package/README.md +3 -5
  3. package/api/account-information-api.ts +136 -120
  4. package/api/api-disclaimer-api.ts +14 -19
  5. package/api/authentication-api.ts +37 -43
  6. package/api/connections-api.ts +46 -40
  7. package/api/error-logs-api.ts +12 -10
  8. package/api/options-api.ts +104 -108
  9. package/api/portfolio-management-api.ts +259 -253
  10. package/api/reference-data-api.ts +49 -53
  11. package/api/trading-api.ts +172 -185
  12. package/api/transactions-and-reporting-api.ts +64 -60
  13. package/client.ts +2 -0
  14. package/configuration.ts +1 -1
  15. package/dist/api/account-information-api.d.ts +112 -112
  16. package/dist/api/api-disclaimer-api.d.ts +10 -16
  17. package/dist/api/api-disclaimer-api.js +1 -1
  18. package/dist/api/authentication-api.d.ts +27 -40
  19. package/dist/api/authentication-api.js +2 -2
  20. package/dist/api/connections-api.d.ts +38 -38
  21. package/dist/api/error-logs-api.d.ts +10 -10
  22. package/dist/api/options-api.d.ts +82 -94
  23. package/dist/api/options-api.js +2 -2
  24. package/dist/api/portfolio-management-api.d.ts +214 -256
  25. package/dist/api/portfolio-management-api.js +7 -7
  26. package/dist/api/reference-data-api.d.ts +37 -50
  27. package/dist/api/reference-data-api.js +2 -2
  28. package/dist/api/trading-api.d.ts +131 -160
  29. package/dist/api/trading-api.js +10 -10
  30. package/dist/api/transactions-and-reporting-api.d.ts +52 -52
  31. package/dist/configuration.js +1 -1
  32. package/dist/models/index.d.ts +1 -0
  33. package/dist/models/index.js +1 -0
  34. package/dist/models/target-asset.d.ts +4 -2
  35. package/dist/models/trading-cancel-user-account-order-request.d.ts +24 -0
  36. package/dist/models/trading-cancel-user-account-order-request.js +15 -0
  37. package/docs/AccountInformationApi.md +72 -88
  38. package/docs/ApiDisclaimerApi.md +8 -12
  39. package/docs/ApiStatusApi.md +6 -7
  40. package/docs/AuthenticationApi.md +34 -48
  41. package/docs/ConnectionsApi.md +26 -32
  42. package/docs/ErrorLogsApi.md +8 -10
  43. package/docs/OptionsApi.md +55 -62
  44. package/docs/PortfolioManagementApi.md +229 -309
  45. package/docs/ReferenceDataApi.md +66 -93
  46. package/docs/TradingApi.md +88 -117
  47. package/docs/TransactionsAndReportingApi.md +26 -28
  48. package/index.test.ts +2 -4
  49. package/models/index.ts +1 -0
  50. package/models/target-asset.ts +2 -2
  51. package/models/trading-cancel-user-account-order-request.ts +29 -0
  52. package/package.json +1 -1
@@ -1 +1 @@
1
- 8d97d665-66ac-4b6b-b534-28964884bb9b
1
+ ad266aa9-80cf-402e-ba8a-ca28db5f917a
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## snaptrade-typescript-sdk@5.0.0
1
+ ## snaptrade-typescript-sdk@6.1.0
2
2
 
3
3
  This library that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -28,7 +28,7 @@ npm run build
28
28
  navigate to the folder of your consuming project and run the following command.
29
29
 
30
30
  ```
31
- npm install snaptrade-typescript-sdk@5.0.0 --save
31
+ npm install snaptrade-typescript-sdk@6.1.0 --save
32
32
  ```
33
33
 
34
34
  ### Getting Started
@@ -51,9 +51,7 @@ async function main() {
51
51
  const userId = uuid();
52
52
  const { userSecret } = (
53
53
  await snaptrade.authentication.registerSnapTradeUser({
54
- requestBody: {
55
- userId,
56
- },
54
+ userId,
57
55
  })
58
56
  ).data;
59
57
 
@@ -751,27 +751,29 @@ export const AccountInformationApiFactory = function (configuration?: Configurat
751
751
  * @export
752
752
  * @interface AccountInformationApiGetAllUserHoldingsRequest
753
753
  */
754
- export interface AccountInformationApiGetAllUserHoldingsRequest {
754
+ export type AccountInformationApiGetAllUserHoldingsRequest = {
755
+
755
756
  /**
756
- *
757
- * @type {string}
758
- * @memberof AccountInformationApiGetAllUserHoldings
759
- */
757
+ *
758
+ * @type {string}
759
+ * @memberof AccountInformationApiGetAllUserHoldings
760
+ */
760
761
  readonly userId: string
761
-
762
+
762
763
  /**
763
- *
764
- * @type {string}
765
- * @memberof AccountInformationApiGetAllUserHoldings
766
- */
764
+ *
765
+ * @type {string}
766
+ * @memberof AccountInformationApiGetAllUserHoldings
767
+ */
767
768
  readonly userSecret: string
768
-
769
+
769
770
  /**
770
- * Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
771
- * @type {string}
772
- * @memberof AccountInformationApiGetAllUserHoldings
773
- */
771
+ * Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
772
+ * @type {string}
773
+ * @memberof AccountInformationApiGetAllUserHoldings
774
+ */
774
775
  readonly brokerageAuthorizations?: string
776
+
775
777
  }
776
778
 
777
779
  /**
@@ -779,27 +781,29 @@ export interface AccountInformationApiGetAllUserHoldingsRequest {
779
781
  * @export
780
782
  * @interface AccountInformationApiGetUserAccountBalanceRequest
781
783
  */
782
- export interface AccountInformationApiGetUserAccountBalanceRequest {
784
+ export type AccountInformationApiGetUserAccountBalanceRequest = {
785
+
783
786
  /**
784
- *
785
- * @type {string}
786
- * @memberof AccountInformationApiGetUserAccountBalance
787
- */
787
+ *
788
+ * @type {string}
789
+ * @memberof AccountInformationApiGetUserAccountBalance
790
+ */
788
791
  readonly userId: string
789
-
792
+
790
793
  /**
791
- *
792
- * @type {string}
793
- * @memberof AccountInformationApiGetUserAccountBalance
794
- */
794
+ *
795
+ * @type {string}
796
+ * @memberof AccountInformationApiGetUserAccountBalance
797
+ */
795
798
  readonly userSecret: string
796
-
799
+
797
800
  /**
798
- * The ID of the account get positions.
799
- * @type {string}
800
- * @memberof AccountInformationApiGetUserAccountBalance
801
- */
801
+ * The ID of the account get positions.
802
+ * @type {string}
803
+ * @memberof AccountInformationApiGetUserAccountBalance
804
+ */
802
805
  readonly accountId: string
806
+
803
807
  }
804
808
 
805
809
  /**
@@ -807,27 +811,29 @@ export interface AccountInformationApiGetUserAccountBalanceRequest {
807
811
  * @export
808
812
  * @interface AccountInformationApiGetUserAccountDetailsRequest
809
813
  */
810
- export interface AccountInformationApiGetUserAccountDetailsRequest {
814
+ export type AccountInformationApiGetUserAccountDetailsRequest = {
815
+
811
816
  /**
812
- *
813
- * @type {string}
814
- * @memberof AccountInformationApiGetUserAccountDetails
815
- */
817
+ *
818
+ * @type {string}
819
+ * @memberof AccountInformationApiGetUserAccountDetails
820
+ */
816
821
  readonly userId: string
817
-
822
+
818
823
  /**
819
- *
820
- * @type {string}
821
- * @memberof AccountInformationApiGetUserAccountDetails
822
- */
824
+ *
825
+ * @type {string}
826
+ * @memberof AccountInformationApiGetUserAccountDetails
827
+ */
823
828
  readonly userSecret: string
824
-
829
+
825
830
  /**
826
- * The ID of the account to get detail of.
827
- * @type {string}
828
- * @memberof AccountInformationApiGetUserAccountDetails
829
- */
831
+ * The ID of the account to get detail of.
832
+ * @type {string}
833
+ * @memberof AccountInformationApiGetUserAccountDetails
834
+ */
830
835
  readonly accountId: string
836
+
831
837
  }
832
838
 
833
839
  /**
@@ -835,34 +841,36 @@ export interface AccountInformationApiGetUserAccountDetailsRequest {
835
841
  * @export
836
842
  * @interface AccountInformationApiGetUserAccountOrdersRequest
837
843
  */
838
- export interface AccountInformationApiGetUserAccountOrdersRequest {
844
+ export type AccountInformationApiGetUserAccountOrdersRequest = {
845
+
839
846
  /**
840
- *
841
- * @type {string}
842
- * @memberof AccountInformationApiGetUserAccountOrders
843
- */
847
+ *
848
+ * @type {string}
849
+ * @memberof AccountInformationApiGetUserAccountOrders
850
+ */
844
851
  readonly userId: string
845
-
852
+
846
853
  /**
847
- *
848
- * @type {string}
849
- * @memberof AccountInformationApiGetUserAccountOrders
850
- */
854
+ *
855
+ * @type {string}
856
+ * @memberof AccountInformationApiGetUserAccountOrders
857
+ */
851
858
  readonly userSecret: string
852
-
859
+
853
860
  /**
854
- * The ID of the account get positions.
855
- * @type {string}
856
- * @memberof AccountInformationApiGetUserAccountOrders
857
- */
861
+ * The ID of the account get positions.
862
+ * @type {string}
863
+ * @memberof AccountInformationApiGetUserAccountOrders
864
+ */
858
865
  readonly accountId: string
859
-
866
+
860
867
  /**
861
- * defaults value is set to \"all\"
862
- * @type {'all' | 'open' | 'executed'}
863
- * @memberof AccountInformationApiGetUserAccountOrders
864
- */
868
+ * defaults value is set to \"all\"
869
+ * @type {'all' | 'open' | 'executed'}
870
+ * @memberof AccountInformationApiGetUserAccountOrders
871
+ */
865
872
  readonly state?: 'all' | 'open' | 'executed'
873
+
866
874
  }
867
875
 
868
876
  /**
@@ -870,27 +878,29 @@ export interface AccountInformationApiGetUserAccountOrdersRequest {
870
878
  * @export
871
879
  * @interface AccountInformationApiGetUserAccountPositionsRequest
872
880
  */
873
- export interface AccountInformationApiGetUserAccountPositionsRequest {
881
+ export type AccountInformationApiGetUserAccountPositionsRequest = {
882
+
874
883
  /**
875
- *
876
- * @type {string}
877
- * @memberof AccountInformationApiGetUserAccountPositions
878
- */
884
+ *
885
+ * @type {string}
886
+ * @memberof AccountInformationApiGetUserAccountPositions
887
+ */
879
888
  readonly userId: string
880
-
889
+
881
890
  /**
882
- *
883
- * @type {string}
884
- * @memberof AccountInformationApiGetUserAccountPositions
885
- */
891
+ *
892
+ * @type {string}
893
+ * @memberof AccountInformationApiGetUserAccountPositions
894
+ */
886
895
  readonly userSecret: string
887
-
896
+
888
897
  /**
889
- * The ID of the account get positions.
890
- * @type {string}
891
- * @memberof AccountInformationApiGetUserAccountPositions
892
- */
898
+ * The ID of the account get positions.
899
+ * @type {string}
900
+ * @memberof AccountInformationApiGetUserAccountPositions
901
+ */
893
902
  readonly accountId: string
903
+
894
904
  }
895
905
 
896
906
  /**
@@ -898,27 +908,29 @@ export interface AccountInformationApiGetUserAccountPositionsRequest {
898
908
  * @export
899
909
  * @interface AccountInformationApiGetUserHoldingsRequest
900
910
  */
901
- export interface AccountInformationApiGetUserHoldingsRequest {
911
+ export type AccountInformationApiGetUserHoldingsRequest = {
912
+
902
913
  /**
903
- * The ID of the account to fetch holdings for.
904
- * @type {string}
905
- * @memberof AccountInformationApiGetUserHoldings
906
- */
914
+ * The ID of the account to fetch holdings for.
915
+ * @type {string}
916
+ * @memberof AccountInformationApiGetUserHoldings
917
+ */
907
918
  readonly accountId: string
908
-
919
+
909
920
  /**
910
- *
911
- * @type {string}
912
- * @memberof AccountInformationApiGetUserHoldings
913
- */
921
+ *
922
+ * @type {string}
923
+ * @memberof AccountInformationApiGetUserHoldings
924
+ */
914
925
  readonly userId: string
915
-
926
+
916
927
  /**
917
- *
918
- * @type {string}
919
- * @memberof AccountInformationApiGetUserHoldings
920
- */
928
+ *
929
+ * @type {string}
930
+ * @memberof AccountInformationApiGetUserHoldings
931
+ */
921
932
  readonly userSecret: string
933
+
922
934
  }
923
935
 
924
936
  /**
@@ -926,20 +938,22 @@ export interface AccountInformationApiGetUserHoldingsRequest {
926
938
  * @export
927
939
  * @interface AccountInformationApiListUserAccountsRequest
928
940
  */
929
- export interface AccountInformationApiListUserAccountsRequest {
941
+ export type AccountInformationApiListUserAccountsRequest = {
942
+
930
943
  /**
931
- *
932
- * @type {string}
933
- * @memberof AccountInformationApiListUserAccounts
934
- */
944
+ *
945
+ * @type {string}
946
+ * @memberof AccountInformationApiListUserAccounts
947
+ */
935
948
  readonly userId: string
936
-
949
+
937
950
  /**
938
- *
939
- * @type {string}
940
- * @memberof AccountInformationApiListUserAccounts
941
- */
951
+ *
952
+ * @type {string}
953
+ * @memberof AccountInformationApiListUserAccounts
954
+ */
942
955
  readonly userSecret: string
956
+
943
957
  }
944
958
 
945
959
  /**
@@ -947,27 +961,29 @@ export interface AccountInformationApiListUserAccountsRequest {
947
961
  * @export
948
962
  * @interface AccountInformationApiUpdateUserAccountRequest
949
963
  */
950
- export interface AccountInformationApiUpdateUserAccountRequest {
964
+ export type AccountInformationApiUpdateUserAccountRequest = {
965
+
951
966
  /**
952
- *
953
- * @type {string}
954
- * @memberof AccountInformationApiUpdateUserAccount
955
- */
967
+ *
968
+ * @type {string}
969
+ * @memberof AccountInformationApiUpdateUserAccount
970
+ */
956
971
  readonly userId: string
957
-
972
+
958
973
  /**
959
- *
960
- * @type {string}
961
- * @memberof AccountInformationApiUpdateUserAccount
962
- */
974
+ *
975
+ * @type {string}
976
+ * @memberof AccountInformationApiUpdateUserAccount
977
+ */
963
978
  readonly userSecret: string
964
-
979
+
965
980
  /**
966
- * The ID of the account to update.
967
- * @type {string}
968
- * @memberof AccountInformationApiUpdateUserAccount
969
- */
981
+ * The ID of the account to update.
982
+ * @type {string}
983
+ * @memberof AccountInformationApiUpdateUserAccount
984
+ */
970
985
  readonly accountId: string
986
+
971
987
  }
972
988
 
973
989
  /**
@@ -115,7 +115,7 @@ export const ApiDisclaimerApiFp = function(configuration?: Configuration) {
115
115
  * @throws {RequiredError}
116
116
  */
117
117
  async accept(requestParameters: ApiDisclaimerApiAcceptRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SnapTradeAPIDisclaimerAcceptStatus>> {
118
- const localVarAxiosArgs = await localVarAxiosParamCreator.accept(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options);
118
+ const localVarAxiosArgs = await localVarAxiosParamCreator.accept(requestParameters.userId, requestParameters.userSecret, requestParameters, options);
119
119
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
120
120
  },
121
121
  }
@@ -146,28 +146,23 @@ export const ApiDisclaimerApiFactory = function (configuration?: Configuration,
146
146
  * @export
147
147
  * @interface ApiDisclaimerApiAcceptRequest
148
148
  */
149
- export interface ApiDisclaimerApiAcceptRequest {
149
+ export type ApiDisclaimerApiAcceptRequest = {
150
+
150
151
  /**
151
- *
152
- * @type {string}
153
- * @memberof ApiDisclaimerApiAccept
154
- */
152
+ *
153
+ * @type {string}
154
+ * @memberof ApiDisclaimerApiAccept
155
+ */
155
156
  readonly userId: string
156
-
157
+
157
158
  /**
158
- *
159
- * @type {string}
160
- * @memberof ApiDisclaimerApiAccept
161
- */
159
+ *
160
+ * @type {string}
161
+ * @memberof ApiDisclaimerApiAccept
162
+ */
162
163
  readonly userSecret: string
163
-
164
- /**
165
- *
166
- * @type {APIDisclaimerAcceptRequest}
167
- * @memberof ApiDisclaimerApiAccept
168
- */
169
- readonly requestBody: APIDisclaimerAcceptRequest
170
- }
164
+
165
+ } & APIDisclaimerAcceptRequest
171
166
 
172
167
  /**
173
168
  * ApiDisclaimerApi - object-oriented interface
@@ -370,7 +370,7 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
370
370
  * @throws {RequiredError}
371
371
  */
372
372
  async loginSnapTradeUser(requestParameters: AuthenticationApiLoginSnapTradeUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthenticationLoginSnapTradeUser200Response>> {
373
- const localVarAxiosArgs = await localVarAxiosParamCreator.loginSnapTradeUser(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options);
373
+ const localVarAxiosArgs = await localVarAxiosParamCreator.loginSnapTradeUser(requestParameters.userId, requestParameters.userSecret, requestParameters, options);
374
374
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
375
375
  },
376
376
  /**
@@ -381,7 +381,7 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
381
381
  * @throws {RequiredError}
382
382
  */
383
383
  async registerSnapTradeUser(requestParameters: AuthenticationApiRegisterSnapTradeUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserIDandSecret>> {
384
- const localVarAxiosArgs = await localVarAxiosParamCreator.registerSnapTradeUser(requestParameters.requestBody, options);
384
+ const localVarAxiosArgs = await localVarAxiosParamCreator.registerSnapTradeUser(requestParameters, options);
385
385
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
386
386
  },
387
387
  }
@@ -451,13 +451,15 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
451
451
  * @export
452
452
  * @interface AuthenticationApiDeleteSnapTradeUserRequest
453
453
  */
454
- export interface AuthenticationApiDeleteSnapTradeUserRequest {
454
+ export type AuthenticationApiDeleteSnapTradeUserRequest = {
455
+
455
456
  /**
456
- *
457
- * @type {string}
458
- * @memberof AuthenticationApiDeleteSnapTradeUser
459
- */
457
+ *
458
+ * @type {string}
459
+ * @memberof AuthenticationApiDeleteSnapTradeUser
460
+ */
460
461
  readonly userId: string
462
+
461
463
  }
462
464
 
463
465
  /**
@@ -465,20 +467,22 @@ export interface AuthenticationApiDeleteSnapTradeUserRequest {
465
467
  * @export
466
468
  * @interface AuthenticationApiGetUserJWTRequest
467
469
  */
468
- export interface AuthenticationApiGetUserJWTRequest {
470
+ export type AuthenticationApiGetUserJWTRequest = {
471
+
469
472
  /**
470
- *
471
- * @type {string}
472
- * @memberof AuthenticationApiGetUserJWT
473
- */
473
+ *
474
+ * @type {string}
475
+ * @memberof AuthenticationApiGetUserJWT
476
+ */
474
477
  readonly userId: string
475
-
478
+
476
479
  /**
477
- *
478
- * @type {string}
479
- * @memberof AuthenticationApiGetUserJWT
480
- */
480
+ *
481
+ * @type {string}
482
+ * @memberof AuthenticationApiGetUserJWT
483
+ */
481
484
  readonly userSecret: string
485
+
482
486
  }
483
487
 
484
488
  /**
@@ -486,42 +490,32 @@ export interface AuthenticationApiGetUserJWTRequest {
486
490
  * @export
487
491
  * @interface AuthenticationApiLoginSnapTradeUserRequest
488
492
  */
489
- export interface AuthenticationApiLoginSnapTradeUserRequest {
493
+ export type AuthenticationApiLoginSnapTradeUserRequest = {
494
+
490
495
  /**
491
- *
492
- * @type {string}
493
- * @memberof AuthenticationApiLoginSnapTradeUser
494
- */
496
+ *
497
+ * @type {string}
498
+ * @memberof AuthenticationApiLoginSnapTradeUser
499
+ */
495
500
  readonly userId: string
496
-
501
+
497
502
  /**
498
- *
499
- * @type {string}
500
- * @memberof AuthenticationApiLoginSnapTradeUser
501
- */
503
+ *
504
+ * @type {string}
505
+ * @memberof AuthenticationApiLoginSnapTradeUser
506
+ */
502
507
  readonly userSecret: string
503
-
504
- /**
505
- *
506
- * @type {SnapTradeLoginUserRequestBody}
507
- * @memberof AuthenticationApiLoginSnapTradeUser
508
- */
509
- readonly requestBody?: SnapTradeLoginUserRequestBody
510
- }
508
+
509
+ } & SnapTradeLoginUserRequestBody
511
510
 
512
511
  /**
513
512
  * Request parameters for registerSnapTradeUser operation in AuthenticationApi.
514
513
  * @export
515
514
  * @interface AuthenticationApiRegisterSnapTradeUserRequest
516
515
  */
517
- export interface AuthenticationApiRegisterSnapTradeUserRequest {
518
- /**
519
- *
520
- * @type {SnapTradeRegisterUserRequestBody}
521
- * @memberof AuthenticationApiRegisterSnapTradeUser
522
- */
523
- readonly requestBody: SnapTradeRegisterUserRequestBody
524
- }
516
+ export type AuthenticationApiRegisterSnapTradeUserRequest = {
517
+
518
+ } & SnapTradeRegisterUserRequestBody
525
519
 
526
520
  /**
527
521
  * AuthenticationApi - object-oriented interface