snaptrade-typescript-sdk 6.1.0 → 6.3.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 +3 -2
- package/api/account-information-api.ts +57 -89
- package/api/api-disclaimer-api.ts +10 -13
- package/api/api-status-api.ts +5 -6
- package/api/authentication-api.ts +40 -58
- package/api/connections-api.ts +133 -33
- package/api/error-logs-api.ts +8 -12
- package/api/options-api.ts +40 -58
- package/api/portfolio-management-api.ts +248 -372
- package/api/reference-data-api.ts +82 -124
- package/api/trading-api.ts +81 -116
- package/api/transactions-and-reporting-api.ts +29 -25
- package/common.ts +35 -15
- package/configuration.ts +3 -2
- package/dist/api/account-information-api.js +24 -24
- package/dist/api/api-disclaimer-api.js +5 -4
- package/dist/api/authentication-api.js +19 -17
- package/dist/api/connections-api.d.ts +54 -0
- package/dist/api/connections-api.js +118 -9
- package/dist/api/error-logs-api.js +3 -3
- package/dist/api/options-api.js +19 -17
- package/dist/api/portfolio-management-api.js +115 -107
- package/dist/api/reference-data-api.js +37 -35
- package/dist/api/trading-api.js +40 -35
- package/dist/api/transactions-and-reporting-api.d.ts +8 -1
- package/dist/api/transactions-and-reporting-api.js +12 -8
- package/dist/common.d.ts +8 -1
- package/dist/common.js +21 -14
- package/dist/configuration.js +3 -2
- package/dist/models/account-order-record.d.ts +7 -0
- package/dist/models/connections-session-events200-response-inner.d.ts +17 -0
- package/dist/models/connections-session-events200-response-inner.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/session-event.d.ts +59 -0
- package/dist/models/session-event.js +25 -0
- package/dist/requestBeforeHook.d.ts +1 -0
- package/docs/ConnectionsApi.md +55 -0
- package/docs/TransactionsAndReportingApi.md +2 -0
- package/models/account-order-record.ts +9 -0
- package/models/connections-session-events200-response-inner.ts +25 -0
- package/models/index.ts +2 -0
- package/models/session-event.ts +68 -0
- package/package.json +1 -1
- package/requestBeforeHook.ts +1 -0
package/dist/api/trading-api.js
CHANGED
|
@@ -125,21 +125,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
125
125
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
126
126
|
localVarQueryParameter = {};
|
|
127
127
|
// authentication PartnerClientId required
|
|
128
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
128
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
129
129
|
// authentication PartnerSignature required
|
|
130
130
|
];
|
|
131
131
|
case 1:
|
|
132
132
|
// authentication PartnerClientId required
|
|
133
133
|
_a.sent();
|
|
134
134
|
// authentication PartnerSignature required
|
|
135
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
135
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
136
136
|
// authentication PartnerTimestamp required
|
|
137
137
|
];
|
|
138
138
|
case 2:
|
|
139
139
|
// authentication PartnerSignature required
|
|
140
140
|
_a.sent();
|
|
141
141
|
// authentication PartnerTimestamp required
|
|
142
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
142
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
143
143
|
case 3:
|
|
144
144
|
// authentication PartnerTimestamp required
|
|
145
145
|
_a.sent();
|
|
@@ -152,13 +152,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
152
152
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
153
153
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
154
154
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
155
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration);
|
|
156
155
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
156
|
+
requestBody: tradingCancelUserAccountOrderRequest,
|
|
157
157
|
queryParameters: localVarQueryParameter,
|
|
158
158
|
requestConfig: localVarRequestOptions,
|
|
159
159
|
path: localVarPath,
|
|
160
160
|
configuration: configuration
|
|
161
161
|
});
|
|
162
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration);
|
|
162
163
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
163
164
|
return [2 /*return*/, {
|
|
164
165
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -202,21 +203,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
202
203
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
203
204
|
localVarQueryParameter = {};
|
|
204
205
|
// authentication PartnerClientId required
|
|
205
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
206
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
206
207
|
// authentication PartnerSignature required
|
|
207
208
|
];
|
|
208
209
|
case 1:
|
|
209
210
|
// authentication PartnerClientId required
|
|
210
211
|
_a.sent();
|
|
211
212
|
// authentication PartnerSignature required
|
|
212
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
213
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
213
214
|
// authentication PartnerTimestamp required
|
|
214
215
|
];
|
|
215
216
|
case 2:
|
|
216
217
|
// authentication PartnerSignature required
|
|
217
218
|
_a.sent();
|
|
218
219
|
// authentication PartnerTimestamp required
|
|
219
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
220
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
220
221
|
case 3:
|
|
221
222
|
// authentication PartnerTimestamp required
|
|
222
223
|
_a.sent();
|
|
@@ -267,21 +268,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
267
268
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
268
269
|
localVarQueryParameter = {};
|
|
269
270
|
// authentication PartnerClientId required
|
|
270
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
271
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
271
272
|
// authentication PartnerSignature required
|
|
272
273
|
];
|
|
273
274
|
case 1:
|
|
274
275
|
// authentication PartnerClientId required
|
|
275
276
|
_a.sent();
|
|
276
277
|
// authentication PartnerSignature required
|
|
277
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
278
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
278
279
|
// authentication PartnerTimestamp required
|
|
279
280
|
];
|
|
280
281
|
case 2:
|
|
281
282
|
// authentication PartnerSignature required
|
|
282
283
|
_a.sent();
|
|
283
284
|
// authentication PartnerTimestamp required
|
|
284
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
285
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
285
286
|
case 3:
|
|
286
287
|
// authentication PartnerTimestamp required
|
|
287
288
|
_a.sent();
|
|
@@ -333,21 +334,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
333
334
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
334
335
|
localVarQueryParameter = {};
|
|
335
336
|
// authentication PartnerClientId required
|
|
336
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
337
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
337
338
|
// authentication PartnerSignature required
|
|
338
339
|
];
|
|
339
340
|
case 1:
|
|
340
341
|
// authentication PartnerClientId required
|
|
341
342
|
_a.sent();
|
|
342
343
|
// authentication PartnerSignature required
|
|
343
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
344
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
344
345
|
// authentication PartnerTimestamp required
|
|
345
346
|
];
|
|
346
347
|
case 2:
|
|
347
348
|
// authentication PartnerSignature required
|
|
348
349
|
_a.sent();
|
|
349
350
|
// authentication PartnerTimestamp required
|
|
350
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
351
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
351
352
|
case 3:
|
|
352
353
|
// authentication PartnerTimestamp required
|
|
353
354
|
_a.sent();
|
|
@@ -360,13 +361,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
360
361
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
361
362
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
362
363
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
363
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
|
|
364
364
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
365
|
+
requestBody: manualTradeForm,
|
|
365
366
|
queryParameters: localVarQueryParameter,
|
|
366
367
|
requestConfig: localVarRequestOptions,
|
|
367
368
|
path: localVarPath,
|
|
368
369
|
configuration: configuration
|
|
369
370
|
});
|
|
371
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
|
|
370
372
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
371
373
|
return [2 /*return*/, {
|
|
372
374
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -412,21 +414,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
412
414
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
413
415
|
localVarQueryParameter = {};
|
|
414
416
|
// authentication PartnerClientId required
|
|
415
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
417
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
416
418
|
// authentication PartnerSignature required
|
|
417
419
|
];
|
|
418
420
|
case 1:
|
|
419
421
|
// authentication PartnerClientId required
|
|
420
422
|
_a.sent();
|
|
421
423
|
// authentication PartnerSignature required
|
|
422
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
424
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
423
425
|
// authentication PartnerTimestamp required
|
|
424
426
|
];
|
|
425
427
|
case 2:
|
|
426
428
|
// authentication PartnerSignature required
|
|
427
429
|
_a.sent();
|
|
428
430
|
// authentication PartnerTimestamp required
|
|
429
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
431
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
430
432
|
case 3:
|
|
431
433
|
// authentication PartnerTimestamp required
|
|
432
434
|
_a.sent();
|
|
@@ -494,34 +496,35 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
494
496
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
495
497
|
localVarQueryParameter = {};
|
|
496
498
|
// authentication PartnerClientId required
|
|
497
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
499
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
498
500
|
// authentication PartnerSignature required
|
|
499
501
|
];
|
|
500
502
|
case 1:
|
|
501
503
|
// authentication PartnerClientId required
|
|
502
504
|
_a.sent();
|
|
503
505
|
// authentication PartnerSignature required
|
|
504
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
506
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
505
507
|
// authentication PartnerTimestamp required
|
|
506
508
|
];
|
|
507
509
|
case 2:
|
|
508
510
|
// authentication PartnerSignature required
|
|
509
511
|
_a.sent();
|
|
510
512
|
// authentication PartnerTimestamp required
|
|
511
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
513
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
512
514
|
case 3:
|
|
513
515
|
// authentication PartnerTimestamp required
|
|
514
516
|
_a.sent();
|
|
515
517
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
516
518
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
517
519
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
518
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(trade, localVarRequestOptions, configuration);
|
|
519
520
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
521
|
+
requestBody: trade,
|
|
520
522
|
queryParameters: localVarQueryParameter,
|
|
521
523
|
requestConfig: localVarRequestOptions,
|
|
522
524
|
path: localVarPath,
|
|
523
525
|
configuration: configuration
|
|
524
526
|
});
|
|
527
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(trade, localVarRequestOptions, configuration);
|
|
525
528
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
526
529
|
return [2 /*return*/, {
|
|
527
530
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -561,21 +564,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
561
564
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
562
565
|
localVarQueryParameter = {};
|
|
563
566
|
// authentication PartnerClientId required
|
|
564
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
567
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
565
568
|
// authentication PartnerSignature required
|
|
566
569
|
];
|
|
567
570
|
case 1:
|
|
568
571
|
// authentication PartnerClientId required
|
|
569
572
|
_a.sent();
|
|
570
573
|
// authentication PartnerSignature required
|
|
571
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
574
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
572
575
|
// authentication PartnerTimestamp required
|
|
573
576
|
];
|
|
574
577
|
case 2:
|
|
575
578
|
// authentication PartnerSignature required
|
|
576
579
|
_a.sent();
|
|
577
580
|
// authentication PartnerTimestamp required
|
|
578
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
581
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
579
582
|
case 3:
|
|
580
583
|
// authentication PartnerTimestamp required
|
|
581
584
|
_a.sent();
|
|
@@ -627,21 +630,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
627
630
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
628
631
|
localVarQueryParameter = {};
|
|
629
632
|
// authentication PartnerClientId required
|
|
630
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
633
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
631
634
|
// authentication PartnerSignature required
|
|
632
635
|
];
|
|
633
636
|
case 1:
|
|
634
637
|
// authentication PartnerClientId required
|
|
635
638
|
_a.sent();
|
|
636
639
|
// authentication PartnerSignature required
|
|
637
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
640
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
638
641
|
// authentication PartnerTimestamp required
|
|
639
642
|
];
|
|
640
643
|
case 2:
|
|
641
644
|
// authentication PartnerSignature required
|
|
642
645
|
_a.sent();
|
|
643
646
|
// authentication PartnerTimestamp required
|
|
644
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
647
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
645
648
|
case 3:
|
|
646
649
|
// authentication PartnerTimestamp required
|
|
647
650
|
_a.sent();
|
|
@@ -654,13 +657,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
654
657
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
655
658
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
656
659
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
657
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
|
|
658
660
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
661
|
+
requestBody: manualTradeForm,
|
|
659
662
|
queryParameters: localVarQueryParameter,
|
|
660
663
|
requestConfig: localVarRequestOptions,
|
|
661
664
|
path: localVarPath,
|
|
662
665
|
configuration: configuration
|
|
663
666
|
});
|
|
667
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
|
|
664
668
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
665
669
|
return [2 /*return*/, {
|
|
666
670
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -701,21 +705,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
701
705
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
702
706
|
localVarQueryParameter = {};
|
|
703
707
|
// authentication PartnerClientId required
|
|
704
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
708
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
705
709
|
// authentication PartnerSignature required
|
|
706
710
|
];
|
|
707
711
|
case 1:
|
|
708
712
|
// authentication PartnerClientId required
|
|
709
713
|
_a.sent();
|
|
710
714
|
// authentication PartnerSignature required
|
|
711
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
715
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
712
716
|
// authentication PartnerTimestamp required
|
|
713
717
|
];
|
|
714
718
|
case 2:
|
|
715
719
|
// authentication PartnerSignature required
|
|
716
720
|
_a.sent();
|
|
717
721
|
// authentication PartnerTimestamp required
|
|
718
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
722
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
719
723
|
case 3:
|
|
720
724
|
// authentication PartnerTimestamp required
|
|
721
725
|
_a.sent();
|
|
@@ -728,13 +732,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
728
732
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
729
733
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
730
734
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
731
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration);
|
|
732
735
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
736
|
+
requestBody: tradingPlaceOCOOrderRequest,
|
|
733
737
|
queryParameters: localVarQueryParameter,
|
|
734
738
|
requestConfig: localVarRequestOptions,
|
|
735
739
|
path: localVarPath,
|
|
736
740
|
configuration: configuration
|
|
737
741
|
});
|
|
742
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration);
|
|
738
743
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
739
744
|
return [2 /*return*/, {
|
|
740
745
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -776,21 +781,21 @@ var TradingApiAxiosParamCreator = function (configuration) {
|
|
|
776
781
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
777
782
|
localVarQueryParameter = {};
|
|
778
783
|
// authentication PartnerClientId required
|
|
779
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
784
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
780
785
|
// authentication PartnerSignature required
|
|
781
786
|
];
|
|
782
787
|
case 1:
|
|
783
788
|
// authentication PartnerClientId required
|
|
784
789
|
_a.sent();
|
|
785
790
|
// authentication PartnerSignature required
|
|
786
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
791
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
787
792
|
// authentication PartnerTimestamp required
|
|
788
793
|
];
|
|
789
794
|
case 2:
|
|
790
795
|
// authentication PartnerSignature required
|
|
791
796
|
_a.sent();
|
|
792
797
|
// authentication PartnerTimestamp required
|
|
793
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
798
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
794
799
|
case 3:
|
|
795
800
|
// authentication PartnerTimestamp required
|
|
796
801
|
_a.sent();
|
|
@@ -27,10 +27,11 @@ export declare const TransactionsAndReportingApiAxiosParamCreator: (configuratio
|
|
|
27
27
|
* @param {string} [startDate]
|
|
28
28
|
* @param {string} [endDate]
|
|
29
29
|
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
30
|
+
* @param {string} [brokerageAuthorizations] Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
|
|
30
31
|
* @param {*} [options] Override http request option.
|
|
31
32
|
* @throws {RequiredError}
|
|
32
33
|
*/
|
|
33
|
-
getActivities: (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
|
+
getActivities: (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, brokerageAuthorizations?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
35
|
/**
|
|
35
36
|
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
36
37
|
* @summary Get performance information for a specific timeframe
|
|
@@ -126,6 +127,12 @@ export type TransactionsAndReportingApiGetActivitiesRequest = {
|
|
|
126
127
|
* @memberof TransactionsAndReportingApiGetActivities
|
|
127
128
|
*/
|
|
128
129
|
readonly accounts?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
|
|
132
|
+
* @type {string}
|
|
133
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
134
|
+
*/
|
|
135
|
+
readonly brokerageAuthorizations?: string;
|
|
129
136
|
};
|
|
130
137
|
/**
|
|
131
138
|
* Request parameters for getReportingCustomRange operation in TransactionsAndReportingApi.
|
|
@@ -98,10 +98,11 @@ var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
|
|
|
98
98
|
* @param {string} [startDate]
|
|
99
99
|
* @param {string} [endDate]
|
|
100
100
|
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
101
|
+
* @param {string} [brokerageAuthorizations] Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
|
|
101
102
|
* @param {*} [options] Override http request option.
|
|
102
103
|
* @throws {RequiredError}
|
|
103
104
|
*/
|
|
104
|
-
getActivities: function (userId, userSecret, startDate, endDate, accounts, options) {
|
|
105
|
+
getActivities: function (userId, userSecret, startDate, endDate, accounts, brokerageAuthorizations, options) {
|
|
105
106
|
if (options === void 0) { options = {}; }
|
|
106
107
|
return __awaiter(_this, void 0, void 0, function () {
|
|
107
108
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -121,21 +122,21 @@ var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
|
|
|
121
122
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
122
123
|
localVarQueryParameter = {};
|
|
123
124
|
// authentication PartnerClientId required
|
|
124
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
125
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
125
126
|
// authentication PartnerSignature required
|
|
126
127
|
];
|
|
127
128
|
case 1:
|
|
128
129
|
// authentication PartnerClientId required
|
|
129
130
|
_a.sent();
|
|
130
131
|
// authentication PartnerSignature required
|
|
131
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
132
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
132
133
|
// authentication PartnerTimestamp required
|
|
133
134
|
];
|
|
134
135
|
case 2:
|
|
135
136
|
// authentication PartnerSignature required
|
|
136
137
|
_a.sent();
|
|
137
138
|
// authentication PartnerTimestamp required
|
|
138
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
139
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
139
140
|
case 3:
|
|
140
141
|
// authentication PartnerTimestamp required
|
|
141
142
|
_a.sent();
|
|
@@ -148,6 +149,9 @@ var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
|
|
|
148
149
|
if (accounts !== undefined) {
|
|
149
150
|
localVarQueryParameter['accounts'] = accounts;
|
|
150
151
|
}
|
|
152
|
+
if (brokerageAuthorizations !== undefined) {
|
|
153
|
+
localVarQueryParameter['brokerageAuthorizations'] = brokerageAuthorizations;
|
|
154
|
+
}
|
|
151
155
|
if (userId !== undefined) {
|
|
152
156
|
localVarQueryParameter['userId'] = userId;
|
|
153
157
|
}
|
|
@@ -208,21 +212,21 @@ var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
|
|
|
208
212
|
localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
|
|
209
213
|
localVarQueryParameter = {};
|
|
210
214
|
// authentication PartnerClientId required
|
|
211
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
|
|
215
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "clientId", configuration: configuration })
|
|
212
216
|
// authentication PartnerSignature required
|
|
213
217
|
];
|
|
214
218
|
case 1:
|
|
215
219
|
// authentication PartnerClientId required
|
|
216
220
|
_a.sent();
|
|
217
221
|
// authentication PartnerSignature required
|
|
218
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
|
|
222
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, keyParamName: "Signature", configuration: configuration })
|
|
219
223
|
// authentication PartnerTimestamp required
|
|
220
224
|
];
|
|
221
225
|
case 2:
|
|
222
226
|
// authentication PartnerSignature required
|
|
223
227
|
_a.sent();
|
|
224
228
|
// authentication PartnerTimestamp required
|
|
225
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
|
|
229
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, keyParamName: "timestamp", configuration: configuration })];
|
|
226
230
|
case 3:
|
|
227
231
|
// authentication PartnerTimestamp required
|
|
228
232
|
_a.sent();
|
|
@@ -286,7 +290,7 @@ var TransactionsAndReportingApiFp = function (configuration) {
|
|
|
286
290
|
var localVarAxiosArgs;
|
|
287
291
|
return __generator(this, function (_a) {
|
|
288
292
|
switch (_a.label) {
|
|
289
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, options)];
|
|
293
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, requestParameters.brokerageAuthorizations, options)];
|
|
290
294
|
case 1:
|
|
291
295
|
localVarAxiosArgs = _a.sent();
|
|
292
296
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
package/dist/common.d.ts
CHANGED
|
@@ -27,7 +27,14 @@ export declare const assertParamExists: (functionName: string, paramName: string
|
|
|
27
27
|
*
|
|
28
28
|
* @export
|
|
29
29
|
*/
|
|
30
|
-
export declare const setApiKeyToObject: (object
|
|
30
|
+
export declare const setApiKeyToObject: ({ object, key, type, keyParamName, configuration, prefix }: {
|
|
31
|
+
object: any;
|
|
32
|
+
key?: string;
|
|
33
|
+
type?: "Cookie";
|
|
34
|
+
keyParamName: string;
|
|
35
|
+
configuration?: Configuration;
|
|
36
|
+
prefix?: string;
|
|
37
|
+
}) => Promise<void>;
|
|
31
38
|
/**
|
|
32
39
|
*
|
|
33
40
|
* @export
|
package/dist/common.js
CHANGED
|
@@ -83,31 +83,38 @@ exports.assertParamExists = assertParamExists;
|
|
|
83
83
|
*
|
|
84
84
|
* @export
|
|
85
85
|
*/
|
|
86
|
-
var setApiKeyToObject = function (
|
|
86
|
+
var setApiKeyToObject = function (_a) {
|
|
87
|
+
var object = _a.object, key = _a.key, type = _a.type, keyParamName = _a.keyParamName, configuration = _a.configuration, prefix = _a.prefix;
|
|
87
88
|
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
var
|
|
89
|
-
return __generator(this, function (
|
|
90
|
-
switch (
|
|
89
|
+
var apiKey;
|
|
90
|
+
return __generator(this, function (_b) {
|
|
91
|
+
switch (_b.label) {
|
|
91
92
|
case 0:
|
|
93
|
+
key = key ? key : keyParamName;
|
|
94
|
+
apiKey = null;
|
|
92
95
|
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 3];
|
|
93
|
-
if (!(typeof configuration.apiKey ===
|
|
94
|
-
_a = object;
|
|
95
|
-
_b = keyParamName;
|
|
96
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
96
97
|
return [4 /*yield*/, configuration.apiKey(keyParamName)];
|
|
97
98
|
case 1:
|
|
98
|
-
|
|
99
|
+
apiKey = _b.sent();
|
|
99
100
|
return [3 /*break*/, 3];
|
|
100
101
|
case 2:
|
|
101
|
-
if (typeof configuration.apiKey ===
|
|
102
|
-
|
|
103
|
-
else if (typeof configuration.apiKey ===
|
|
102
|
+
if (typeof configuration.apiKey === 'string')
|
|
103
|
+
apiKey = configuration.apiKey;
|
|
104
|
+
else if (typeof configuration.apiKey === 'object') {
|
|
104
105
|
if (keyParamName in configuration.apiKey)
|
|
105
|
-
|
|
106
|
+
apiKey = configuration.apiKey[keyParamName];
|
|
106
107
|
}
|
|
107
108
|
else
|
|
108
109
|
throw Error("Unexpected type ".concat(typeof configuration.apiKey, " for Configuration.apiKey"));
|
|
109
|
-
|
|
110
|
-
case 3:
|
|
110
|
+
_b.label = 3;
|
|
111
|
+
case 3:
|
|
112
|
+
if (!apiKey)
|
|
113
|
+
return [2 /*return*/];
|
|
114
|
+
object[key] = prefix !== undefined ? "".concat(prefix).concat(apiKey) : apiKey;
|
|
115
|
+
if (type === "Cookie")
|
|
116
|
+
object[key] = "".concat(keyParamName, "=").concat(object[key]);
|
|
117
|
+
return [2 /*return*/];
|
|
111
118
|
}
|
|
112
119
|
});
|
|
113
120
|
});
|
package/dist/configuration.js
CHANGED
|
@@ -17,6 +17,7 @@ exports.Configuration = void 0;
|
|
|
17
17
|
var Configuration = /** @class */ (function () {
|
|
18
18
|
function Configuration(param) {
|
|
19
19
|
if (param === void 0) { param = {}; }
|
|
20
|
+
var _a;
|
|
20
21
|
this.consumerKey = param.consumerKey;
|
|
21
22
|
this.apiKey = param.apiKey;
|
|
22
23
|
if (this.apiKey === undefined) {
|
|
@@ -32,8 +33,8 @@ var Configuration = /** @class */ (function () {
|
|
|
32
33
|
this.password = param.password;
|
|
33
34
|
this.accessToken = param.accessToken;
|
|
34
35
|
this.basePath = param.basePath;
|
|
35
|
-
this.baseOptions = param.baseOptions;
|
|
36
|
-
this.userAgent = param.userAgent === undefined ? "Konfig/6.
|
|
36
|
+
this.baseOptions = (_a = param.baseOptions) !== null && _a !== void 0 ? _a : {};
|
|
37
|
+
this.userAgent = param.userAgent === undefined ? "Konfig/6.3.0/typescript" : param.userAgent;
|
|
37
38
|
this.formDataCtor = param.formDataCtor;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
13
13
|
import { Action } from './action';
|
|
14
|
+
import { OptionsSymbol } from './options-symbol';
|
|
14
15
|
import { OrderType } from './order-type';
|
|
15
16
|
import { TimeInForce } from './time-in-force';
|
|
16
17
|
import { UniversalSymbol } from './universal-symbol';
|
|
@@ -45,6 +46,12 @@ export interface AccountOrderRecord {
|
|
|
45
46
|
* @memberof AccountOrderRecord
|
|
46
47
|
*/
|
|
47
48
|
'universal_symbol'?: UniversalSymbol;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {OptionsSymbol}
|
|
52
|
+
* @memberof AccountOrderRecord
|
|
53
|
+
*/
|
|
54
|
+
'option_symbol'?: OptionsSymbol;
|
|
48
55
|
/**
|
|
49
56
|
*
|
|
50
57
|
* @type {Action}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SnapTrade
|
|
3
|
+
* Connect brokerage accounts to your app for live positions and trading
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: api@snaptrade.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
9
|
+
* https://konfigthis.com
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { SessionEvent } from './session-event';
|
|
13
|
+
/**
|
|
14
|
+
* @type ConnectionsSessionEvents200ResponseInner
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export type ConnectionsSessionEvents200ResponseInner = SessionEvent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* SnapTrade
|
|
6
|
+
* Connect brokerage accounts to your app for live positions and trading
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: api@snaptrade.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
12
|
+
* https://konfigthis.com
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './brokerage-symbol';
|
|
|
16
16
|
export * from './brokerage-type';
|
|
17
17
|
export * from './calculated-trade';
|
|
18
18
|
export * from './cash-restriction';
|
|
19
|
+
export * from './connections-session-events200-response-inner';
|
|
19
20
|
export * from './currency';
|
|
20
21
|
export * from './delete-user-response';
|
|
21
22
|
export * from './dividend-at-date';
|
|
@@ -68,6 +69,7 @@ export * from './position';
|
|
|
68
69
|
export * from './position-symbol';
|
|
69
70
|
export * from './redirect-tokenand-pin';
|
|
70
71
|
export * from './security-type';
|
|
72
|
+
export * from './session-event';
|
|
71
73
|
export * from './snap-trade-apidisclaimer-accept-status';
|
|
72
74
|
export * from './snap-trade-holdings-account';
|
|
73
75
|
export * from './snap-trade-holdings-total-value';
|
package/dist/models/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __exportStar(require("./brokerage-symbol"), exports);
|
|
|
32
32
|
__exportStar(require("./brokerage-type"), exports);
|
|
33
33
|
__exportStar(require("./calculated-trade"), exports);
|
|
34
34
|
__exportStar(require("./cash-restriction"), exports);
|
|
35
|
+
__exportStar(require("./connections-session-events200-response-inner"), exports);
|
|
35
36
|
__exportStar(require("./currency"), exports);
|
|
36
37
|
__exportStar(require("./delete-user-response"), exports);
|
|
37
38
|
__exportStar(require("./dividend-at-date"), exports);
|
|
@@ -84,6 +85,7 @@ __exportStar(require("./position"), exports);
|
|
|
84
85
|
__exportStar(require("./position-symbol"), exports);
|
|
85
86
|
__exportStar(require("./redirect-tokenand-pin"), exports);
|
|
86
87
|
__exportStar(require("./security-type"), exports);
|
|
88
|
+
__exportStar(require("./session-event"), exports);
|
|
87
89
|
__exportStar(require("./snap-trade-apidisclaimer-accept-status"), exports);
|
|
88
90
|
__exportStar(require("./snap-trade-holdings-account"), exports);
|
|
89
91
|
__exportStar(require("./snap-trade-holdings-total-value"), exports);
|