snaptrade-typescript-sdk 9.0.39 → 9.0.40
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 +66 -57
- package/dist/api/trading-api-generated.d.ts +47 -47
- package/dist/api/trading-api-generated.js +46 -46
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/action-strict.d.ts +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/manual-trade-and-impact.d.ts +5 -4
- package/dist/models/manual-trade-balance.d.ts +5 -5
- package/dist/models/manual-trade-form.d.ts +21 -21
- package/dist/models/manual-trade-impact.d.ts +38 -0
- package/dist/models/manual-trade-impact.js +2 -0
- package/dist/models/manual-trade-symbol.d.ts +10 -6
- package/dist/models/manual-trade.d.ts +9 -8
- package/dist/models/notional-value.d.ts +1 -1
- package/dist/models/options-place-option-strategy-request.d.ts +2 -2
- package/dist/models/order-type-strict.d.ts +1 -1
- package/dist/models/symbols-quotes-inner.d.ts +8 -8
- package/dist/models/time-in-force-strict.d.ts +1 -1
- package/dist/models/trading-cancel-user-account-order-request.d.ts +1 -1
- package/dist/models/validated-trade-body.d.ts +2 -2
- package/dist/operationParameterMap.js +20 -20
- package/package.json +1 -1
|
@@ -36,12 +36,12 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
36
36
|
const TradingApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @summary Cancel
|
|
39
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
40
|
+
* @summary Cancel order
|
|
41
41
|
* @param {string} userId
|
|
42
42
|
* @param {string} userSecret
|
|
43
|
-
* @param {string} accountId
|
|
44
|
-
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest
|
|
43
|
+
* @param {string} accountId
|
|
44
|
+
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest
|
|
45
45
|
* @param {*} [options] Override http request option.
|
|
46
46
|
* @throws {RequiredError}
|
|
47
47
|
*/
|
|
@@ -97,8 +97,8 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
97
97
|
};
|
|
98
98
|
}),
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @summary Check
|
|
100
|
+
* Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
101
|
+
* @summary Check order impact
|
|
102
102
|
* @param {string} userId
|
|
103
103
|
* @param {string} userSecret
|
|
104
104
|
* @param {ManualTradeForm} manualTradeForm
|
|
@@ -154,13 +154,13 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
154
154
|
};
|
|
155
155
|
}),
|
|
156
156
|
/**
|
|
157
|
-
* Returns
|
|
157
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
158
158
|
* @summary Get symbol quotes
|
|
159
159
|
* @param {string} userId
|
|
160
160
|
* @param {string} userSecret
|
|
161
|
-
* @param {string} symbols List of
|
|
162
|
-
* @param {string} accountId
|
|
163
|
-
* @param {boolean} [useTicker] Should be set to True if
|
|
161
|
+
* @param {string} symbols List of Universal Symbol IDs or tickers to get quotes for.
|
|
162
|
+
* @param {string} accountId
|
|
163
|
+
* @param {boolean} [useTicker] Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
|
164
164
|
* @param {*} [options] Override http request option.
|
|
165
165
|
* @throws {RequiredError}
|
|
166
166
|
*/
|
|
@@ -219,8 +219,8 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
219
219
|
};
|
|
220
220
|
}),
|
|
221
221
|
/**
|
|
222
|
-
* Places a
|
|
223
|
-
* @summary Place
|
|
222
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact).
|
|
223
|
+
* @summary Place order
|
|
224
224
|
* @param {string} userId
|
|
225
225
|
* @param {string} userSecret
|
|
226
226
|
* @param {ManualTradeForm} manualTradeForm
|
|
@@ -276,9 +276,9 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
276
276
|
};
|
|
277
277
|
}),
|
|
278
278
|
/**
|
|
279
|
-
* Places the
|
|
280
|
-
* @summary Place order
|
|
281
|
-
* @param {string} tradeId
|
|
279
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder).
|
|
280
|
+
* @summary Place checked order
|
|
281
|
+
* @param {string} tradeId Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact)
|
|
282
282
|
* @param {string} userId
|
|
283
283
|
* @param {string} userSecret
|
|
284
284
|
* @param {ValidatedTradeBody} [validatedTradeBody]
|
|
@@ -345,8 +345,8 @@ const TradingApiFp = function (configuration) {
|
|
|
345
345
|
const localVarAxiosParamCreator = (0, exports.TradingApiAxiosParamCreator)(configuration);
|
|
346
346
|
return {
|
|
347
347
|
/**
|
|
348
|
-
*
|
|
349
|
-
* @summary Cancel
|
|
348
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
349
|
+
* @summary Cancel order
|
|
350
350
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
351
351
|
* @param {*} [options] Override http request option.
|
|
352
352
|
* @throws {RequiredError}
|
|
@@ -361,8 +361,8 @@ const TradingApiFp = function (configuration) {
|
|
|
361
361
|
});
|
|
362
362
|
},
|
|
363
363
|
/**
|
|
364
|
-
*
|
|
365
|
-
* @summary Check
|
|
364
|
+
* Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
365
|
+
* @summary Check order impact
|
|
366
366
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
367
367
|
* @param {*} [options] Override http request option.
|
|
368
368
|
* @throws {RequiredError}
|
|
@@ -372,12 +372,12 @@ const TradingApiFp = function (configuration) {
|
|
|
372
372
|
const manualTradeForm = {
|
|
373
373
|
account_id: requestParameters.account_id,
|
|
374
374
|
action: requestParameters.action,
|
|
375
|
+
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
375
376
|
order_type: requestParameters.order_type,
|
|
377
|
+
time_in_force: requestParameters.time_in_force,
|
|
376
378
|
price: requestParameters.price,
|
|
377
379
|
stop: requestParameters.stop,
|
|
378
|
-
time_in_force: requestParameters.time_in_force,
|
|
379
380
|
units: requestParameters.units,
|
|
380
|
-
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
381
381
|
notional_value: requestParameters.notional_value
|
|
382
382
|
};
|
|
383
383
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderImpact(requestParameters.userId, requestParameters.userSecret, manualTradeForm, options);
|
|
@@ -385,7 +385,7 @@ const TradingApiFp = function (configuration) {
|
|
|
385
385
|
});
|
|
386
386
|
},
|
|
387
387
|
/**
|
|
388
|
-
* Returns
|
|
388
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
389
389
|
* @summary Get symbol quotes
|
|
390
390
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
391
391
|
* @param {*} [options] Override http request option.
|
|
@@ -398,8 +398,8 @@ const TradingApiFp = function (configuration) {
|
|
|
398
398
|
});
|
|
399
399
|
},
|
|
400
400
|
/**
|
|
401
|
-
* Places a
|
|
402
|
-
* @summary Place
|
|
401
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact).
|
|
402
|
+
* @summary Place order
|
|
403
403
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
404
404
|
* @param {*} [options] Override http request option.
|
|
405
405
|
* @throws {RequiredError}
|
|
@@ -409,12 +409,12 @@ const TradingApiFp = function (configuration) {
|
|
|
409
409
|
const manualTradeForm = {
|
|
410
410
|
account_id: requestParameters.account_id,
|
|
411
411
|
action: requestParameters.action,
|
|
412
|
+
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
412
413
|
order_type: requestParameters.order_type,
|
|
414
|
+
time_in_force: requestParameters.time_in_force,
|
|
413
415
|
price: requestParameters.price,
|
|
414
416
|
stop: requestParameters.stop,
|
|
415
|
-
time_in_force: requestParameters.time_in_force,
|
|
416
417
|
units: requestParameters.units,
|
|
417
|
-
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
418
418
|
notional_value: requestParameters.notional_value
|
|
419
419
|
};
|
|
420
420
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.placeForceOrder(requestParameters.userId, requestParameters.userSecret, manualTradeForm, options);
|
|
@@ -422,8 +422,8 @@ const TradingApiFp = function (configuration) {
|
|
|
422
422
|
});
|
|
423
423
|
},
|
|
424
424
|
/**
|
|
425
|
-
* Places the
|
|
426
|
-
* @summary Place order
|
|
425
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder).
|
|
426
|
+
* @summary Place checked order
|
|
427
427
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
428
428
|
* @param {*} [options] Override http request option.
|
|
429
429
|
* @throws {RequiredError}
|
|
@@ -448,8 +448,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
448
448
|
const localVarFp = (0, exports.TradingApiFp)(configuration);
|
|
449
449
|
return {
|
|
450
450
|
/**
|
|
451
|
-
*
|
|
452
|
-
* @summary Cancel
|
|
451
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
452
|
+
* @summary Cancel order
|
|
453
453
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
454
454
|
* @param {*} [options] Override http request option.
|
|
455
455
|
* @throws {RequiredError}
|
|
@@ -458,8 +458,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
458
458
|
return localVarFp.cancelUserAccountOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
459
459
|
},
|
|
460
460
|
/**
|
|
461
|
-
*
|
|
462
|
-
* @summary Check
|
|
461
|
+
* Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
462
|
+
* @summary Check order impact
|
|
463
463
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
464
464
|
* @param {*} [options] Override http request option.
|
|
465
465
|
* @throws {RequiredError}
|
|
@@ -468,7 +468,7 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
468
468
|
return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
469
469
|
},
|
|
470
470
|
/**
|
|
471
|
-
* Returns
|
|
471
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
472
472
|
* @summary Get symbol quotes
|
|
473
473
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
474
474
|
* @param {*} [options] Override http request option.
|
|
@@ -478,8 +478,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
478
478
|
return localVarFp.getUserAccountQuotes(requestParameters, options).then((request) => request(axios, basePath));
|
|
479
479
|
},
|
|
480
480
|
/**
|
|
481
|
-
* Places a
|
|
482
|
-
* @summary Place
|
|
481
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact).
|
|
482
|
+
* @summary Place order
|
|
483
483
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
484
484
|
* @param {*} [options] Override http request option.
|
|
485
485
|
* @throws {RequiredError}
|
|
@@ -488,8 +488,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
488
488
|
return localVarFp.placeForceOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
489
489
|
},
|
|
490
490
|
/**
|
|
491
|
-
* Places the
|
|
492
|
-
* @summary Place order
|
|
491
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder).
|
|
492
|
+
* @summary Place checked order
|
|
493
493
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
494
494
|
* @param {*} [options] Override http request option.
|
|
495
495
|
* @throws {RequiredError}
|
|
@@ -508,8 +508,8 @@ exports.TradingApiFactory = TradingApiFactory;
|
|
|
508
508
|
*/
|
|
509
509
|
class TradingApiGenerated extends base_1.BaseAPI {
|
|
510
510
|
/**
|
|
511
|
-
*
|
|
512
|
-
* @summary Cancel
|
|
511
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
512
|
+
* @summary Cancel order
|
|
513
513
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
514
514
|
* @param {*} [options] Override http request option.
|
|
515
515
|
* @throws {RequiredError}
|
|
@@ -519,8 +519,8 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
519
519
|
return (0, exports.TradingApiFp)(this.configuration).cancelUserAccountOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
520
520
|
}
|
|
521
521
|
/**
|
|
522
|
-
*
|
|
523
|
-
* @summary Check
|
|
522
|
+
* Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
523
|
+
* @summary Check order impact
|
|
524
524
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
525
525
|
* @param {*} [options] Override http request option.
|
|
526
526
|
* @throws {RequiredError}
|
|
@@ -530,7 +530,7 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
530
530
|
return (0, exports.TradingApiFp)(this.configuration).getOrderImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
531
531
|
}
|
|
532
532
|
/**
|
|
533
|
-
* Returns
|
|
533
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
534
534
|
* @summary Get symbol quotes
|
|
535
535
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
536
536
|
* @param {*} [options] Override http request option.
|
|
@@ -541,8 +541,8 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
541
541
|
return (0, exports.TradingApiFp)(this.configuration).getUserAccountQuotes(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
542
542
|
}
|
|
543
543
|
/**
|
|
544
|
-
* Places a
|
|
545
|
-
* @summary Place
|
|
544
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact).
|
|
545
|
+
* @summary Place order
|
|
546
546
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
547
547
|
* @param {*} [options] Override http request option.
|
|
548
548
|
* @throws {RequiredError}
|
|
@@ -552,8 +552,8 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
552
552
|
return (0, exports.TradingApiFp)(this.configuration).placeForceOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
553
553
|
}
|
|
554
554
|
/**
|
|
555
|
-
* Places the
|
|
556
|
-
* @summary Place order
|
|
555
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder).
|
|
556
|
+
* @summary Place checked order
|
|
557
557
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
558
558
|
* @param {*} [options] Override http request option.
|
|
559
559
|
* @throws {RequiredError}
|