@limeint/trade-api 2.18.1-rc.1 → 2.19.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/README.md +110 -36
- package/dist/client.d.ts +10 -28
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +10 -86
- package/dist/client.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/accounts/accounts_service.d.ts +71 -88
- package/dist/generated/grpc/tradeapi/v1/accounts/accounts_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/accounts/accounts_service.js +36 -145
- package/dist/generated/grpc/tradeapi/v1/accounts/accounts_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/assets/assets_service.d.ts +195 -196
- package/dist/generated/grpc/tradeapi/v1/assets/assets_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/assets/assets_service.js +356 -95
- package/dist/generated/grpc/tradeapi/v1/assets/assets_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/auth/auth_service.d.ts +45 -45
- package/dist/generated/grpc/tradeapi/v1/auth/auth_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/auth/auth_service.js +13 -13
- package/dist/generated/grpc/tradeapi/v1/auth/auth_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/corporateactions/corporate_actions_service.d.ts +69 -221
- package/dist/generated/grpc/tradeapi/v1/corporateactions/corporate_actions_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/corporateactions/corporate_actions_service.js +165 -1208
- package/dist/generated/grpc/tradeapi/v1/corporateactions/corporate_actions_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/marketdata/marketdata_service.d.ts +136 -143
- package/dist/generated/grpc/tradeapi/v1/marketdata/marketdata_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/marketdata/marketdata_service.js +202 -63
- package/dist/generated/grpc/tradeapi/v1/marketdata/marketdata_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/metrics/usage_metrics_service.d.ts +8 -23
- package/dist/generated/grpc/tradeapi/v1/metrics/usage_metrics_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/metrics/usage_metrics_service.js +1 -6
- package/dist/generated/grpc/tradeapi/v1/metrics/usage_metrics_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/orders/orders_service.d.ts +235 -235
- package/dist/generated/grpc/tradeapi/v1/orders/orders_service.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/orders/orders_service.js +187 -193
- package/dist/generated/grpc/tradeapi/v1/orders/orders_service.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/side.d.ts +2 -2
- package/dist/generated/grpc/tradeapi/v1/side.d.ts.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/side.js +2 -2
- package/dist/generated/grpc/tradeapi/v1/side.js.map +1 -1
- package/dist/generated/grpc/tradeapi/v1/trade.d.ts +10 -10
- package/dist/generated/grpc/tradeapi/v1/trade.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/auth.d.ts +10 -0
- package/dist/internal/auth.d.ts.map +1 -0
- package/dist/internal/auth.js +63 -0
- package/dist/internal/auth.js.map +1 -0
- package/dist/internal/retry.d.ts +10 -0
- package/dist/internal/retry.d.ts.map +1 -0
- package/dist/internal/retry.js +22 -0
- package/dist/internal/retry.js.map +1 -0
- package/dist/internal/services.d.ts +20 -0
- package/dist/internal/services.d.ts.map +1 -0
- package/dist/internal/services.js +20 -0
- package/dist/internal/services.js.map +1 -0
- package/package.json +9 -8
- package/dist/generated/grpc/tradeapi/v1/reports/reports_service.d.ts +0 -203
- package/dist/generated/grpc/tradeapi/v1/reports/reports_service.d.ts.map +0 -1
- package/dist/generated/grpc/tradeapi/v1/reports/reports_service.js +0 -871
- package/dist/generated/grpc/tradeapi/v1/reports/reports_service.js.map +0 -1
- package/dist/reports.d.ts +0 -2
- package/dist/reports.d.ts.map +0 -1
- package/dist/reports.js +0 -2
- package/dist/reports.js.map +0 -1
|
@@ -4,19 +4,19 @@ import { Decimal } from "../../../../google/type/decimal.js";
|
|
|
4
4
|
import { Side } from "../side.js";
|
|
5
5
|
import { AccountTrade } from "../trade.js";
|
|
6
6
|
export declare const protobufPackage = "grpc.tradeapi.v1.orders";
|
|
7
|
-
/** Order
|
|
7
|
+
/** Order Type */
|
|
8
8
|
export declare enum OrderType {
|
|
9
|
-
/** ORDER_TYPE_UNSPECIFIED -
|
|
9
|
+
/** ORDER_TYPE_UNSPECIFIED - Value not specified */
|
|
10
10
|
ORDER_TYPE_UNSPECIFIED = 0,
|
|
11
11
|
/** ORDER_TYPE_MARKET - Market */
|
|
12
12
|
ORDER_TYPE_MARKET = 1,
|
|
13
13
|
/** ORDER_TYPE_LIMIT - Limit */
|
|
14
14
|
ORDER_TYPE_LIMIT = 2,
|
|
15
|
-
/** ORDER_TYPE_STOP - Stop
|
|
15
|
+
/** ORDER_TYPE_STOP - Market Stop Order */
|
|
16
16
|
ORDER_TYPE_STOP = 3,
|
|
17
|
-
/** ORDER_TYPE_STOP_LIMIT - Stop limit
|
|
17
|
+
/** ORDER_TYPE_STOP_LIMIT - Stop order limit */
|
|
18
18
|
ORDER_TYPE_STOP_LIMIT = 4,
|
|
19
|
-
/** ORDER_TYPE_MULTI_LEG - Multi
|
|
19
|
+
/** ORDER_TYPE_MULTI_LEG - Multi-leg request */
|
|
20
20
|
ORDER_TYPE_MULTI_LEG = 5,
|
|
21
21
|
UNRECOGNIZED = -1
|
|
22
22
|
}
|
|
@@ -24,63 +24,63 @@ export declare function orderTypeFromJSON(object: any): OrderType;
|
|
|
24
24
|
export declare function orderTypeToJSON(object: OrderType): string;
|
|
25
25
|
/** Order validity period */
|
|
26
26
|
export declare enum TimeInForce {
|
|
27
|
-
/** TIME_IN_FORCE_UNSPECIFIED -
|
|
27
|
+
/** TIME_IN_FORCE_UNSPECIFIED - Value not specified */
|
|
28
28
|
TIME_IN_FORCE_UNSPECIFIED = 0,
|
|
29
29
|
/** TIME_IN_FORCE_DAY - Until the end of the day */
|
|
30
30
|
TIME_IN_FORCE_DAY = 1,
|
|
31
|
-
/** TIME_IN_FORCE_GOOD_TILL_CANCEL -
|
|
31
|
+
/** TIME_IN_FORCE_GOOD_TILL_CANCEL - Good until canceled */
|
|
32
32
|
TIME_IN_FORCE_GOOD_TILL_CANCEL = 2,
|
|
33
33
|
/** TIME_IN_FORCE_GOOD_TILL_CROSSING - Valid until crossing */
|
|
34
34
|
TIME_IN_FORCE_GOOD_TILL_CROSSING = 3,
|
|
35
|
-
/** TIME_IN_FORCE_EXT -
|
|
35
|
+
/** TIME_IN_FORCE_EXT - Over-the-counter trading */
|
|
36
36
|
TIME_IN_FORCE_EXT = 4,
|
|
37
|
-
/** TIME_IN_FORCE_ON_OPEN - At
|
|
37
|
+
/** TIME_IN_FORCE_ON_OPEN - At the opening of the exchange */
|
|
38
38
|
TIME_IN_FORCE_ON_OPEN = 5,
|
|
39
|
-
/** TIME_IN_FORCE_ON_CLOSE - At
|
|
39
|
+
/** TIME_IN_FORCE_ON_CLOSE - At the close of the exchange */
|
|
40
40
|
TIME_IN_FORCE_ON_CLOSE = 6,
|
|
41
|
-
/** TIME_IN_FORCE_IOC -
|
|
41
|
+
/** TIME_IN_FORCE_IOC - Fulfill immediately or cancel */
|
|
42
42
|
TIME_IN_FORCE_IOC = 7,
|
|
43
|
-
/** TIME_IN_FORCE_FOK -
|
|
43
|
+
/** TIME_IN_FORCE_FOK - Fully fulfill or cancel */
|
|
44
44
|
TIME_IN_FORCE_FOK = 8,
|
|
45
45
|
UNRECOGNIZED = -1
|
|
46
46
|
}
|
|
47
47
|
export declare function timeInForceFromJSON(object: any): TimeInForce;
|
|
48
48
|
export declare function timeInForceToJSON(object: TimeInForce): string;
|
|
49
|
-
/**
|
|
49
|
+
/** Stop order trigger condition */
|
|
50
50
|
export declare enum StopCondition {
|
|
51
|
-
/** STOP_CONDITION_UNSPECIFIED -
|
|
51
|
+
/** STOP_CONDITION_UNSPECIFIED - Value not specified */
|
|
52
52
|
STOP_CONDITION_UNSPECIFIED = 0,
|
|
53
|
-
/** STOP_CONDITION_LAST_UP -
|
|
53
|
+
/** STOP_CONDITION_LAST_UP - Trigger price is greater than the current price */
|
|
54
54
|
STOP_CONDITION_LAST_UP = 1,
|
|
55
|
-
/** STOP_CONDITION_LAST_DOWN -
|
|
55
|
+
/** STOP_CONDITION_LAST_DOWN - Trigger price is less than the current price */
|
|
56
56
|
STOP_CONDITION_LAST_DOWN = 2,
|
|
57
57
|
UNRECOGNIZED = -1
|
|
58
58
|
}
|
|
59
59
|
export declare function stopConditionFromJSON(object: any): StopCondition;
|
|
60
60
|
export declare function stopConditionToJSON(object: StopCondition): string;
|
|
61
|
-
/** Order
|
|
61
|
+
/** Order Status */
|
|
62
62
|
export declare enum OrderStatus {
|
|
63
|
-
/** ORDER_STATUS_UNSPECIFIED -
|
|
63
|
+
/** ORDER_STATUS_UNSPECIFIED - Unspecified value */
|
|
64
64
|
ORDER_STATUS_UNSPECIFIED = 0,
|
|
65
|
-
/** ORDER_STATUS_NEW - New
|
|
65
|
+
/** ORDER_STATUS_NEW - New Request */
|
|
66
66
|
ORDER_STATUS_NEW = 1,
|
|
67
|
-
/** ORDER_STATUS_PARTIALLY_FILLED - Partially
|
|
67
|
+
/** ORDER_STATUS_PARTIALLY_FILLED - Partially filled */
|
|
68
68
|
ORDER_STATUS_PARTIALLY_FILLED = 2,
|
|
69
69
|
/** ORDER_STATUS_FILLED - Fulfilled */
|
|
70
70
|
ORDER_STATUS_FILLED = 3,
|
|
71
|
-
/** ORDER_STATUS_DONE_FOR_DAY -
|
|
71
|
+
/** ORDER_STATUS_DONE_FOR_DAY - Valid for the day */
|
|
72
72
|
ORDER_STATUS_DONE_FOR_DAY = 4,
|
|
73
|
-
/** ORDER_STATUS_CANCELED -
|
|
73
|
+
/** ORDER_STATUS_CANCELED - Cancelled */
|
|
74
74
|
ORDER_STATUS_CANCELED = 5,
|
|
75
75
|
/** ORDER_STATUS_REPLACED - Replaced with another */
|
|
76
76
|
ORDER_STATUS_REPLACED = 6,
|
|
77
|
-
/** ORDER_STATUS_PENDING_CANCEL - Pending
|
|
77
|
+
/** ORDER_STATUS_PENDING_CANCEL - Pending Cancel */
|
|
78
78
|
ORDER_STATUS_PENDING_CANCEL = 7,
|
|
79
79
|
/** ORDER_STATUS_REJECTED - Rejected */
|
|
80
80
|
ORDER_STATUS_REJECTED = 9,
|
|
81
81
|
/** ORDER_STATUS_SUSPENDED - Suspended */
|
|
82
82
|
ORDER_STATUS_SUSPENDED = 10,
|
|
83
|
-
/** ORDER_STATUS_PENDING_NEW -
|
|
83
|
+
/** ORDER_STATUS_PENDING_NEW - Pending new */
|
|
84
84
|
ORDER_STATUS_PENDING_NEW = 11,
|
|
85
85
|
/** ORDER_STATUS_EXPIRED - Expired */
|
|
86
86
|
ORDER_STATUS_EXPIRED = 13,
|
|
@@ -96,67 +96,67 @@ export declare enum OrderStatus {
|
|
|
96
96
|
ORDER_STATUS_REJECTED_BY_EXCHANGE = 20,
|
|
97
97
|
/** ORDER_STATUS_WATCHING - Watching */
|
|
98
98
|
ORDER_STATUS_WATCHING = 21,
|
|
99
|
-
/** ORDER_STATUS_EXECUTED -
|
|
99
|
+
/** ORDER_STATUS_EXECUTED - Executed */
|
|
100
100
|
ORDER_STATUS_EXECUTED = 22,
|
|
101
101
|
/** ORDER_STATUS_DISABLED - Disabled */
|
|
102
102
|
ORDER_STATUS_DISABLED = 23,
|
|
103
103
|
/** ORDER_STATUS_LINK_WAIT - Waiting for link */
|
|
104
104
|
ORDER_STATUS_LINK_WAIT = 24,
|
|
105
|
-
/** ORDER_STATUS_SL_GUARD_TIME -
|
|
105
|
+
/** ORDER_STATUS_SL_GUARD_TIME - SL Guard Time */
|
|
106
106
|
ORDER_STATUS_SL_GUARD_TIME = 27,
|
|
107
|
-
/** ORDER_STATUS_SL_EXECUTED - Executed
|
|
107
|
+
/** ORDER_STATUS_SL_EXECUTED - Executed by SL */
|
|
108
108
|
ORDER_STATUS_SL_EXECUTED = 28,
|
|
109
|
-
/** ORDER_STATUS_SL_FORWARDING - SL
|
|
109
|
+
/** ORDER_STATUS_SL_FORWARDING - SL Forwarding */
|
|
110
110
|
ORDER_STATUS_SL_FORWARDING = 29,
|
|
111
|
-
/** ORDER_STATUS_TP_GUARD_TIME -
|
|
111
|
+
/** ORDER_STATUS_TP_GUARD_TIME - TP Guard Time */
|
|
112
112
|
ORDER_STATUS_TP_GUARD_TIME = 30,
|
|
113
|
-
/** ORDER_STATUS_TP_EXECUTED - Executed
|
|
113
|
+
/** ORDER_STATUS_TP_EXECUTED - Executed by TP */
|
|
114
114
|
ORDER_STATUS_TP_EXECUTED = 31,
|
|
115
115
|
/** ORDER_STATUS_TP_CORRECTION - TP correction */
|
|
116
116
|
ORDER_STATUS_TP_CORRECTION = 32,
|
|
117
|
-
/** ORDER_STATUS_TP_FORWARDING - TP
|
|
117
|
+
/** ORDER_STATUS_TP_FORWARDING - TP Forwarding */
|
|
118
118
|
ORDER_STATUS_TP_FORWARDING = 33,
|
|
119
|
-
/** ORDER_STATUS_TP_CORR_GUARD_TIME - TP correction during
|
|
119
|
+
/** ORDER_STATUS_TP_CORR_GUARD_TIME - TP correction during guard time */
|
|
120
120
|
ORDER_STATUS_TP_CORR_GUARD_TIME = 34,
|
|
121
121
|
UNRECOGNIZED = -1
|
|
122
122
|
}
|
|
123
123
|
export declare function orderStatusFromJSON(object: any): OrderStatus;
|
|
124
124
|
export declare function orderStatusToJSON(object: OrderStatus): string;
|
|
125
|
-
/**
|
|
125
|
+
/** Conditional order validity period */
|
|
126
126
|
export declare enum ValidBefore {
|
|
127
|
-
/** VALID_BEFORE_UNSPECIFIED -
|
|
127
|
+
/** VALID_BEFORE_UNSPECIFIED - Value not specified */
|
|
128
128
|
VALID_BEFORE_UNSPECIFIED = 0,
|
|
129
129
|
/** VALID_BEFORE_END_OF_DAY - Until the end of the trading day */
|
|
130
130
|
VALID_BEFORE_END_OF_DAY = 1,
|
|
131
|
-
/** VALID_BEFORE_GOOD_TILL_CANCEL -
|
|
131
|
+
/** VALID_BEFORE_GOOD_TILL_CANCEL - Until cancellation */
|
|
132
132
|
VALID_BEFORE_GOOD_TILL_CANCEL = 2,
|
|
133
|
-
/** VALID_BEFORE_GOOD_TILL_DATE - Before the specified date and time. This type is supported
|
|
133
|
+
/** VALID_BEFORE_GOOD_TILL_DATE - Before the specified date and time. This type is only supported when placing SL/TP orders. */
|
|
134
134
|
VALID_BEFORE_GOOD_TILL_DATE = 3,
|
|
135
135
|
UNRECOGNIZED = -1
|
|
136
136
|
}
|
|
137
137
|
export declare function validBeforeFromJSON(object: any): ValidBefore;
|
|
138
138
|
export declare function validBeforeToJSON(object: ValidBefore): string;
|
|
139
|
-
/** Unit
|
|
139
|
+
/** Unit of measurement of the protective spread for the TP execution price */
|
|
140
140
|
export declare enum TPSpreadMeasure {
|
|
141
|
-
/** TP_SPREAD_MEASURE_UNDEFINED -
|
|
141
|
+
/** TP_SPREAD_MEASURE_UNDEFINED - Value not specified */
|
|
142
142
|
TP_SPREAD_MEASURE_UNDEFINED = 0,
|
|
143
|
-
/** TP_SPREAD_MEASURE_VALUE -
|
|
143
|
+
/** TP_SPREAD_MEASURE_VALUE - in price units */
|
|
144
144
|
TP_SPREAD_MEASURE_VALUE = 1,
|
|
145
|
-
/** TP_SPREAD_MEASURE_PERCENT -
|
|
145
|
+
/** TP_SPREAD_MEASURE_PERCENT - as a percentage with maximum accuracy to hundredths of a percent */
|
|
146
146
|
TP_SPREAD_MEASURE_PERCENT = 2,
|
|
147
147
|
UNRECOGNIZED = -1
|
|
148
148
|
}
|
|
149
149
|
export declare function tPSpreadMeasureFromJSON(object: any): TPSpreadMeasure;
|
|
150
150
|
export declare function tPSpreadMeasureToJSON(object: TPSpreadMeasure): string;
|
|
151
151
|
/**
|
|
152
|
-
* Request
|
|
152
|
+
* Request to subscribe to your own orders and trades. Stream
|
|
153
153
|
*
|
|
154
154
|
* @deprecated
|
|
155
155
|
*/
|
|
156
156
|
export interface OrderTradeRequest {
|
|
157
157
|
/** Changing subscription status: subscribe/unsubscribe */
|
|
158
158
|
action: OrderTradeRequest_Action;
|
|
159
|
-
/**
|
|
159
|
+
/** Subscribe to requests/orders only or to all at once */
|
|
160
160
|
dataType: OrderTradeRequest_DataType;
|
|
161
161
|
/** Account ID */
|
|
162
162
|
accountId: string;
|
|
@@ -173,61 +173,61 @@ export declare function orderTradeRequest_ActionFromJSON(object: any): OrderTrad
|
|
|
173
173
|
export declare function orderTradeRequest_ActionToJSON(object: OrderTradeRequest_Action): string;
|
|
174
174
|
/** Subscription type */
|
|
175
175
|
export declare enum OrderTradeRequest_DataType {
|
|
176
|
-
/** DATA_TYPE_ALL - All orders and trades */
|
|
176
|
+
/** DATA_TYPE_ALL - All: orders and trades */
|
|
177
177
|
DATA_TYPE_ALL = 0,
|
|
178
|
-
/** DATA_TYPE_ORDERS -
|
|
178
|
+
/** DATA_TYPE_ORDERS - Orders */
|
|
179
179
|
DATA_TYPE_ORDERS = 1,
|
|
180
|
-
/** DATA_TYPE_TRADES -
|
|
180
|
+
/** DATA_TYPE_TRADES - Trades */
|
|
181
181
|
DATA_TYPE_TRADES = 2,
|
|
182
182
|
UNRECOGNIZED = -1
|
|
183
183
|
}
|
|
184
184
|
export declare function orderTradeRequest_DataTypeFromJSON(object: any): OrderTradeRequest_DataType;
|
|
185
185
|
export declare function orderTradeRequest_DataTypeToJSON(object: OrderTradeRequest_DataType): string;
|
|
186
186
|
/**
|
|
187
|
-
*
|
|
187
|
+
* List of your own orders and trades
|
|
188
188
|
*
|
|
189
189
|
* @deprecated
|
|
190
190
|
*/
|
|
191
191
|
export interface OrderTradeResponse {
|
|
192
|
-
/**
|
|
192
|
+
/** Orders */
|
|
193
193
|
orders: OrderState[];
|
|
194
|
-
/**
|
|
194
|
+
/** Trades */
|
|
195
195
|
trades: AccountTrade[];
|
|
196
196
|
}
|
|
197
|
-
/** Request
|
|
197
|
+
/** Request to subscribe to your own orders. Stream */
|
|
198
198
|
export interface SubscribeOrdersRequest {
|
|
199
199
|
/** Account ID */
|
|
200
200
|
accountId: string;
|
|
201
201
|
}
|
|
202
|
-
/** List of
|
|
202
|
+
/** List of your own requests */
|
|
203
203
|
export interface SubscribeOrdersResponse {
|
|
204
|
-
/**
|
|
204
|
+
/** Orders */
|
|
205
205
|
orders: OrderState[];
|
|
206
206
|
}
|
|
207
|
-
/** Request
|
|
207
|
+
/** Request to subscribe to your own trades. Stream */
|
|
208
208
|
export interface SubscribeTradesRequest {
|
|
209
209
|
/** Account ID */
|
|
210
210
|
accountId: string;
|
|
211
211
|
}
|
|
212
|
-
/** List of own trades */
|
|
212
|
+
/** List of your own trades */
|
|
213
213
|
export interface SubscribeTradesResponse {
|
|
214
|
-
/**
|
|
214
|
+
/** Trades */
|
|
215
215
|
trades: AccountTrade[];
|
|
216
216
|
}
|
|
217
|
-
/** Request
|
|
217
|
+
/** Request to receive a specific order */
|
|
218
218
|
export interface GetOrderRequest {
|
|
219
219
|
/** Account ID */
|
|
220
220
|
accountId: string;
|
|
221
221
|
/** Order ID */
|
|
222
222
|
orderId: string;
|
|
223
223
|
}
|
|
224
|
-
/** Order
|
|
224
|
+
/** Order Information */
|
|
225
225
|
export interface Order {
|
|
226
226
|
/** Account ID */
|
|
227
227
|
accountId: string;
|
|
228
|
-
/**
|
|
228
|
+
/** Symbol */
|
|
229
229
|
symbol: string;
|
|
230
|
-
/** Quantity in
|
|
230
|
+
/** Quantity in pcs. */
|
|
231
231
|
quantity: Decimal | undefined;
|
|
232
232
|
/** Side (long or short) */
|
|
233
233
|
side: Side;
|
|
@@ -235,24 +235,24 @@ export interface Order {
|
|
|
235
235
|
type: OrderType;
|
|
236
236
|
/** Order validity period */
|
|
237
237
|
timeInForce: TimeInForce;
|
|
238
|
-
/** Required for limit and stop
|
|
238
|
+
/** Required for limit and stop-limit orders */
|
|
239
239
|
limitPrice: Decimal | undefined;
|
|
240
|
-
/** Required for market
|
|
240
|
+
/** Required for stop market and stop limit orders */
|
|
241
241
|
stopPrice: Decimal | undefined;
|
|
242
|
-
/** Required for market
|
|
242
|
+
/** Required for stop market and stop limit orders */
|
|
243
243
|
stopCondition: StopCondition;
|
|
244
|
-
/** Required for multi
|
|
244
|
+
/** Required for multi-leg orders */
|
|
245
245
|
legs: Leg[];
|
|
246
|
-
/** Unique
|
|
246
|
+
/** Unique request ID. Automatically generated if not submitted. (Maximum 20 characters) */
|
|
247
247
|
clientOrderId: string;
|
|
248
|
-
/**
|
|
248
|
+
/** The validity period of a conditional order. This is populated for orders with the ORDER_TYPE_STOP ORDER_TYPE_STOP_LIMIT type. */
|
|
249
249
|
validBefore: ValidBefore;
|
|
250
|
-
/** Order
|
|
250
|
+
/** Order label. (maximum 128 characters) */
|
|
251
251
|
comment: string;
|
|
252
252
|
}
|
|
253
|
-
/**
|
|
253
|
+
/** Leg */
|
|
254
254
|
export interface Leg {
|
|
255
|
-
/**
|
|
255
|
+
/** Symbol */
|
|
256
256
|
symbol: string;
|
|
257
257
|
/** Quantity */
|
|
258
258
|
quantity: Decimal | undefined;
|
|
@@ -265,73 +265,73 @@ export interface OrderState {
|
|
|
265
265
|
orderId: string;
|
|
266
266
|
/** Execution ID */
|
|
267
267
|
execId: string;
|
|
268
|
-
/** Order
|
|
268
|
+
/** Order Status */
|
|
269
269
|
status: OrderStatus;
|
|
270
|
-
/**
|
|
270
|
+
/** Request */
|
|
271
271
|
order: Order | undefined;
|
|
272
|
-
/** Date and time of order */
|
|
272
|
+
/** Date and time of order submission */
|
|
273
273
|
transactAt: Date | undefined;
|
|
274
274
|
/** Date and time of order acceptance */
|
|
275
275
|
acceptAt: Date | undefined;
|
|
276
|
-
/** Date and time of cancellation
|
|
276
|
+
/** Date and time of order cancellation */
|
|
277
277
|
withdrawAt: Date | undefined;
|
|
278
|
-
/** Initial quantity
|
|
278
|
+
/** Initial quantity (filled only for exchange orders) */
|
|
279
279
|
initialQuantity: Decimal | undefined;
|
|
280
|
-
/** Executed
|
|
280
|
+
/** Executed volume (filled only for exchange orders) */
|
|
281
281
|
executedQuantity: Decimal | undefined;
|
|
282
|
-
/** Remaining quantity
|
|
282
|
+
/** Remaining quantity (only filled in for exchange orders) */
|
|
283
283
|
remainingQuantity: Decimal | undefined;
|
|
284
|
-
/**
|
|
284
|
+
/** SL/TP Order Information */
|
|
285
285
|
sltpOrder: SLTPOrder | undefined;
|
|
286
|
-
/**
|
|
286
|
+
/** ID of the exchange order generated as a result of a met condition or stop price trigger. */
|
|
287
287
|
triggeredOrderId: string;
|
|
288
288
|
}
|
|
289
|
-
/** Request
|
|
289
|
+
/** Request to receive a list of trade orders */
|
|
290
290
|
export interface OrdersRequest {
|
|
291
291
|
/** Account ID */
|
|
292
292
|
accountId: string;
|
|
293
293
|
}
|
|
294
|
-
/**
|
|
294
|
+
/** List of trade requests */
|
|
295
295
|
export interface OrdersResponse {
|
|
296
|
-
/**
|
|
296
|
+
/** Orders */
|
|
297
297
|
orders: OrderState[];
|
|
298
298
|
}
|
|
299
|
-
/** Request order
|
|
299
|
+
/** Request to cancel a trade order */
|
|
300
300
|
export interface CancelOrderRequest {
|
|
301
301
|
/** Account ID */
|
|
302
302
|
accountId: string;
|
|
303
303
|
/** Order ID */
|
|
304
304
|
orderId: string;
|
|
305
305
|
}
|
|
306
|
-
/**
|
|
306
|
+
/** SL/TP Order Information */
|
|
307
307
|
export interface SLTPOrder {
|
|
308
308
|
/** Account ID */
|
|
309
309
|
accountId: string;
|
|
310
|
-
/**
|
|
310
|
+
/** Symbol */
|
|
311
311
|
symbol: string;
|
|
312
312
|
/** Side for both orders */
|
|
313
313
|
side: Side;
|
|
314
|
-
/**
|
|
314
|
+
/** Quantity in units for SL */
|
|
315
315
|
quantitySl: Decimal | undefined;
|
|
316
|
-
/** Price condition parameter for SL part */
|
|
316
|
+
/** Price condition parameter for the SL part */
|
|
317
317
|
slPrice: Decimal | undefined;
|
|
318
|
-
/** If specified, after SL activation a limit order will be placed with this price */
|
|
318
|
+
/** If specified, after SL activation a limit order will be placed with this price. */
|
|
319
319
|
limitPrice: Decimal | undefined;
|
|
320
|
-
/**
|
|
320
|
+
/** Quantity in pieces for TP */
|
|
321
321
|
quantityTp: Decimal | undefined;
|
|
322
|
-
/** Price condition parameter for TP part */
|
|
322
|
+
/** Price condition parameter for the TP part */
|
|
323
323
|
tpPrice: Decimal | undefined;
|
|
324
|
-
/** If specified, after TP activation a limit order will be placed taking into account the protective spread */
|
|
324
|
+
/** If specified, after TP activation, a limit order will be placed taking into account the protective spread. */
|
|
325
325
|
tpGuardSpread: Decimal | undefined;
|
|
326
|
-
/** Unit
|
|
326
|
+
/** Unit of measurement of the protective spread */
|
|
327
327
|
tpSpreadMeasure: TPSpreadMeasure;
|
|
328
|
-
/** Unique identifier
|
|
328
|
+
/** Unique request identifier. Automatically generated if not submitted. (Maximum 20 characters) */
|
|
329
329
|
clientOrderId: string;
|
|
330
|
-
/** Conditional
|
|
330
|
+
/** Conditional order validity period. If left blank, VALID_BEFORE_GOOD_TILL_CANCEL is set by default. */
|
|
331
331
|
validBefore: ValidBefore;
|
|
332
|
-
/** SL/TP
|
|
332
|
+
/** SL/TP order expiration timestamp */
|
|
333
333
|
validExpiryTime: Date | undefined;
|
|
334
|
-
/** Order
|
|
334
|
+
/** Order label. (maximum 128 characters) */
|
|
335
335
|
comment: string;
|
|
336
336
|
}
|
|
337
337
|
export declare const OrderTradeRequest: MessageFns<OrderTradeRequest>;
|
|
@@ -348,33 +348,33 @@ export declare const OrdersRequest: MessageFns<OrdersRequest>;
|
|
|
348
348
|
export declare const OrdersResponse: MessageFns<OrdersResponse>;
|
|
349
349
|
export declare const CancelOrderRequest: MessageFns<CancelOrderRequest>;
|
|
350
350
|
export declare const SLTPOrder: MessageFns<SLTPOrder>;
|
|
351
|
-
/** Order
|
|
351
|
+
/** Order Service */
|
|
352
352
|
export type OrdersServiceDefinition = typeof OrdersServiceDefinition;
|
|
353
353
|
export declare const OrdersServiceDefinition: {
|
|
354
354
|
readonly name: "OrdersService";
|
|
355
355
|
readonly fullName: "grpc.tradeapi.v1.orders.OrdersService";
|
|
356
356
|
readonly methods: {
|
|
357
357
|
/**
|
|
358
|
-
*
|
|
359
|
-
*
|
|
358
|
+
* Placing an exchange order
|
|
359
|
+
* HTTP request example:
|
|
360
360
|
* POST /v1/accounts/A12345/orders
|
|
361
361
|
* Content-Type: application/json
|
|
362
362
|
* Authorization: <token>
|
|
363
363
|
*
|
|
364
364
|
* {
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
365
|
+
* "symbol": "AAPL@XNAS"
|
|
366
|
+
* "quantity": {
|
|
367
|
+
* "value": "10"
|
|
368
|
+
* }"
|
|
369
|
+
* "side": "SIDE_BUY"
|
|
370
|
+
* "type": "ORDER_TYPE_LIMIT"
|
|
371
|
+
* "time_in_force": "TIME_IN_FORCE_DAY"
|
|
372
|
+
* "limit_price": {
|
|
373
|
+
* "value": "150.50"
|
|
374
|
+
* }
|
|
375
375
|
* }
|
|
376
376
|
*
|
|
377
|
-
* The account_id field is taken from
|
|
377
|
+
* The account_id field is taken from URL-paths" the remaining fields are passed in the request body
|
|
378
378
|
*/
|
|
379
379
|
readonly placeOrder: {
|
|
380
380
|
readonly name: "PlaceOrder";
|
|
@@ -390,8 +390,8 @@ export declare const OrdersServiceDefinition: {
|
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
392
|
/**
|
|
393
|
-
* Cancel
|
|
394
|
-
*
|
|
393
|
+
* Cancel exchange order
|
|
394
|
+
* HTTP request example:
|
|
395
395
|
* DELETE /v1/accounts/A12345/orders/ORD789012
|
|
396
396
|
* Authorization: <token>
|
|
397
397
|
*/
|
|
@@ -409,8 +409,8 @@ export declare const OrdersServiceDefinition: {
|
|
|
409
409
|
};
|
|
410
410
|
};
|
|
411
411
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
412
|
+
* Getting a list of requests for an account
|
|
413
|
+
* HTTP request example:
|
|
414
414
|
* GET /v1/accounts/A12345/orders
|
|
415
415
|
* Authorization: <token>
|
|
416
416
|
*/
|
|
@@ -428,8 +428,8 @@ export declare const OrdersServiceDefinition: {
|
|
|
428
428
|
};
|
|
429
429
|
};
|
|
430
430
|
/**
|
|
431
|
-
* Get a specific order
|
|
432
|
-
*
|
|
431
|
+
* Get information about a specific order
|
|
432
|
+
* HTTP request example:
|
|
433
433
|
* GET /v1/accounts/A12345/orders/ORD789012
|
|
434
434
|
* Authorization: <token>
|
|
435
435
|
*/
|
|
@@ -447,7 +447,7 @@ export declare const OrdersServiceDefinition: {
|
|
|
447
447
|
};
|
|
448
448
|
};
|
|
449
449
|
/**
|
|
450
|
-
* Subscribe to
|
|
450
|
+
* Subscribe to your own orders and trades. Stream method
|
|
451
451
|
*
|
|
452
452
|
* @deprecated
|
|
453
453
|
*/
|
|
@@ -459,7 +459,7 @@ export declare const OrdersServiceDefinition: {
|
|
|
459
459
|
readonly responseStream: true;
|
|
460
460
|
readonly options: {};
|
|
461
461
|
};
|
|
462
|
-
/** Subscribe to
|
|
462
|
+
/** Subscribe to your own orders. Stream method */
|
|
463
463
|
readonly subscribeOrders: {
|
|
464
464
|
readonly name: "SubscribeOrders";
|
|
465
465
|
readonly requestType: typeof SubscribeOrdersRequest;
|
|
@@ -468,7 +468,7 @@ export declare const OrdersServiceDefinition: {
|
|
|
468
468
|
readonly responseStream: true;
|
|
469
469
|
readonly options: {};
|
|
470
470
|
};
|
|
471
|
-
/** Subscribe to
|
|
471
|
+
/** Subscribe to your own trades. Stream method */
|
|
472
472
|
readonly subscribeTrades: {
|
|
473
473
|
readonly name: "SubscribeTrades";
|
|
474
474
|
readonly requestType: typeof SubscribeTradesRequest;
|
|
@@ -478,39 +478,39 @@ export declare const OrdersServiceDefinition: {
|
|
|
478
478
|
readonly options: {};
|
|
479
479
|
};
|
|
480
480
|
/**
|
|
481
|
-
*
|
|
481
|
+
* Issuing an SL/TP order
|
|
482
482
|
* Example HTTP request:
|
|
483
483
|
* POST /v1/accounts/A12345/sltp-orders
|
|
484
484
|
* Content-Type: application/json
|
|
485
485
|
* Authorization: <token>
|
|
486
486
|
*
|
|
487
487
|
* {
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
488
|
+
* "symbol": "AAPL@XNAS"
|
|
489
|
+
* "side": "SIDE_BUY"
|
|
490
|
+
* "quantity_sl": {
|
|
491
|
+
* "value": "10"
|
|
492
|
+
* }"
|
|
493
|
+
* "sl_price": {
|
|
494
|
+
* "value": "270.00"
|
|
495
|
+
* }"
|
|
496
|
+
* "limit_price": {
|
|
497
|
+
* "value": "269.50"
|
|
498
|
+
* }"
|
|
499
|
+
* "quantity_tp": {
|
|
500
|
+
* "value": "10"
|
|
501
|
+
* }"
|
|
502
|
+
* "tp_price": {
|
|
503
|
+
* "value": "295.50"
|
|
504
|
+
* }"
|
|
505
|
+
* "tp_guard_spread": {
|
|
506
|
+
* "value": "0.5" }"
|
|
507
|
+
* "tp_spread_measure": "TP_SPREAD_MEASURE_VALUE"
|
|
508
|
+
* "valid_before": "VALID_BEFORE_GOOD_TILL_DATE"
|
|
509
|
+
* "valid_expiry_time": "2026-12-31T23:59:59Z"
|
|
510
|
+
* "comment": "my SL/TP order"
|
|
511
511
|
* }
|
|
512
512
|
*
|
|
513
|
-
*
|
|
513
|
+
* The account_id field is taken from the URL path, the remaining fields are passed in the request body
|
|
514
514
|
*/
|
|
515
515
|
readonly placeSLTPOrder: {
|
|
516
516
|
readonly name: "PlaceSLTPOrder";
|
|
@@ -529,185 +529,185 @@ export declare const OrdersServiceDefinition: {
|
|
|
529
529
|
};
|
|
530
530
|
export interface OrdersServiceImplementation<CallContextExt = {}> {
|
|
531
531
|
/**
|
|
532
|
-
*
|
|
533
|
-
*
|
|
532
|
+
* Placing an exchange order
|
|
533
|
+
* HTTP request example:
|
|
534
534
|
* POST /v1/accounts/A12345/orders
|
|
535
535
|
* Content-Type: application/json
|
|
536
536
|
* Authorization: <token>
|
|
537
537
|
*
|
|
538
538
|
* {
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
539
|
+
* "symbol": "AAPL@XNAS"
|
|
540
|
+
* "quantity": {
|
|
541
|
+
* "value": "10"
|
|
542
|
+
* }"
|
|
543
|
+
* "side": "SIDE_BUY"
|
|
544
|
+
* "type": "ORDER_TYPE_LIMIT"
|
|
545
|
+
* "time_in_force": "TIME_IN_FORCE_DAY"
|
|
546
|
+
* "limit_price": {
|
|
547
|
+
* "value": "150.50"
|
|
548
|
+
* }
|
|
549
549
|
* }
|
|
550
550
|
*
|
|
551
|
-
* The account_id field is taken from
|
|
551
|
+
* The account_id field is taken from URL-paths" the remaining fields are passed in the request body
|
|
552
552
|
*/
|
|
553
553
|
placeOrder(request: Order, context: CallContext & CallContextExt): Promise<DeepPartial<OrderState>>;
|
|
554
554
|
/**
|
|
555
|
-
* Cancel
|
|
556
|
-
*
|
|
555
|
+
* Cancel exchange order
|
|
556
|
+
* HTTP request example:
|
|
557
557
|
* DELETE /v1/accounts/A12345/orders/ORD789012
|
|
558
558
|
* Authorization: <token>
|
|
559
559
|
*/
|
|
560
560
|
cancelOrder(request: CancelOrderRequest, context: CallContext & CallContextExt): Promise<DeepPartial<OrderState>>;
|
|
561
561
|
/**
|
|
562
|
-
*
|
|
563
|
-
*
|
|
562
|
+
* Getting a list of requests for an account
|
|
563
|
+
* HTTP request example:
|
|
564
564
|
* GET /v1/accounts/A12345/orders
|
|
565
565
|
* Authorization: <token>
|
|
566
566
|
*/
|
|
567
567
|
getOrders(request: OrdersRequest, context: CallContext & CallContextExt): Promise<DeepPartial<OrdersResponse>>;
|
|
568
568
|
/**
|
|
569
|
-
* Get a specific order
|
|
570
|
-
*
|
|
569
|
+
* Get information about a specific order
|
|
570
|
+
* HTTP request example:
|
|
571
571
|
* GET /v1/accounts/A12345/orders/ORD789012
|
|
572
572
|
* Authorization: <token>
|
|
573
573
|
*/
|
|
574
574
|
getOrder(request: GetOrderRequest, context: CallContext & CallContextExt): Promise<DeepPartial<OrderState>>;
|
|
575
575
|
/**
|
|
576
|
-
* Subscribe to
|
|
576
|
+
* Subscribe to your own orders and trades. Stream method
|
|
577
577
|
*
|
|
578
578
|
* @deprecated
|
|
579
579
|
*/
|
|
580
580
|
subscribeOrderTrade(request: AsyncIterable<OrderTradeRequest>, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<OrderTradeResponse>>;
|
|
581
|
-
/** Subscribe to
|
|
581
|
+
/** Subscribe to your own orders. Stream method */
|
|
582
582
|
subscribeOrders(request: SubscribeOrdersRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<SubscribeOrdersResponse>>;
|
|
583
|
-
/** Subscribe to
|
|
583
|
+
/** Subscribe to your own trades. Stream method */
|
|
584
584
|
subscribeTrades(request: SubscribeTradesRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<SubscribeTradesResponse>>;
|
|
585
585
|
/**
|
|
586
|
-
*
|
|
586
|
+
* Issuing an SL/TP order
|
|
587
587
|
* Example HTTP request:
|
|
588
588
|
* POST /v1/accounts/A12345/sltp-orders
|
|
589
589
|
* Content-Type: application/json
|
|
590
590
|
* Authorization: <token>
|
|
591
591
|
*
|
|
592
592
|
* {
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
593
|
+
* "symbol": "AAPL@XNAS"
|
|
594
|
+
* "side": "SIDE_BUY"
|
|
595
|
+
* "quantity_sl": {
|
|
596
|
+
* "value": "10"
|
|
597
|
+
* }"
|
|
598
|
+
* "sl_price": {
|
|
599
|
+
* "value": "270.00"
|
|
600
|
+
* }"
|
|
601
|
+
* "limit_price": {
|
|
602
|
+
* "value": "269.50"
|
|
603
|
+
* }"
|
|
604
|
+
* "quantity_tp": {
|
|
605
|
+
* "value": "10"
|
|
606
|
+
* }"
|
|
607
|
+
* "tp_price": {
|
|
608
|
+
* "value": "295.50"
|
|
609
|
+
* }"
|
|
610
|
+
* "tp_guard_spread": {
|
|
611
|
+
* "value": "0.5" }"
|
|
612
|
+
* "tp_spread_measure": "TP_SPREAD_MEASURE_VALUE"
|
|
613
|
+
* "valid_before": "VALID_BEFORE_GOOD_TILL_DATE"
|
|
614
|
+
* "valid_expiry_time": "2026-12-31T23:59:59Z"
|
|
615
|
+
* "comment": "my SL/TP order"
|
|
616
616
|
* }
|
|
617
617
|
*
|
|
618
|
-
*
|
|
618
|
+
* The account_id field is taken from the URL path, the remaining fields are passed in the request body
|
|
619
619
|
*/
|
|
620
620
|
placeSLTPOrder(request: SLTPOrder, context: CallContext & CallContextExt): Promise<DeepPartial<OrderState>>;
|
|
621
621
|
}
|
|
622
622
|
export interface OrdersServiceClient<CallOptionsExt = {}> {
|
|
623
623
|
/**
|
|
624
|
-
*
|
|
625
|
-
*
|
|
624
|
+
* Placing an exchange order
|
|
625
|
+
* HTTP request example:
|
|
626
626
|
* POST /v1/accounts/A12345/orders
|
|
627
627
|
* Content-Type: application/json
|
|
628
628
|
* Authorization: <token>
|
|
629
629
|
*
|
|
630
630
|
* {
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
631
|
+
* "symbol": "AAPL@XNAS"
|
|
632
|
+
* "quantity": {
|
|
633
|
+
* "value": "10"
|
|
634
|
+
* }"
|
|
635
|
+
* "side": "SIDE_BUY"
|
|
636
|
+
* "type": "ORDER_TYPE_LIMIT"
|
|
637
|
+
* "time_in_force": "TIME_IN_FORCE_DAY"
|
|
638
|
+
* "limit_price": {
|
|
639
|
+
* "value": "150.50"
|
|
640
|
+
* }
|
|
641
641
|
* }
|
|
642
642
|
*
|
|
643
|
-
* The account_id field is taken from
|
|
643
|
+
* The account_id field is taken from URL-paths" the remaining fields are passed in the request body
|
|
644
644
|
*/
|
|
645
645
|
placeOrder(request: DeepPartial<Order>, options?: CallOptions & CallOptionsExt): Promise<OrderState>;
|
|
646
646
|
/**
|
|
647
|
-
* Cancel
|
|
648
|
-
*
|
|
647
|
+
* Cancel exchange order
|
|
648
|
+
* HTTP request example:
|
|
649
649
|
* DELETE /v1/accounts/A12345/orders/ORD789012
|
|
650
650
|
* Authorization: <token>
|
|
651
651
|
*/
|
|
652
652
|
cancelOrder(request: DeepPartial<CancelOrderRequest>, options?: CallOptions & CallOptionsExt): Promise<OrderState>;
|
|
653
653
|
/**
|
|
654
|
-
*
|
|
655
|
-
*
|
|
654
|
+
* Getting a list of requests for an account
|
|
655
|
+
* HTTP request example:
|
|
656
656
|
* GET /v1/accounts/A12345/orders
|
|
657
657
|
* Authorization: <token>
|
|
658
658
|
*/
|
|
659
659
|
getOrders(request: DeepPartial<OrdersRequest>, options?: CallOptions & CallOptionsExt): Promise<OrdersResponse>;
|
|
660
660
|
/**
|
|
661
|
-
* Get a specific order
|
|
662
|
-
*
|
|
661
|
+
* Get information about a specific order
|
|
662
|
+
* HTTP request example:
|
|
663
663
|
* GET /v1/accounts/A12345/orders/ORD789012
|
|
664
664
|
* Authorization: <token>
|
|
665
665
|
*/
|
|
666
666
|
getOrder(request: DeepPartial<GetOrderRequest>, options?: CallOptions & CallOptionsExt): Promise<OrderState>;
|
|
667
667
|
/**
|
|
668
|
-
* Subscribe to
|
|
668
|
+
* Subscribe to your own orders and trades. Stream method
|
|
669
669
|
*
|
|
670
670
|
* @deprecated
|
|
671
671
|
*/
|
|
672
672
|
subscribeOrderTrade(request: AsyncIterable<DeepPartial<OrderTradeRequest>>, options?: CallOptions & CallOptionsExt): AsyncIterable<OrderTradeResponse>;
|
|
673
|
-
/** Subscribe to
|
|
673
|
+
/** Subscribe to your own orders. Stream method */
|
|
674
674
|
subscribeOrders(request: DeepPartial<SubscribeOrdersRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<SubscribeOrdersResponse>;
|
|
675
|
-
/** Subscribe to
|
|
675
|
+
/** Subscribe to your own trades. Stream method */
|
|
676
676
|
subscribeTrades(request: DeepPartial<SubscribeTradesRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<SubscribeTradesResponse>;
|
|
677
677
|
/**
|
|
678
|
-
*
|
|
678
|
+
* Issuing an SL/TP order
|
|
679
679
|
* Example HTTP request:
|
|
680
680
|
* POST /v1/accounts/A12345/sltp-orders
|
|
681
681
|
* Content-Type: application/json
|
|
682
682
|
* Authorization: <token>
|
|
683
683
|
*
|
|
684
684
|
* {
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
685
|
+
* "symbol": "AAPL@XNAS"
|
|
686
|
+
* "side": "SIDE_BUY"
|
|
687
|
+
* "quantity_sl": {
|
|
688
|
+
* "value": "10"
|
|
689
|
+
* }"
|
|
690
|
+
* "sl_price": {
|
|
691
|
+
* "value": "270.00"
|
|
692
|
+
* }"
|
|
693
|
+
* "limit_price": {
|
|
694
|
+
* "value": "269.50"
|
|
695
|
+
* }"
|
|
696
|
+
* "quantity_tp": {
|
|
697
|
+
* "value": "10"
|
|
698
|
+
* }"
|
|
699
|
+
* "tp_price": {
|
|
700
|
+
* "value": "295.50"
|
|
701
|
+
* }"
|
|
702
|
+
* "tp_guard_spread": {
|
|
703
|
+
* "value": "0.5" }"
|
|
704
|
+
* "tp_spread_measure": "TP_SPREAD_MEASURE_VALUE"
|
|
705
|
+
* "valid_before": "VALID_BEFORE_GOOD_TILL_DATE"
|
|
706
|
+
* "valid_expiry_time": "2026-12-31T23:59:59Z"
|
|
707
|
+
* "comment": "my SL/TP order"
|
|
708
708
|
* }
|
|
709
709
|
*
|
|
710
|
-
*
|
|
710
|
+
* The account_id field is taken from the URL path, the remaining fields are passed in the request body
|
|
711
711
|
*/
|
|
712
712
|
placeSLTPOrder(request: DeepPartial<SLTPOrder>, options?: CallOptions & CallOptionsExt): Promise<OrderState>;
|
|
713
713
|
}
|