snaptrade-typescript-sdk 9.0.187 → 9.0.188

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.
@@ -32,7 +32,7 @@ class Configuration {
32
32
  this.accessToken = param.accessToken;
33
33
  this.basePath = param.basePath;
34
34
  this.baseOptions = (_a = param.baseOptions) !== null && _a !== void 0 ? _a : {};
35
- this.userAgent = param.userAgent === undefined ? "Konfig/9.0.187/typescript" : param.userAgent;
35
+ this.userAgent = param.userAgent === undefined ? "Konfig/9.0.188/typescript" : param.userAgent;
36
36
  this.formDataCtor = param.formDataCtor;
37
37
  }
38
38
  /**
@@ -0,0 +1,62 @@
1
+ import { ActionStrict } from './action-strict';
2
+ import { OrderTypeStrict } from './order-type-strict';
3
+ import { TimeInForceStrict } from './time-in-force-strict';
4
+ import { TradingInstrument } from './trading-instrument';
5
+ /**
6
+ * A single leg within a complex order.
7
+ * @export
8
+ * @interface ComplexOrderLeg
9
+ */
10
+ export interface ComplexOrderLeg {
11
+ [key: string]: any;
12
+ /**
13
+ * The role of this leg within the complex order.
14
+ * @type {string}
15
+ * @memberof ComplexOrderLeg
16
+ */
17
+ 'order_role': ComplexOrderLegOrderRoleEnum;
18
+ /**
19
+ * The action describes the intent or side of a trade. This is either `BUY` or `SELL`.
20
+ * @type {ActionStrict}
21
+ * @memberof ComplexOrderLeg
22
+ */
23
+ 'action': ActionStrict;
24
+ /**
25
+ *
26
+ * @type {TradingInstrument}
27
+ * @memberof ComplexOrderLeg
28
+ */
29
+ 'instrument': TradingInstrument;
30
+ /**
31
+ * The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
32
+ * @type {OrderTypeStrict}
33
+ * @memberof ComplexOrderLeg
34
+ */
35
+ 'order_type': OrderTypeStrict;
36
+ /**
37
+ * Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
38
+ * @type {number}
39
+ * @memberof ComplexOrderLeg
40
+ */
41
+ 'units': number;
42
+ /**
43
+ * The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
44
+ * @type {TimeInForceStrict}
45
+ * @memberof ComplexOrderLeg
46
+ */
47
+ 'time_in_force': TimeInForceStrict;
48
+ /**
49
+ * The limit price. Required when `order_type` is `Limit` or `StopLimit`.
50
+ * @type {number}
51
+ * @memberof ComplexOrderLeg
52
+ */
53
+ 'price'?: number | null;
54
+ /**
55
+ * The stop trigger price. Required when `order_type` is `Stop` or `StopLimit`.
56
+ * @type {number}
57
+ * @memberof ComplexOrderLeg
58
+ */
59
+ 'stop'?: number | null;
60
+ }
61
+ type ComplexOrderLegOrderRoleEnum = 'TRIGGER' | 'CONDITIONAL' | 'PEER';
62
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Response returned after successfully placing a complex order. AccountOrderRecord rows for the legs are not created synchronously — they\'re hydrated by the next brokerage sync, and can be queried later using the returned `brokerage_group_order_id`.
3
+ * @export
4
+ * @interface ComplexOrderResponse
5
+ */
6
+ export interface ComplexOrderResponse {
7
+ [key: string]: any;
8
+ /**
9
+ * The complex order type that was placed.
10
+ * @type {string}
11
+ * @memberof ComplexOrderResponse
12
+ */
13
+ 'type'?: ComplexOrderResponseTypeEnum;
14
+ /**
15
+ * The brokerage-assigned identifier that links all legs of this complex order together. Each leg will eventually appear as a separate AccountOrderRecord sharing this value. May be null if the brokerage does not return a group identifier.
16
+ * @type {string}
17
+ * @memberof ComplexOrderResponse
18
+ */
19
+ 'brokerage_group_order_id'?: string | null;
20
+ }
21
+ type ComplexOrderResponseTypeEnum = 'OCO' | 'OTO' | 'OTOCO';
22
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -42,6 +42,8 @@ export * from './brokerage-instruments-response';
42
42
  export * from './brokerage-type';
43
43
  export * from './cancel-order-response';
44
44
  export * from './child-brokerage-order-ids';
45
+ export * from './complex-order-leg';
46
+ export * from './complex-order-response';
45
47
  export * from './connections-session-events200-response-inner';
46
48
  export * from './crypto-order-form';
47
49
  export * from './crypto-order-preview';
@@ -65,6 +67,7 @@ export * from './manual-trade-and-impact';
65
67
  export * from './manual-trade-balance';
66
68
  export * from './manual-trade-form';
67
69
  export * from './manual-trade-form-bracket';
70
+ export * from './manual-trade-form-complex';
68
71
  export * from './manual-trade-form-notional-value';
69
72
  export * from './manual-trade-form-with-options';
70
73
  export * from './manual-trade-impact';
@@ -58,6 +58,8 @@ __exportStar(require("./brokerage-instruments-response"), exports);
58
58
  __exportStar(require("./brokerage-type"), exports);
59
59
  __exportStar(require("./cancel-order-response"), exports);
60
60
  __exportStar(require("./child-brokerage-order-ids"), exports);
61
+ __exportStar(require("./complex-order-leg"), exports);
62
+ __exportStar(require("./complex-order-response"), exports);
61
63
  __exportStar(require("./connections-session-events200-response-inner"), exports);
62
64
  __exportStar(require("./crypto-order-form"), exports);
63
65
  __exportStar(require("./crypto-order-preview"), exports);
@@ -81,6 +83,7 @@ __exportStar(require("./manual-trade-and-impact"), exports);
81
83
  __exportStar(require("./manual-trade-balance"), exports);
82
84
  __exportStar(require("./manual-trade-form"), exports);
83
85
  __exportStar(require("./manual-trade-form-bracket"), exports);
86
+ __exportStar(require("./manual-trade-form-complex"), exports);
84
87
  __exportStar(require("./manual-trade-form-notional-value"), exports);
85
88
  __exportStar(require("./manual-trade-form-with-options"), exports);
86
89
  __exportStar(require("./manual-trade-impact"), exports);
@@ -0,0 +1,28 @@
1
+ import { ComplexOrderLeg } from './complex-order-leg';
2
+ /**
3
+ * Request body for placing a complex conditional order (OCO, OTO, or OTOCO).
4
+ * @export
5
+ * @interface ManualTradeFormComplex
6
+ */
7
+ export interface ManualTradeFormComplex {
8
+ /**
9
+ * The complex order type. - `OCO`: One Cancels the Other — two peer orders. - `OTO`: One Triggers the Other — a trigger order and a conditional order. - `OTOCO`: One Triggers a One Cancels the Other — a trigger order and two peer orders.
10
+ * @type {string}
11
+ * @memberof ManualTradeFormComplex
12
+ */
13
+ 'type': ManualTradeFormComplexTypeEnum;
14
+ /**
15
+ * The orders that make up the complex order. Required counts and roles per type: - `OCO`: exactly 2 orders, both `PEER` - `OTO`: exactly 2 orders, one `TRIGGER` and one `CONDITIONAL` - `OTOCO`: exactly 3 orders, one `TRIGGER` and two `PEER`
16
+ * @type {Array<ComplexOrderLeg>}
17
+ * @memberof ManualTradeFormComplex
18
+ */
19
+ 'orders': Array<ComplexOrderLeg>;
20
+ /**
21
+ * An optional client-provided identifier for this complex order. Passed through to the brokerage and returned in the response.
22
+ * @type {string}
23
+ * @memberof ManualTradeFormComplex
24
+ */
25
+ 'client_order_id'?: string | null;
26
+ }
27
+ type ManualTradeFormComplexTypeEnum = 'OCO' | 'OTO' | 'OTOCO';
28
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -703,6 +703,28 @@ exports.operationParameterMap = {
703
703
  },
704
704
  ]
705
705
  },
706
+ '/accounts/{accountId}/trading/complex-POST': {
707
+ parameters: [
708
+ {
709
+ name: 'type'
710
+ },
711
+ {
712
+ name: 'orders'
713
+ },
714
+ {
715
+ name: 'accountId'
716
+ },
717
+ {
718
+ name: 'userId'
719
+ },
720
+ {
721
+ name: 'userSecret'
722
+ },
723
+ {
724
+ name: 'client_order_id'
725
+ },
726
+ ]
727
+ },
706
728
  '/accounts/{accountId}/trading/crypto-POST': {
707
729
  parameters: [
708
730
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "9.0.187",
3
+ "version": "9.0.188",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {