snaptrade-typescript-sdk 9.0.14 → 9.0.16
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 +32 -55
- package/dist/api/account-information-api-generated.d.ts +24 -24
- package/dist/api/account-information-api-generated.js +24 -24
- package/dist/api/authentication-api-generated.d.ts +12 -12
- package/dist/api/authentication-api-generated.js +12 -12
- package/dist/api/reference-data-api-generated.d.ts +8 -8
- package/dist/api/reference-data-api-generated.js +8 -8
- package/dist/api/trading-api-generated.d.ts +8 -67
- package/dist/api/trading-api-generated.js +8 -107
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/brokerage-symbol-symbol.d.ts +7 -0
- package/dist/models/figi-instrument.d.ts +20 -0
- package/dist/models/index.d.ts +2 -1
- package/dist/models/index.js +2 -1
- package/dist/models/symbol-figi-instrument.d.ts +19 -0
- package/dist/models/symbol-figi-instrument.js +2 -0
- package/dist/models/symbol.d.ts +7 -0
- package/dist/models/underlying-symbol.d.ts +7 -0
- package/dist/models/universal-symbol.d.ts +7 -0
- package/dist/operationParameterMap.js +0 -16
- package/package.json +1 -1
- package/dist/models/trading-place-ocoorder-request.d.ts +0 -19
- /package/dist/models/{trading-place-ocoorder-request.js → figi-instrument.js} +0 -0
|
@@ -36,7 +36,7 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
36
36
|
const TradingApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Sends a signal to the brokerage to cancel the specified order. This will only work if the order has not yet been executed.
|
|
40
40
|
* @summary Cancel open order in account
|
|
41
41
|
* @param {string} userId
|
|
42
42
|
* @param {string} userSecret
|
|
@@ -154,7 +154,7 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
154
154
|
};
|
|
155
155
|
}),
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* Returns live quote(s) from the brokerage for the specified symbol(s).
|
|
158
158
|
* @summary Get symbol quotes
|
|
159
159
|
* @param {string} userId
|
|
160
160
|
* @param {string} userSecret
|
|
@@ -275,64 +275,6 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
275
275
|
options: localVarRequestOptions,
|
|
276
276
|
};
|
|
277
277
|
}),
|
|
278
|
-
/**
|
|
279
|
-
*
|
|
280
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
281
|
-
* @param {string} userId
|
|
282
|
-
* @param {string} userSecret
|
|
283
|
-
* @param {TradingPlaceOCOOrderRequest} tradingPlaceOCOOrderRequest
|
|
284
|
-
* @param {*} [options] Override http request option.
|
|
285
|
-
* @deprecated
|
|
286
|
-
* @throws {RequiredError}
|
|
287
|
-
*/
|
|
288
|
-
placeOCOOrder: (userId, userSecret, tradingPlaceOCOOrderRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
289
|
-
// verify required parameter 'userId' is not null or undefined
|
|
290
|
-
(0, common_1.assertParamExists)('placeOCOOrder', 'userId', userId);
|
|
291
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
292
|
-
(0, common_1.assertParamExists)('placeOCOOrder', 'userSecret', userSecret);
|
|
293
|
-
// verify required parameter 'tradingPlaceOCOOrderRequest' is not null or undefined
|
|
294
|
-
(0, common_1.assertParamExists)('placeOCOOrder', 'tradingPlaceOCOOrderRequest', tradingPlaceOCOOrderRequest);
|
|
295
|
-
const localVarPath = `/trade/oco`;
|
|
296
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
297
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
298
|
-
let baseOptions;
|
|
299
|
-
if (configuration) {
|
|
300
|
-
baseOptions = configuration.baseOptions;
|
|
301
|
-
}
|
|
302
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
303
|
-
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
304
|
-
const localVarQueryParameter = {};
|
|
305
|
-
// authentication PartnerClientId required
|
|
306
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
307
|
-
// authentication PartnerSignature required
|
|
308
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
309
|
-
// authentication PartnerTimestamp required
|
|
310
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
311
|
-
if (userId !== undefined) {
|
|
312
|
-
localVarQueryParameter['userId'] = userId;
|
|
313
|
-
}
|
|
314
|
-
if (userSecret !== undefined) {
|
|
315
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
316
|
-
}
|
|
317
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
318
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
319
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
320
|
-
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
321
|
-
requestBody: tradingPlaceOCOOrderRequest,
|
|
322
|
-
queryParameters: localVarQueryParameter,
|
|
323
|
-
requestConfig: localVarRequestOptions,
|
|
324
|
-
path: localVarPath,
|
|
325
|
-
configuration,
|
|
326
|
-
pathTemplate: '/trade/oco',
|
|
327
|
-
httpMethod: 'POST'
|
|
328
|
-
});
|
|
329
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration);
|
|
330
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
331
|
-
return {
|
|
332
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
333
|
-
options: localVarRequestOptions,
|
|
334
|
-
};
|
|
335
|
-
}),
|
|
336
278
|
/**
|
|
337
279
|
*
|
|
338
280
|
* @summary Place order
|
|
@@ -403,7 +345,7 @@ const TradingApiFp = function (configuration) {
|
|
|
403
345
|
const localVarAxiosParamCreator = (0, exports.TradingApiAxiosParamCreator)(configuration);
|
|
404
346
|
return {
|
|
405
347
|
/**
|
|
406
|
-
*
|
|
348
|
+
* Sends a signal to the brokerage to cancel the specified order. This will only work if the order has not yet been executed.
|
|
407
349
|
* @summary Cancel open order in account
|
|
408
350
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
409
351
|
* @param {*} [options] Override http request option.
|
|
@@ -443,7 +385,7 @@ const TradingApiFp = function (configuration) {
|
|
|
443
385
|
});
|
|
444
386
|
},
|
|
445
387
|
/**
|
|
446
|
-
*
|
|
388
|
+
* Returns live quote(s) from the brokerage for the specified symbol(s).
|
|
447
389
|
* @summary Get symbol quotes
|
|
448
390
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
449
391
|
* @param {*} [options] Override http request option.
|
|
@@ -479,24 +421,6 @@ const TradingApiFp = function (configuration) {
|
|
|
479
421
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
480
422
|
});
|
|
481
423
|
},
|
|
482
|
-
/**
|
|
483
|
-
*
|
|
484
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
485
|
-
* @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
|
|
486
|
-
* @param {*} [options] Override http request option.
|
|
487
|
-
* @deprecated
|
|
488
|
-
* @throws {RequiredError}
|
|
489
|
-
*/
|
|
490
|
-
placeOCOOrder(requestParameters, options) {
|
|
491
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
492
|
-
const tradingPlaceOCOOrderRequest = {
|
|
493
|
-
first_trade_id: requestParameters.first_trade_id,
|
|
494
|
-
second_trade_id: requestParameters.second_trade_id
|
|
495
|
-
};
|
|
496
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.placeOCOOrder(requestParameters.userId, requestParameters.userSecret, tradingPlaceOCOOrderRequest, options);
|
|
497
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
498
|
-
});
|
|
499
|
-
},
|
|
500
424
|
/**
|
|
501
425
|
*
|
|
502
426
|
* @summary Place order
|
|
@@ -524,7 +448,7 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
524
448
|
const localVarFp = (0, exports.TradingApiFp)(configuration);
|
|
525
449
|
return {
|
|
526
450
|
/**
|
|
527
|
-
*
|
|
451
|
+
* Sends a signal to the brokerage to cancel the specified order. This will only work if the order has not yet been executed.
|
|
528
452
|
* @summary Cancel open order in account
|
|
529
453
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
530
454
|
* @param {*} [options] Override http request option.
|
|
@@ -544,7 +468,7 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
544
468
|
return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
545
469
|
},
|
|
546
470
|
/**
|
|
547
|
-
*
|
|
471
|
+
* Returns live quote(s) from the brokerage for the specified symbol(s).
|
|
548
472
|
* @summary Get symbol quotes
|
|
549
473
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
550
474
|
* @param {*} [options] Override http request option.
|
|
@@ -563,17 +487,6 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
563
487
|
placeForceOrder(requestParameters, options) {
|
|
564
488
|
return localVarFp.placeForceOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
565
489
|
},
|
|
566
|
-
/**
|
|
567
|
-
*
|
|
568
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
569
|
-
* @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
|
|
570
|
-
* @param {*} [options] Override http request option.
|
|
571
|
-
* @deprecated
|
|
572
|
-
* @throws {RequiredError}
|
|
573
|
-
*/
|
|
574
|
-
placeOCOOrder(requestParameters, options) {
|
|
575
|
-
return localVarFp.placeOCOOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
576
|
-
},
|
|
577
490
|
/**
|
|
578
491
|
*
|
|
579
492
|
* @summary Place order
|
|
@@ -595,7 +508,7 @@ exports.TradingApiFactory = TradingApiFactory;
|
|
|
595
508
|
*/
|
|
596
509
|
class TradingApiGenerated extends base_1.BaseAPI {
|
|
597
510
|
/**
|
|
598
|
-
*
|
|
511
|
+
* Sends a signal to the brokerage to cancel the specified order. This will only work if the order has not yet been executed.
|
|
599
512
|
* @summary Cancel open order in account
|
|
600
513
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
601
514
|
* @param {*} [options] Override http request option.
|
|
@@ -617,7 +530,7 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
617
530
|
return (0, exports.TradingApiFp)(this.configuration).getOrderImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
618
531
|
}
|
|
619
532
|
/**
|
|
620
|
-
*
|
|
533
|
+
* Returns live quote(s) from the brokerage for the specified symbol(s).
|
|
621
534
|
* @summary Get symbol quotes
|
|
622
535
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
623
536
|
* @param {*} [options] Override http request option.
|
|
@@ -638,18 +551,6 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
638
551
|
placeForceOrder(requestParameters, options) {
|
|
639
552
|
return (0, exports.TradingApiFp)(this.configuration).placeForceOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
640
553
|
}
|
|
641
|
-
/**
|
|
642
|
-
*
|
|
643
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
644
|
-
* @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
|
|
645
|
-
* @param {*} [options] Override http request option.
|
|
646
|
-
* @deprecated
|
|
647
|
-
* @throws {RequiredError}
|
|
648
|
-
* @memberof TradingApiGenerated
|
|
649
|
-
*/
|
|
650
|
-
placeOCOOrder(requestParameters, options) {
|
|
651
|
-
return (0, exports.TradingApiFp)(this.configuration).placeOCOOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
652
|
-
}
|
|
653
554
|
/**
|
|
654
555
|
*
|
|
655
556
|
* @summary Place order
|