@distilled.cloud/questrade 0.0.0 → 1.0.0-rc.19
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/LICENSE +201 -0
- package/README.md +83 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +49 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +50 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +37 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/index.lazy.js +6 -0
- package/lib/index.lazy.js.map +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +1 -0
- package/lib/services/questrade.d.ts +1228 -0
- package/lib/services/questrade.d.ts.map +1 -0
- package/lib/services/questrade.js +42 -0
- package/lib/services/questrade.js.map +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/questrade.js +3 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +76 -2
- package/src/credentials.ts +216 -0
- package/src/errors.ts +77 -0
- package/src/index.ts +36 -0
- package/src/protocol.ts +55 -0
- package/src/retry.ts +69 -0
- package/src/services/index.ts +2 -0
- package/src/services/questrade.ts +2666 -0
- package/src/traits.ts +44 -0
|
@@ -0,0 +1,2666 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-questrade). Do not edit.
|
|
3
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
4
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import { UnknownQuestradeError } from "../errors.ts";
|
|
6
|
+
import { QuestradeProtocol, type QuestradeOpError, type QuestradeOpContext } from "../protocol.ts";
|
|
7
|
+
import * as Retry from "../retry.ts";
|
|
8
|
+
import * as T from "../traits.ts";
|
|
9
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
10
|
+
const __s: any[] = [];
|
|
11
|
+
|
|
12
|
+
export type { QuestradeOpError, QuestradeOpContext };
|
|
13
|
+
|
|
14
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
15
|
+
const TELEMETRY = {
|
|
16
|
+
system: "questrade-api",
|
|
17
|
+
responseHeaders: [
|
|
18
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
19
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
20
|
+
],
|
|
21
|
+
prefix: "Questrade",
|
|
22
|
+
service: "Questrade",
|
|
23
|
+
labels: "questrade",
|
|
24
|
+
propagate: "w3c",
|
|
25
|
+
} as const;
|
|
26
|
+
|
|
27
|
+
export interface CancelOrderRequest {
|
|
28
|
+
/** Account number against which order is being submitted. Can occur in the 'Location' header only. */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Internal identifier of the order. Can occur in the 'Location' header only. */
|
|
31
|
+
orderId: number;
|
|
32
|
+
}
|
|
33
|
+
export interface CancelOrderResponse {
|
|
34
|
+
/** Internal identifier of the order. */
|
|
35
|
+
orderId?: number | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface GetBalancesRequest {
|
|
38
|
+
/** Account number. Can occur in the 'location' header only. */
|
|
39
|
+
id: string;
|
|
40
|
+
}
|
|
41
|
+
/** Currency */
|
|
42
|
+
export type Currency = "USD" | "CAD";
|
|
43
|
+
export interface Balance {
|
|
44
|
+
/** Currency of the balance figure(e.g., "USD" or "CAD"). See Currency section for all allowed values. */
|
|
45
|
+
currency?: Currency | undefined;
|
|
46
|
+
/** Balance amount. */
|
|
47
|
+
cash?: number | undefined;
|
|
48
|
+
/** Market value of all securities in the account in a given currency. */
|
|
49
|
+
marketValue?: number | undefined;
|
|
50
|
+
/** Equity as a difference between cash and marketValue properties. */
|
|
51
|
+
totalEquity?: number | undefined;
|
|
52
|
+
/** Buying power for that particular currency side of the account. */
|
|
53
|
+
buyingPower?: number | undefined;
|
|
54
|
+
/** Maintenance excess for that particular side of the account. */
|
|
55
|
+
maintenanceExcess?: number | undefined;
|
|
56
|
+
/** Whether real-time data was used to calculate the above values. */
|
|
57
|
+
isRealTime?: boolean | undefined;
|
|
58
|
+
}
|
|
59
|
+
/** List of account records. */
|
|
60
|
+
export type GetBalancesResponsePerCurrencyBalancesList = Array<Balance>;
|
|
61
|
+
/** List of Balance records. */
|
|
62
|
+
export type GetBalancesResponseCombinedBalancesList = Array<Balance>;
|
|
63
|
+
export type GetBalancesResponseSodPerCurrencyBalancesList = Array<Balance>;
|
|
64
|
+
/** List of Balance records. */
|
|
65
|
+
export type GetBalancesResponseSodCombinedBalancesList = Array<Balance>;
|
|
66
|
+
export interface GetBalancesResponse {
|
|
67
|
+
/** List of account records. */
|
|
68
|
+
perCurrencyBalances?: GetBalancesResponsePerCurrencyBalancesList | undefined;
|
|
69
|
+
/** List of Balance records. */
|
|
70
|
+
combinedBalances?: GetBalancesResponseCombinedBalancesList | undefined;
|
|
71
|
+
sodPerCurrencyBalances?: GetBalancesResponseSodPerCurrencyBalancesList | undefined;
|
|
72
|
+
/** List of Balance records. */
|
|
73
|
+
sodCombinedBalances?: GetBalancesResponseSodCombinedBalancesList | undefined;
|
|
74
|
+
}
|
|
75
|
+
/** Order Type */
|
|
76
|
+
export type OrderType =
|
|
77
|
+
| "Market"
|
|
78
|
+
| "Limit"
|
|
79
|
+
| "Stop"
|
|
80
|
+
| "StopLimit"
|
|
81
|
+
| "TrailStopInPercentage"
|
|
82
|
+
| "TrailStopInDollar"
|
|
83
|
+
| "TrailStopLimitInPercentage"
|
|
84
|
+
| "TrailStopLimitInDollar"
|
|
85
|
+
| "LimitOnOpen"
|
|
86
|
+
| "LimitOnClose";
|
|
87
|
+
/** Order Time-In-Force */
|
|
88
|
+
export type OrderTimeInForce =
|
|
89
|
+
| "Day"
|
|
90
|
+
| "GoodTillCanceled"
|
|
91
|
+
| "GoodTillExtendedDay"
|
|
92
|
+
| "GoodTillDate"
|
|
93
|
+
| "ImmediateOrCancel"
|
|
94
|
+
| "FillOrKill";
|
|
95
|
+
/** Order Class */
|
|
96
|
+
export type OrderClass = "Primary" | "Limit" | "StopLoss";
|
|
97
|
+
/** Order Action */
|
|
98
|
+
export type OrderAction = "Buy" | "Sell";
|
|
99
|
+
export interface GetBracketOrderImpactRequestComponentsItem {
|
|
100
|
+
/** Limit price */
|
|
101
|
+
limitPrice?: number | undefined;
|
|
102
|
+
/** Stop price */
|
|
103
|
+
stopPrice?: number | undefined;
|
|
104
|
+
/** Order type (e.g., "Market "). See Order Type section for all allowed values. */
|
|
105
|
+
orderType?: OrderType | (string & {}) | undefined;
|
|
106
|
+
/** Order duration (e.g., "DAY "). See Order Duration section for all allowed values. */
|
|
107
|
+
timeInForce?: OrderTimeInForce | (string & {}) | undefined;
|
|
108
|
+
/** For bracket order describes the type of component See Order Class section for all allowed values */
|
|
109
|
+
orderClass?: OrderClass | (string & {}) | undefined;
|
|
110
|
+
/** Order quantity */
|
|
111
|
+
quantity?: number | undefined;
|
|
112
|
+
/** Order (e.g., "Buy "), required only on initial insertion See Order Action section for all allowed values. */
|
|
113
|
+
action?: OrderAction | (string & {}) | undefined;
|
|
114
|
+
/** Order ID of active order, or 0 for new order */
|
|
115
|
+
orderId?: number | undefined;
|
|
116
|
+
}
|
|
117
|
+
/** List of bracket order components */
|
|
118
|
+
export type GetBracketOrderImpactRequestComponentsList =
|
|
119
|
+
Array<GetBracketOrderImpactRequestComponentsItem>;
|
|
120
|
+
export interface GetBracketOrderImpactRequest {
|
|
121
|
+
/** Account number against which order is being submitted. Can occur in the 'Location' header only. */
|
|
122
|
+
id: string;
|
|
123
|
+
/** Internal symbol identifier. */
|
|
124
|
+
symbolId?: number | undefined;
|
|
125
|
+
/** Primary order route (e.g., "AUTO"). */
|
|
126
|
+
primaryRoute?: string | undefined;
|
|
127
|
+
/** Secondary order route (e.g., "NYSE"). */
|
|
128
|
+
secondaryRoute?: string | undefined;
|
|
129
|
+
/** List of bracket order components */
|
|
130
|
+
components?: GetBracketOrderImpactRequestComponentsList | undefined;
|
|
131
|
+
}
|
|
132
|
+
export interface GetBracketOrderImpactResponse {
|
|
133
|
+
/** Estimate of commissions to be charged on the order. */
|
|
134
|
+
estimatedCommissions?: number | undefined;
|
|
135
|
+
/** Estimate of change in buying power from the order. */
|
|
136
|
+
buyingPowerEffect?: number | undefined;
|
|
137
|
+
/** Estimate of buying power in which order will result. */
|
|
138
|
+
buyingPowerResult?: number | undefined;
|
|
139
|
+
/** Estimate of change in maintenance excess from the order. */
|
|
140
|
+
maintExcessEffect?: number | undefined;
|
|
141
|
+
/** Estimate of maintenance excess in which the order will result. */
|
|
142
|
+
maintExcessResult?: number | undefined;
|
|
143
|
+
/** Client view of the order side (e.g., "Buy-To-Open"). */
|
|
144
|
+
side?: string | undefined;
|
|
145
|
+
/** Estimate of the order execution value. */
|
|
146
|
+
tradeValueCalculation?: string | undefined;
|
|
147
|
+
/** Estimated average fill price. */
|
|
148
|
+
price?: number | undefined;
|
|
149
|
+
}
|
|
150
|
+
export interface GetOptionChainRequest {
|
|
151
|
+
/** Internal symbol identifier. Can occur in the 'location' header only. */
|
|
152
|
+
id: number;
|
|
153
|
+
}
|
|
154
|
+
/** Listing Exchange */
|
|
155
|
+
export type ListingExchange =
|
|
156
|
+
| "TSX"
|
|
157
|
+
| "TSXV"
|
|
158
|
+
| "CNSX"
|
|
159
|
+
| "MX"
|
|
160
|
+
| "NASDAQ"
|
|
161
|
+
| "NYSE"
|
|
162
|
+
| "NYSEAM"
|
|
163
|
+
| "ARCA"
|
|
164
|
+
| "OPRA"
|
|
165
|
+
| "PinkSheets"
|
|
166
|
+
| "OTCBB";
|
|
167
|
+
/** Option Exercise Type */
|
|
168
|
+
export type OptionExerciseType = "American" | "European";
|
|
169
|
+
export interface ChainPerStrikePrice {
|
|
170
|
+
/** Option strike price. */
|
|
171
|
+
strikePrice?: number | undefined;
|
|
172
|
+
/** Internal identifier of the call option symbol. */
|
|
173
|
+
callSymbolId?: number | undefined;
|
|
174
|
+
/** Internal identifier of the put option symbol. */
|
|
175
|
+
putSymbolId?: number | undefined;
|
|
176
|
+
}
|
|
177
|
+
/** List of ChainPerStrikePrice elements. */
|
|
178
|
+
export type ChainPerRootChainPerStrikePriceList = Array<ChainPerStrikePrice>;
|
|
179
|
+
export interface ChainPerRoot {
|
|
180
|
+
/** List of ChainPerStrikePrice elements. */
|
|
181
|
+
chainPerStrikePrice?: ChainPerRootChainPerStrikePriceList | undefined;
|
|
182
|
+
multiplier?: number | undefined;
|
|
183
|
+
/** Option root symbol. */
|
|
184
|
+
optionRoot?: string | undefined;
|
|
185
|
+
}
|
|
186
|
+
/** List of ChainPerRoot elements. */
|
|
187
|
+
export type GetOptionChainResponseOptionsItemChainPerRootList = Array<ChainPerRoot>;
|
|
188
|
+
export interface GetOptionChainResponseOptionsItem {
|
|
189
|
+
/** Option expiry date. */
|
|
190
|
+
expiryDate?: string | undefined;
|
|
191
|
+
/** Description of the underlying option. */
|
|
192
|
+
description?: string | undefined;
|
|
193
|
+
/** Primary listing exchange. See Listing Exchange section for the list of all listing exchanges. */
|
|
194
|
+
listingExchange?: ListingExchange | undefined;
|
|
195
|
+
/** Option exercise style (e.g., "American"). See Option Exercise Type section for all allowed values. */
|
|
196
|
+
optionExerciseType?: OptionExerciseType | undefined;
|
|
197
|
+
/** List of ChainPerRoot elements. */
|
|
198
|
+
chainPerRoot?: GetOptionChainResponseOptionsItemChainPerRootList | undefined;
|
|
199
|
+
}
|
|
200
|
+
export type GetOptionChainResponseOptionsList = Array<GetOptionChainResponseOptionsItem>;
|
|
201
|
+
export interface GetOptionChainResponse {
|
|
202
|
+
optionChain?: GetOptionChainResponseOptionsList | undefined;
|
|
203
|
+
}
|
|
204
|
+
export interface OptionIdFilter {
|
|
205
|
+
/** Option type */
|
|
206
|
+
optionType?: string | undefined;
|
|
207
|
+
/** Underlying ID */
|
|
208
|
+
underlyingId?: number | undefined;
|
|
209
|
+
/** Expiry date */
|
|
210
|
+
expiryDate?: string | undefined;
|
|
211
|
+
/** Min strike price */
|
|
212
|
+
minstrikePrice?: number | undefined;
|
|
213
|
+
/** Max strike price */
|
|
214
|
+
maxstrikePrice?: number | undefined;
|
|
215
|
+
}
|
|
216
|
+
/** Input array of OptionIdFilter structures */
|
|
217
|
+
export type GetOptionQuotesRequestFiltersList = Array<OptionIdFilter>;
|
|
218
|
+
export type GetOptionQuotesRequestOptionIdsList = Array<number>;
|
|
219
|
+
/** Input array of option IDs. */
|
|
220
|
+
export type GetOptionQuotesRequestIdsList = Array<number>;
|
|
221
|
+
export interface GetOptionQuotesRequest {
|
|
222
|
+
/** Input array of OptionIdFilter structures */
|
|
223
|
+
filters?: GetOptionQuotesRequestFiltersList | undefined;
|
|
224
|
+
optionIds?: GetOptionQuotesRequestOptionIdsList | undefined;
|
|
225
|
+
/** Input array of option IDs. */
|
|
226
|
+
ids?: GetOptionQuotesRequestIdsList | undefined;
|
|
227
|
+
}
|
|
228
|
+
export interface GetOptionQuotesResponseOptionQuotesItem {
|
|
229
|
+
/** Underlying name */
|
|
230
|
+
underlying?: string | undefined;
|
|
231
|
+
/** Underlying ID */
|
|
232
|
+
underlyingId?: number | undefined;
|
|
233
|
+
/** Symbol name */
|
|
234
|
+
symbol?: string | undefined;
|
|
235
|
+
/** Symbol ID */
|
|
236
|
+
symbolId?: number | undefined;
|
|
237
|
+
/** Bid price */
|
|
238
|
+
bidPrice?: number | undefined;
|
|
239
|
+
/** Bid size */
|
|
240
|
+
bidSize?: number | undefined;
|
|
241
|
+
/** Ask price */
|
|
242
|
+
askPrice?: number | undefined;
|
|
243
|
+
/** Ask size */
|
|
244
|
+
askSize?: number | undefined;
|
|
245
|
+
/** Last trade price trade hours */
|
|
246
|
+
lastTradePriceTrHrs?: number | undefined;
|
|
247
|
+
/** Last trade price */
|
|
248
|
+
lastTradePrice?: number | undefined;
|
|
249
|
+
/** Last trade size */
|
|
250
|
+
lastTradeSize?: number | undefined;
|
|
251
|
+
/** Last trade tick */
|
|
252
|
+
lastTradeTick?: string | undefined;
|
|
253
|
+
/** Last trade time */
|
|
254
|
+
lastTradeTime?: string | undefined;
|
|
255
|
+
/** Volume */
|
|
256
|
+
volume?: number | undefined;
|
|
257
|
+
/** Open price */
|
|
258
|
+
openPrice?: number | undefined;
|
|
259
|
+
/** Low price */
|
|
260
|
+
lowPrice?: number | undefined;
|
|
261
|
+
/** Volatility */
|
|
262
|
+
volatility?: number | undefined;
|
|
263
|
+
/** Delta */
|
|
264
|
+
delta?: number | undefined;
|
|
265
|
+
/** Gamma */
|
|
266
|
+
gamma?: number | undefined;
|
|
267
|
+
/** Theta */
|
|
268
|
+
theta?: number | undefined;
|
|
269
|
+
/** Vega */
|
|
270
|
+
vega?: number | undefined;
|
|
271
|
+
/** Rho */
|
|
272
|
+
rho?: number | undefined;
|
|
273
|
+
/** Open interest */
|
|
274
|
+
openInterest?: number | undefined;
|
|
275
|
+
/** How much is data delayed */
|
|
276
|
+
delay?: number | undefined;
|
|
277
|
+
/** Whether or not the symbol was halted */
|
|
278
|
+
isHalted?: boolean | undefined;
|
|
279
|
+
/** Volume Weighted Average Price */
|
|
280
|
+
VWAP?: number | undefined;
|
|
281
|
+
/** High price */
|
|
282
|
+
highPrice?: number | undefined;
|
|
283
|
+
}
|
|
284
|
+
export type GetOptionQuotesResponseOptionQuotesList =
|
|
285
|
+
Array<GetOptionQuotesResponseOptionQuotesItem>;
|
|
286
|
+
export interface GetOptionQuotesResponse {
|
|
287
|
+
optionQuotes?: GetOptionQuotesResponseOptionQuotesList | undefined;
|
|
288
|
+
}
|
|
289
|
+
export interface GetOrderRequest {
|
|
290
|
+
/** Account number. Can occur in the 'location' header only. */
|
|
291
|
+
id: string;
|
|
292
|
+
/** Retrieve single order details. */
|
|
293
|
+
orderId: number;
|
|
294
|
+
/** Start of time range in ISO format. By default - start of today, 12:00am. */
|
|
295
|
+
startTime?: string | undefined;
|
|
296
|
+
/** End of time range in ISO format. By default - end of today, 11:59pm */
|
|
297
|
+
endTime?: string | undefined;
|
|
298
|
+
/** All, Open, Closed - retrieve all, active or closed orders. */
|
|
299
|
+
stateFilter?: string | undefined;
|
|
300
|
+
}
|
|
301
|
+
/** Order Side */
|
|
302
|
+
export type OrderSide = "Buy" | "Sell" | "Short" | "Cov" | "BTO" | "STC" | "STO" | "BTC";
|
|
303
|
+
/** Order State */
|
|
304
|
+
export type OrderState =
|
|
305
|
+
| "Failed"
|
|
306
|
+
| "Pending"
|
|
307
|
+
| "Accepted"
|
|
308
|
+
| "Rejected"
|
|
309
|
+
| "CancelPending"
|
|
310
|
+
| "Canceled"
|
|
311
|
+
| "PartialCanceled"
|
|
312
|
+
| "Partial"
|
|
313
|
+
| "Executed"
|
|
314
|
+
| "ReplacePending"
|
|
315
|
+
| "Replaced"
|
|
316
|
+
| "Stopped"
|
|
317
|
+
| "Suspended"
|
|
318
|
+
| "Expired"
|
|
319
|
+
| "Queued"
|
|
320
|
+
| "Triggered"
|
|
321
|
+
| "Activated"
|
|
322
|
+
| "PendingRiskReview"
|
|
323
|
+
| "ContingentOrder";
|
|
324
|
+
export interface OrderLeg {
|
|
325
|
+
legId?: number | undefined;
|
|
326
|
+
symbol?: string | undefined;
|
|
327
|
+
symbolId?: number | undefined;
|
|
328
|
+
legRatioQuantity?: number | undefined;
|
|
329
|
+
side?: string | undefined;
|
|
330
|
+
avgExecPrice?: unknown | null | undefined;
|
|
331
|
+
lastExecPrice?: unknown | null | undefined;
|
|
332
|
+
}
|
|
333
|
+
/** List of OrderLeg elements. */
|
|
334
|
+
export type OrderLegsList = Array<OrderLeg>;
|
|
335
|
+
export interface Order {
|
|
336
|
+
/** Internal order identifier. */
|
|
337
|
+
id?: number | undefined;
|
|
338
|
+
/** Symbol that follows Questrade symbology (e.g., "TD.TO"). */
|
|
339
|
+
symbol?: string | undefined;
|
|
340
|
+
/** Internal symbol identifier. */
|
|
341
|
+
symbolId?: number | undefined;
|
|
342
|
+
/** Total quantity of the order. */
|
|
343
|
+
totalQuantity?: number | undefined;
|
|
344
|
+
/** Unfilled portion of the order quantity. */
|
|
345
|
+
openQuantity?: number | undefined;
|
|
346
|
+
/** Filled portion of the order quantity. */
|
|
347
|
+
filledQuantity?: number | undefined;
|
|
348
|
+
/** Unfilled portion of the order quantity after cancellation. */
|
|
349
|
+
canceledQuantity?: number | undefined;
|
|
350
|
+
/** Client view of the order side (e.g., "Buy-To-Open"). See Order Side section for all allowed values. */
|
|
351
|
+
side?: OrderSide | undefined;
|
|
352
|
+
type?: string | undefined;
|
|
353
|
+
/** Limit price. */
|
|
354
|
+
limitPrice?: number | undefined;
|
|
355
|
+
/** Stop price. */
|
|
356
|
+
stopPrice?: number | null | undefined;
|
|
357
|
+
/** Specifies all-or-none special instruction. */
|
|
358
|
+
isAllOrNone?: boolean | undefined;
|
|
359
|
+
/** Specifies Anonymous special instruction. */
|
|
360
|
+
isAnonymous?: boolean | undefined;
|
|
361
|
+
icebergQty?: unknown | null | undefined;
|
|
362
|
+
/** Specifies Minimum special instruction. */
|
|
363
|
+
minQuantity?: number | null | undefined;
|
|
364
|
+
/** Average price of all executions received for this order. */
|
|
365
|
+
avgExecPrice?: number | null | undefined;
|
|
366
|
+
/** Price of the last execution received for the order in question. */
|
|
367
|
+
lastExecPrice?: number | null | undefined;
|
|
368
|
+
source?: string | undefined;
|
|
369
|
+
/** See Order Time In Force section for all allowed values. */
|
|
370
|
+
timeInForce?: OrderTimeInForce | undefined;
|
|
371
|
+
/** Good-Till-Date marker and date parameter */
|
|
372
|
+
gtdDate?: string | null | undefined;
|
|
373
|
+
/** See Order State section for all allowed values. */
|
|
374
|
+
state?: OrderState | undefined;
|
|
375
|
+
/** Human readable order rejection reason message. */
|
|
376
|
+
clientReasonStr?: string | undefined;
|
|
377
|
+
/** Internal identifier of a chain to which the order belongs. */
|
|
378
|
+
chainId?: number | undefined;
|
|
379
|
+
/** Order creation time. */
|
|
380
|
+
creationTime?: string | undefined;
|
|
381
|
+
/** Time of the last update. */
|
|
382
|
+
updateTime?: string | undefined;
|
|
383
|
+
/** Notes that may have been manually added by Questrade staff. */
|
|
384
|
+
notes?: string | undefined;
|
|
385
|
+
primaryRoute?: string | undefined;
|
|
386
|
+
secondaryRoute?: string | undefined;
|
|
387
|
+
/** Order route name. */
|
|
388
|
+
orderRoute?: string | undefined;
|
|
389
|
+
/** Venue where non-marketable portion of the order was booked. */
|
|
390
|
+
venueHoldingOrder?: string | undefined;
|
|
391
|
+
comissionCharged?: number | undefined;
|
|
392
|
+
/** Identifier assigned to this order by exchange where it was routed. */
|
|
393
|
+
exchangeOrderId?: string | undefined;
|
|
394
|
+
isSignificantShareHolder?: boolean | undefined;
|
|
395
|
+
/** Whether user that placed the order is an insider. */
|
|
396
|
+
isInsider?: boolean | undefined;
|
|
397
|
+
/** Whether limit offset is specified in dollars (vs. percent). */
|
|
398
|
+
isLimitOffsetInDollar?: boolean | undefined;
|
|
399
|
+
/** Internal identifier of user that placed the order. */
|
|
400
|
+
userId?: number | undefined;
|
|
401
|
+
/** Commission for placing the order via the Trade Desk over the phone. */
|
|
402
|
+
placementCommission?: number | null | undefined;
|
|
403
|
+
/** List of OrderLeg elements. */
|
|
404
|
+
legs?: OrderLegsList | undefined;
|
|
405
|
+
/** Multi-leg strategy to which the order belongs. */
|
|
406
|
+
strategyType?: string | undefined;
|
|
407
|
+
/** Stop price at which order was triggered. */
|
|
408
|
+
triggerStopPrice?: number | null | undefined;
|
|
409
|
+
/** Internal identifier of the order group. */
|
|
410
|
+
orderGroupId?: number | undefined;
|
|
411
|
+
/** Bracket Order class. Primary, Profit or Loss. */
|
|
412
|
+
orderClass?: string | null | undefined;
|
|
413
|
+
mainChainId?: number | undefined;
|
|
414
|
+
/** Order price type (e.g., "Market"). See Order Type section for all allowed values. */
|
|
415
|
+
orderType?: OrderType | undefined;
|
|
416
|
+
/** Specifies Iceberg special instruction. */
|
|
417
|
+
icebergQuantity?: number | undefined;
|
|
418
|
+
/** Total commission amount charged for this order. */
|
|
419
|
+
commissionCharged?: number | undefined;
|
|
420
|
+
/** Whether user that placed the order is a significant shareholder. */
|
|
421
|
+
isSignificantShareholder?: boolean | undefined;
|
|
422
|
+
rejectionReason?: string | undefined;
|
|
423
|
+
isCrossZero?: boolean | undefined;
|
|
424
|
+
}
|
|
425
|
+
/** List of order records. */
|
|
426
|
+
export type GetOrderResponseOrdersList = Array<Order>;
|
|
427
|
+
export interface GetOrderResponse {
|
|
428
|
+
/** List of order records. */
|
|
429
|
+
orders?: GetOrderResponseOrdersList | undefined;
|
|
430
|
+
}
|
|
431
|
+
export interface GetOrderImpactRequest {
|
|
432
|
+
/** Account number against which order is being submitted. */
|
|
433
|
+
id: string;
|
|
434
|
+
/** Internal symbol identifier. */
|
|
435
|
+
symbolId?: number | undefined;
|
|
436
|
+
/** Order quantity. */
|
|
437
|
+
quantity?: number | undefined;
|
|
438
|
+
/** Order type (e.g., "Market"). See Order Type section for all allowed values. */
|
|
439
|
+
orderType?: OrderType | (string & {}) | undefined;
|
|
440
|
+
timeInForce?: string | undefined;
|
|
441
|
+
/** Order side (e.g., "Buy"). See Order Action section for all allowed values. */
|
|
442
|
+
action?: OrderAction | (string & {}) | undefined;
|
|
443
|
+
/** Primary order route (e.g., "AUTO"). */
|
|
444
|
+
primaryRoute?: string | undefined;
|
|
445
|
+
/** Secondary order route (e.g., "NYSE"). */
|
|
446
|
+
secondaryRoute?: string | undefined;
|
|
447
|
+
accountNumber?: string | undefined;
|
|
448
|
+
/** Identifies whether All-or-None instruction is enabled. */
|
|
449
|
+
isAllOrNone?: boolean | undefined;
|
|
450
|
+
/** Identifies whether Anonymous instruction is enabled. */
|
|
451
|
+
isAnonymous?: boolean | undefined;
|
|
452
|
+
isLimitOffsetInDollar?: boolean | undefined;
|
|
453
|
+
/** Optional - Order Id of order to be replace estimated. */
|
|
454
|
+
orderId?: number | undefined;
|
|
455
|
+
/** Iceberg instruction quantity. */
|
|
456
|
+
icebergQuantity?: number | undefined;
|
|
457
|
+
/** Limit price. */
|
|
458
|
+
limitPrice?: number | undefined;
|
|
459
|
+
/** Stop price. */
|
|
460
|
+
stopPrice?: number | undefined;
|
|
461
|
+
}
|
|
462
|
+
export interface GetOrderImpactResponse {
|
|
463
|
+
/** Estimate of commissions to be charged on the order. */
|
|
464
|
+
estimatedCommissions?: number | undefined;
|
|
465
|
+
/** Estimate of change in buying power from the order. */
|
|
466
|
+
buyingPowerEffect?: number | undefined;
|
|
467
|
+
/** Estimate of buying power in which order will result. */
|
|
468
|
+
buyingPowerResult?: number | undefined;
|
|
469
|
+
/** Estimate of change in maintenance excess from the order. */
|
|
470
|
+
maintExcessEffect?: number | undefined;
|
|
471
|
+
/** Estimate of maintenance excess in which the order will result. */
|
|
472
|
+
maintExcessResult?: number | undefined;
|
|
473
|
+
/** Client view of the order side (e.g., "Buy-To-Open"). */
|
|
474
|
+
side?: string | undefined;
|
|
475
|
+
/** Estimate of the order execution value. */
|
|
476
|
+
tradeValueCalculation?: string | undefined;
|
|
477
|
+
/** Estimated average fill price. */
|
|
478
|
+
price?: number | undefined;
|
|
479
|
+
}
|
|
480
|
+
export interface GetQuoteRequest {
|
|
481
|
+
/** Internal symbol identifier. Can occur in the 'location' header only. Mutually exclusive with 'ids' parameter. */
|
|
482
|
+
id: number;
|
|
483
|
+
}
|
|
484
|
+
/** Tick Type */
|
|
485
|
+
export type TickType = "Up" | "Down" | "Equal";
|
|
486
|
+
export interface Quote {
|
|
487
|
+
/** Symbol name following Questrade's symbology. */
|
|
488
|
+
symbol?: string | undefined;
|
|
489
|
+
/** Internal symbol identifier. */
|
|
490
|
+
symbolId?: number | undefined;
|
|
491
|
+
/** Market tier. */
|
|
492
|
+
tier?: string | undefined;
|
|
493
|
+
/** Bid price. */
|
|
494
|
+
bidPrice?: number | undefined;
|
|
495
|
+
/** Bid quantity. */
|
|
496
|
+
bidSize?: number | undefined;
|
|
497
|
+
/** Ask price. */
|
|
498
|
+
askPrice?: number | undefined;
|
|
499
|
+
/** Ask quantity. */
|
|
500
|
+
askSize?: number | undefined;
|
|
501
|
+
lastTradePriceTrHrs?: number | undefined;
|
|
502
|
+
/** Price of the last trade. */
|
|
503
|
+
lastTradePrice?: number | undefined;
|
|
504
|
+
/** Quantity of the last trade. */
|
|
505
|
+
lastTradeSize?: number | undefined;
|
|
506
|
+
/** Trade direction. See Tick Type section for all allowed values. */
|
|
507
|
+
lastTradeTick?: TickType | undefined;
|
|
508
|
+
lastTradeTime?: string | undefined;
|
|
509
|
+
/** Volume. */
|
|
510
|
+
volume?: number | undefined;
|
|
511
|
+
/** Opening trade price. */
|
|
512
|
+
openPrice?: number | undefined;
|
|
513
|
+
/** Daily high price. */
|
|
514
|
+
highPrice?: number | undefined;
|
|
515
|
+
/** Daily low price. */
|
|
516
|
+
lowPrice?: number | undefined;
|
|
517
|
+
/** Whether a quote is delayed (true) or real-time. Please refer to IMPORTANT NOTE section for correct handling */
|
|
518
|
+
delay?: boolean | undefined;
|
|
519
|
+
/** Whether trading in the symbol is currently halted. */
|
|
520
|
+
isHalted?: boolean | undefined;
|
|
521
|
+
/** Price of the last trade during regular trade hours. */
|
|
522
|
+
astTradeTrHrs?: number | undefined;
|
|
523
|
+
}
|
|
524
|
+
/** List of Quote records. */
|
|
525
|
+
export type GetQuoteResponseQuotesList = Array<Quote>;
|
|
526
|
+
export interface GetQuoteResponse {
|
|
527
|
+
/** List of Quote records. */
|
|
528
|
+
quotes?: GetQuoteResponseQuotesList | undefined;
|
|
529
|
+
}
|
|
530
|
+
/** Strategy Types */
|
|
531
|
+
export type StrategyTypes =
|
|
532
|
+
| "CoveredCall"
|
|
533
|
+
| "MarriedPuts"
|
|
534
|
+
| "VerticalCallSpread"
|
|
535
|
+
| "VerticalPutSpread"
|
|
536
|
+
| "CalendarCallSpread"
|
|
537
|
+
| "CalendarPutSpread"
|
|
538
|
+
| "DiagonalCallSpread"
|
|
539
|
+
| "DiagonalPutSpread"
|
|
540
|
+
| "Collar"
|
|
541
|
+
| "Straddle"
|
|
542
|
+
| "Strangle"
|
|
543
|
+
| "ButterflyCall"
|
|
544
|
+
| "ButterflyPut"
|
|
545
|
+
| "IronButterfly"
|
|
546
|
+
| "CondorCall"
|
|
547
|
+
| "Custom";
|
|
548
|
+
export interface GetStrategyOrderImpactRequestLegsItem {
|
|
549
|
+
/** Internal symbol identifier. Always an underlying symbol Id. */
|
|
550
|
+
symbolId?: number | undefined;
|
|
551
|
+
/** Leg action (e.g. "Buy") See Order Action section for all allowed values. */
|
|
552
|
+
action?: OrderAction | (string & {}) | undefined;
|
|
553
|
+
legRatioQty?: number | undefined;
|
|
554
|
+
/** Strategy type (e.g. "CoveredCall") See Strategy Types section for all allowed values. */
|
|
555
|
+
strategy?: StrategyTypes | (string & {}) | undefined;
|
|
556
|
+
/** Leg quantity */
|
|
557
|
+
legQuantity?: number | undefined;
|
|
558
|
+
}
|
|
559
|
+
/** Legs data */
|
|
560
|
+
export type GetStrategyOrderImpactRequestLegsList = Array<GetStrategyOrderImpactRequestLegsItem>;
|
|
561
|
+
export interface GetStrategyOrderImpactRequest {
|
|
562
|
+
/** Account number against which order is being submitted. Can occur in the 'Location' header only. */
|
|
563
|
+
id: string;
|
|
564
|
+
/** Internal symbol identifier. Always an underlying symbol Id. */
|
|
565
|
+
symbolId?: number | undefined;
|
|
566
|
+
quantity?: number | undefined;
|
|
567
|
+
/** Limit price */
|
|
568
|
+
limitPrice?: number | undefined;
|
|
569
|
+
/** Order type (e.g., "Market"). See Order Type section for all allowed values. */
|
|
570
|
+
orderType?: OrderType | (string & {}) | undefined;
|
|
571
|
+
/** Order duration (e.g., "DAY"). See Order Duration section for all allowed values. */
|
|
572
|
+
timeInForce?: OrderTimeInForce | (string & {}) | undefined;
|
|
573
|
+
/** Primary order route (e.g., "AUTO"). */
|
|
574
|
+
primaryRoute?: string | undefined;
|
|
575
|
+
/** Secondary order route (e.g., "NYSE"). */
|
|
576
|
+
secondaryRoute?: string | undefined;
|
|
577
|
+
/** Legs data */
|
|
578
|
+
legs?: GetStrategyOrderImpactRequestLegsList | undefined;
|
|
579
|
+
/** Strategy type (e.g. "CoveredCall") See Strategy Types section for all allowed values. */
|
|
580
|
+
strategy?: StrategyTypes | (string & {}) | undefined;
|
|
581
|
+
}
|
|
582
|
+
export type GetStrategyOrderImpactResponseLegsList = Array<OrderLeg>;
|
|
583
|
+
export interface GetStrategyOrderImpactResponse {
|
|
584
|
+
estimatedCommissions?: number | undefined;
|
|
585
|
+
buyingPowerEffect?: number | undefined;
|
|
586
|
+
buyingPowerResult?: number | undefined;
|
|
587
|
+
maintExcessEffect?: number | undefined;
|
|
588
|
+
maintExcessResult?: number | undefined;
|
|
589
|
+
tradeValueCalculation?: string | undefined;
|
|
590
|
+
legs?: GetStrategyOrderImpactResponseLegsList | undefined;
|
|
591
|
+
side?: string | undefined;
|
|
592
|
+
effect?: string | undefined;
|
|
593
|
+
price?: number | undefined;
|
|
594
|
+
strategy?: string | undefined;
|
|
595
|
+
}
|
|
596
|
+
export interface GetStrategyQuotesRequestVariantsItemLegsItem {
|
|
597
|
+
/** Internal symbol identifier */
|
|
598
|
+
symbolId?: number | undefined;
|
|
599
|
+
/** Numeric ration of the leg in strategy */
|
|
600
|
+
ratio?: number | undefined;
|
|
601
|
+
/** Order side (e.g. "Buy") SeeOrder Actionsection for all allowed values. */
|
|
602
|
+
action?: OrderAction | (string & {}) | undefined;
|
|
603
|
+
}
|
|
604
|
+
/** Array of Strategy legs */
|
|
605
|
+
export type GetStrategyQuotesRequestVariantsItemLegsList =
|
|
606
|
+
Array<GetStrategyQuotesRequestVariantsItemLegsItem>;
|
|
607
|
+
export interface GetStrategyQuotesRequestVariantsItem {
|
|
608
|
+
/** Variant ID */
|
|
609
|
+
variantId?: number | undefined;
|
|
610
|
+
/** Strategy type (e.g. "Custom") See Strategy Types section for all allowed values. */
|
|
611
|
+
strategy?: StrategyTypes | (string & {}) | undefined;
|
|
612
|
+
/** Array of Strategy legs */
|
|
613
|
+
legs?: GetStrategyQuotesRequestVariantsItemLegsList | undefined;
|
|
614
|
+
}
|
|
615
|
+
/** Input array of Strategy Variants */
|
|
616
|
+
export type GetStrategyQuotesRequestVariantsList = Array<GetStrategyQuotesRequestVariantsItem>;
|
|
617
|
+
export interface GetStrategyQuotesRequest {
|
|
618
|
+
/** Input array of Strategy Variants */
|
|
619
|
+
variants?: GetStrategyQuotesRequestVariantsList | undefined;
|
|
620
|
+
}
|
|
621
|
+
export interface GetStrategyQuotesResponseStategyQuotesItem {
|
|
622
|
+
/** Variant ID corresponding to variant in request */
|
|
623
|
+
variantId?: number | undefined;
|
|
624
|
+
/** Bid price */
|
|
625
|
+
bidPrice?: number | undefined;
|
|
626
|
+
/** Ask price */
|
|
627
|
+
askPrice?: number | undefined;
|
|
628
|
+
/** Underlying name */
|
|
629
|
+
underlying?: string | undefined;
|
|
630
|
+
/** Underlying ID */
|
|
631
|
+
underlyingId?: number | undefined;
|
|
632
|
+
/** Open price */
|
|
633
|
+
openPrice?: number | null | undefined;
|
|
634
|
+
/** Volatility */
|
|
635
|
+
volatility?: number | undefined;
|
|
636
|
+
/** Delta */
|
|
637
|
+
delta?: number | undefined;
|
|
638
|
+
/** Gamma */
|
|
639
|
+
gamma?: number | undefined;
|
|
640
|
+
/** Theta */
|
|
641
|
+
theta?: number | undefined;
|
|
642
|
+
/** Vega */
|
|
643
|
+
vega?: number | undefined;
|
|
644
|
+
/** Rho */
|
|
645
|
+
rho?: number | undefined;
|
|
646
|
+
/** Whether or not the data is real-time */
|
|
647
|
+
isRealTime?: boolean | undefined;
|
|
648
|
+
}
|
|
649
|
+
export type GetStrategyQuotesResponseStategyQuotesList =
|
|
650
|
+
Array<GetStrategyQuotesResponseStategyQuotesItem>;
|
|
651
|
+
export interface GetStrategyQuotesResponse {
|
|
652
|
+
strategyQuotes?: GetStrategyQuotesResponseStategyQuotesList | undefined;
|
|
653
|
+
}
|
|
654
|
+
export interface GetSymbolRequest {
|
|
655
|
+
/** Internal symbol identifier. Can occur in the 'Location' header only. Mutually exclusive with 'ids' parameter. */
|
|
656
|
+
id: number;
|
|
657
|
+
}
|
|
658
|
+
/** Option Type */
|
|
659
|
+
export type OptionType = "Call" | "Put";
|
|
660
|
+
/** Option Duration Type */
|
|
661
|
+
export type OptionDurationType = "Weekly" | "Monthly" | "Quarterly" | "LEAP";
|
|
662
|
+
export interface UnderlyingMultiplierPair {
|
|
663
|
+
/** Number of shares deliverable per contract (e.g., 100). */
|
|
664
|
+
multiplier?: number | undefined;
|
|
665
|
+
/** Underlying symbol for the deliverable (e.g., "MSFT"). */
|
|
666
|
+
underlyingSymbol?: string | undefined;
|
|
667
|
+
/** Underlying symbol id for the deliverable (e.g., 2345343). */
|
|
668
|
+
underlyingSymbolId?: string | undefined;
|
|
669
|
+
}
|
|
670
|
+
/** List of UnderlyingMultiplierPair records. */
|
|
671
|
+
export type GetSymbolResponseSymbolsItemOptionContractDeliverablesUnderlyingsList =
|
|
672
|
+
Array<UnderlyingMultiplierPair>;
|
|
673
|
+
/** Option contract deliverables. */
|
|
674
|
+
export interface GetSymbolResponseSymbolsItemOptionContractDeliverables {
|
|
675
|
+
/** List of UnderlyingMultiplierPair records. */
|
|
676
|
+
underlyings?: GetSymbolResponseSymbolsItemOptionContractDeliverablesUnderlyingsList | undefined;
|
|
677
|
+
/** Amount of cash in lieu deliverable per contract. */
|
|
678
|
+
cashInLieu?: number | undefined;
|
|
679
|
+
}
|
|
680
|
+
/** Security Type */
|
|
681
|
+
export type SecurityType = "Stock" | "Option" | "Bond" | "Right" | "Gold" | "MutualFund" | "Index";
|
|
682
|
+
export interface MinTickData {
|
|
683
|
+
/** Beginning of the interval for a given minimum price increment. */
|
|
684
|
+
pivot?: number | undefined;
|
|
685
|
+
/** Minimum price increment. */
|
|
686
|
+
minTick?: number | undefined;
|
|
687
|
+
}
|
|
688
|
+
/** List of MinTickData records. */
|
|
689
|
+
export type GetSymbolResponseSymbolsItemMinTicksList = Array<MinTickData>;
|
|
690
|
+
export interface GetSymbolResponseSymbolsItem {
|
|
691
|
+
/** Symbol that follows Questrade symbology (e.g., "TD.TO"). */
|
|
692
|
+
symbol?: string | undefined;
|
|
693
|
+
/** Symbol identifier */
|
|
694
|
+
symbolId?: number | undefined;
|
|
695
|
+
/** Closing trade price from the previous trading day. */
|
|
696
|
+
prevDayClosePrice?: number | undefined;
|
|
697
|
+
/** 52-week high price. */
|
|
698
|
+
highPrice52?: number | undefined;
|
|
699
|
+
/** 52-week high price. */
|
|
700
|
+
lowPrice52?: number | undefined;
|
|
701
|
+
/** Average trading volume over trailing 3 months. */
|
|
702
|
+
averageVol3Months?: number | undefined;
|
|
703
|
+
/** Average trading volume over trailing 20 days. */
|
|
704
|
+
averageVol20Days?: number | undefined;
|
|
705
|
+
/** Total number of shares outstanding. */
|
|
706
|
+
outstandingShares?: number | undefined;
|
|
707
|
+
/** Trailing 12-month earnings per share. */
|
|
708
|
+
eps?: number | undefined;
|
|
709
|
+
/** Trailing 12-month price to earnings ratio. */
|
|
710
|
+
pe?: number | undefined;
|
|
711
|
+
/** Dividend amount per share. */
|
|
712
|
+
dividend?: number | undefined;
|
|
713
|
+
/** Dividend yield (dividend / prevDayClosePrice). */
|
|
714
|
+
yield?: number | undefined;
|
|
715
|
+
/** Dividend ex-date. */
|
|
716
|
+
exDate?: string | undefined;
|
|
717
|
+
/** Market capitalization (outstandingShares * prevDayClosePrice). */
|
|
718
|
+
marketCap?: number | undefined;
|
|
719
|
+
tradeUnit?: number | undefined;
|
|
720
|
+
/** Option type (e.g., "Call"). See Option Type section for all allowed values. */
|
|
721
|
+
optionType?: OptionType | null | undefined;
|
|
722
|
+
/** Option duration type (e.g., "Weekly"). See Option Duration Type section for all allowed values. */
|
|
723
|
+
optionDurationType?: OptionDurationType | null | undefined;
|
|
724
|
+
/** Option root symbol (e.g., "MSFT"). */
|
|
725
|
+
optionRoot?: string | undefined;
|
|
726
|
+
/** Option contract deliverables. */
|
|
727
|
+
optionContractDeliverables?: GetSymbolResponseSymbolsItemOptionContractDeliverables | undefined;
|
|
728
|
+
/** Option exercise style (e.g., "American"). See Option Exercise Type section for all allowed values. */
|
|
729
|
+
optionExerciseType?: OptionExerciseType | null | undefined;
|
|
730
|
+
/** Primary listing exchange. See Listing Exchange section for the list of all listing exchanges. */
|
|
731
|
+
listingExchange?: ListingExchange | undefined;
|
|
732
|
+
/** Symbol description (e.g., "Microsoft Corp."). */
|
|
733
|
+
description?: string | undefined;
|
|
734
|
+
/** Security type (e.g., "Stock"). See Security Type section for all allowed values. */
|
|
735
|
+
securityType?: SecurityType | undefined;
|
|
736
|
+
/** Option expiry date. */
|
|
737
|
+
optionExpiryDate?: string | null | undefined;
|
|
738
|
+
/** Dividend declaration date. */
|
|
739
|
+
dividendDate?: string | undefined;
|
|
740
|
+
/** Option strike price */
|
|
741
|
+
optionStrikePrice?: number | null | undefined;
|
|
742
|
+
isTradable?: boolean | undefined;
|
|
743
|
+
/** Indicates whether the symbol is actively listed. */
|
|
744
|
+
isQuotable?: boolean | undefined;
|
|
745
|
+
/** Indicates whether the symbol is an underlying option. */
|
|
746
|
+
hasOptions?: boolean | undefined;
|
|
747
|
+
/** List of MinTickData records. */
|
|
748
|
+
minTicks?: GetSymbolResponseSymbolsItemMinTicksList | undefined;
|
|
749
|
+
/** Industry sector classification. */
|
|
750
|
+
industrySector?: string | undefined;
|
|
751
|
+
/** Industry group classification. */
|
|
752
|
+
industryGroup?: string | undefined;
|
|
753
|
+
/** Industry subgroup classification. */
|
|
754
|
+
industrySubGroup?: string | undefined;
|
|
755
|
+
/** String Currency code (follows ISO format). */
|
|
756
|
+
currency?: string | undefined;
|
|
757
|
+
}
|
|
758
|
+
export type GetSymbolResponseSymbolsList = Array<GetSymbolResponseSymbolsItem>;
|
|
759
|
+
export interface GetSymbolResponse {
|
|
760
|
+
symbols?: GetSymbolResponseSymbolsList | undefined;
|
|
761
|
+
}
|
|
762
|
+
export interface GetTimeRequest {}
|
|
763
|
+
export interface GetTimeResponse {
|
|
764
|
+
/** Current server time in ISO format and Eastern time zone. */
|
|
765
|
+
time?: string | undefined;
|
|
766
|
+
}
|
|
767
|
+
export interface ListAccountsRequest {}
|
|
768
|
+
/** Account Type */
|
|
769
|
+
export type AccountType =
|
|
770
|
+
| "Cash"
|
|
771
|
+
| "Margin"
|
|
772
|
+
| "TFSA"
|
|
773
|
+
| "RRSP"
|
|
774
|
+
| "FHSA"
|
|
775
|
+
| "SRRSP"
|
|
776
|
+
| "LRRSP"
|
|
777
|
+
| "LIRA"
|
|
778
|
+
| "LIF"
|
|
779
|
+
| "RIF"
|
|
780
|
+
| "SRIF"
|
|
781
|
+
| "LRIF"
|
|
782
|
+
| "RRIF"
|
|
783
|
+
| "PRIF"
|
|
784
|
+
| "RESP"
|
|
785
|
+
| "FRESP";
|
|
786
|
+
/** Account Status */
|
|
787
|
+
export type AccountStatus =
|
|
788
|
+
| "Active"
|
|
789
|
+
| "Suspended (Closed)"
|
|
790
|
+
| "Suspended (View Only)"
|
|
791
|
+
| "Liquidate Only"
|
|
792
|
+
| "Closed";
|
|
793
|
+
/** Client Account Type */
|
|
794
|
+
export type ClientAccountType =
|
|
795
|
+
| "Individual"
|
|
796
|
+
| "Joint"
|
|
797
|
+
| "Informal Trust"
|
|
798
|
+
| "Corporation"
|
|
799
|
+
| "Formal Trust"
|
|
800
|
+
| "Partnership"
|
|
801
|
+
| "Sole Proprietorship"
|
|
802
|
+
| "Family"
|
|
803
|
+
| "Joint and Informal Trust"
|
|
804
|
+
| "Institution";
|
|
805
|
+
export interface Account {
|
|
806
|
+
/** Type of the account (e.g., "Cash", "Margin"). See User Account Type section for all allowed values. */
|
|
807
|
+
type?: AccountType | undefined;
|
|
808
|
+
/** Eight-digit account number (e.g., "26598145"). */
|
|
809
|
+
number?: string | undefined;
|
|
810
|
+
/** Status of the account (e.g., Active). See Account Status for full list of values. */
|
|
811
|
+
status?: AccountStatus | undefined;
|
|
812
|
+
/** Whether this is a primary account for the holder. */
|
|
813
|
+
isPrimary?: boolean | undefined;
|
|
814
|
+
/** Whether this account is one that gets billed for various expenses such as fees, market data, etc. */
|
|
815
|
+
isBilling?: boolean | undefined;
|
|
816
|
+
/** Type of client holding the account (e.g., "Individual"). Seeclient Account Typefor full list of values. */
|
|
817
|
+
clientAccountType?: ClientAccountType | undefined;
|
|
818
|
+
}
|
|
819
|
+
/** List of account records. */
|
|
820
|
+
export type ListAccountsResponseAccountsList = Array<Account>;
|
|
821
|
+
export interface ListAccountsResponse {
|
|
822
|
+
/** List of account records. */
|
|
823
|
+
accounts?: ListAccountsResponseAccountsList | undefined;
|
|
824
|
+
/** Internal identifier of the user making the request. */
|
|
825
|
+
userId?: number | undefined;
|
|
826
|
+
}
|
|
827
|
+
export interface ListActivitiesRequest {
|
|
828
|
+
/** The account number */
|
|
829
|
+
id: string;
|
|
830
|
+
/** The start time of the interval to retrieve orders */
|
|
831
|
+
startTime?: string | undefined;
|
|
832
|
+
/** The end time of the interval to retrieve orders */
|
|
833
|
+
endTime?: string | undefined;
|
|
834
|
+
}
|
|
835
|
+
export interface AccountActivity {
|
|
836
|
+
/** Trade date */
|
|
837
|
+
tradeDate?: string | undefined;
|
|
838
|
+
/** Transaction date */
|
|
839
|
+
transactionDate?: string | undefined;
|
|
840
|
+
/** Settlement date */
|
|
841
|
+
settlementDate?: string | undefined;
|
|
842
|
+
/** Activity action */
|
|
843
|
+
action?: string | undefined;
|
|
844
|
+
/** Symbol name */
|
|
845
|
+
symbol?: string | undefined;
|
|
846
|
+
/** Symbol ID */
|
|
847
|
+
symbolId?: number | undefined;
|
|
848
|
+
/** Description */
|
|
849
|
+
description?: string | undefined;
|
|
850
|
+
/** Currency */
|
|
851
|
+
currency?: string | undefined;
|
|
852
|
+
/** The quantity */
|
|
853
|
+
quantity?: number | undefined;
|
|
854
|
+
/** The price */
|
|
855
|
+
price?: number | undefined;
|
|
856
|
+
/** Gross amount */
|
|
857
|
+
grossAmount?: number | undefined;
|
|
858
|
+
/** The commission */
|
|
859
|
+
commission?: number | undefined;
|
|
860
|
+
/** Net Amount */
|
|
861
|
+
netAmount?: number | undefined;
|
|
862
|
+
/** Activity Type */
|
|
863
|
+
type?: string | undefined;
|
|
864
|
+
}
|
|
865
|
+
/** Array of activity records */
|
|
866
|
+
export type ListActivitiesResponseActivitiesList = Array<AccountActivity>;
|
|
867
|
+
export interface ListActivitiesResponse {
|
|
868
|
+
/** Array of activity records */
|
|
869
|
+
activities?: ListActivitiesResponseActivitiesList | undefined;
|
|
870
|
+
}
|
|
871
|
+
/** Historical Data Granularity */
|
|
872
|
+
export type HistoricalDataGranularity =
|
|
873
|
+
| "OneMinute"
|
|
874
|
+
| "TwoMinutes"
|
|
875
|
+
| "ThreeMinutes"
|
|
876
|
+
| "FourMinutes"
|
|
877
|
+
| "FiveMinutes"
|
|
878
|
+
| "TenMinutes"
|
|
879
|
+
| "FifteenMinutes"
|
|
880
|
+
| "TwentyMinutes"
|
|
881
|
+
| "HalfHour"
|
|
882
|
+
| "OneHour"
|
|
883
|
+
| "TwoHours"
|
|
884
|
+
| "FourHours"
|
|
885
|
+
| "OneDay"
|
|
886
|
+
| "OneWeek"
|
|
887
|
+
| "OneMonth"
|
|
888
|
+
| "OneYear";
|
|
889
|
+
export interface ListCandlesRequest {
|
|
890
|
+
/** Internal symbol identifier. Can occur in the 'location' header only. */
|
|
891
|
+
id: number;
|
|
892
|
+
/** Beginning of the candlestick range. */
|
|
893
|
+
startTime?: string | undefined;
|
|
894
|
+
/** End of the candlestick range. */
|
|
895
|
+
endTime?: string | undefined;
|
|
896
|
+
/** Interval of a single candlestick. See Historical Data Granularity for all allowed values. */
|
|
897
|
+
interval?: HistoricalDataGranularity | (string & {}) | undefined;
|
|
898
|
+
}
|
|
899
|
+
export interface Candle {
|
|
900
|
+
/** Candlestick start timestamp (in ISO format). */
|
|
901
|
+
start?: string | undefined;
|
|
902
|
+
/** Candlestick end timestamp (in ISO format). */
|
|
903
|
+
end?: string | undefined;
|
|
904
|
+
/** Low price. */
|
|
905
|
+
low?: number | undefined;
|
|
906
|
+
/** High price. */
|
|
907
|
+
high?: number | undefined;
|
|
908
|
+
/** Opening price. */
|
|
909
|
+
open?: number | undefined;
|
|
910
|
+
/** Closing price. */
|
|
911
|
+
close?: number | undefined;
|
|
912
|
+
/** Trading volume. */
|
|
913
|
+
volume?: number | undefined;
|
|
914
|
+
}
|
|
915
|
+
/** List of Candle records. */
|
|
916
|
+
export type ListCandlesResponseCandlesList = Array<Candle>;
|
|
917
|
+
export interface ListCandlesResponse {
|
|
918
|
+
/** List of Candle records. */
|
|
919
|
+
candles?: ListCandlesResponseCandlesList | undefined;
|
|
920
|
+
}
|
|
921
|
+
export interface ListExecutionsRequest {
|
|
922
|
+
/** Account number. Can occur in the 'location' header only. */
|
|
923
|
+
id: string;
|
|
924
|
+
/** Start of time range in ISO format. By default - start of today, 12:00am. */
|
|
925
|
+
startTime?: string | undefined;
|
|
926
|
+
/** End of time range in ISO format. By default - end of today, 11:59pm */
|
|
927
|
+
endTime?: string | undefined;
|
|
928
|
+
}
|
|
929
|
+
export interface Execution {
|
|
930
|
+
/** Execution symbol. */
|
|
931
|
+
symbol?: string | undefined;
|
|
932
|
+
/** Internal symbol identifier. */
|
|
933
|
+
symbolId?: number | undefined;
|
|
934
|
+
/** Execution quantity. */
|
|
935
|
+
quantity?: number | undefined;
|
|
936
|
+
/** Client side of the order to which execution belongs. SeeClient Order Side section for all allowed values. */
|
|
937
|
+
side?: OrderSide | undefined;
|
|
938
|
+
/** Execution price. */
|
|
939
|
+
price?: number | undefined;
|
|
940
|
+
/** Internal identifier of the execution. */
|
|
941
|
+
id?: number | undefined;
|
|
942
|
+
/** Internal identifier of the order to which the execution belongs. */
|
|
943
|
+
orderId?: number | undefined;
|
|
944
|
+
/** Internal identifier of the order chain to which the execution belongs. */
|
|
945
|
+
orderChainId?: number | undefined;
|
|
946
|
+
/** Identifier of the execution at the market where it originated. */
|
|
947
|
+
exchangeExecId?: string | undefined;
|
|
948
|
+
/** Manual notes that may have been entered by Trade Desk staff. */
|
|
949
|
+
notes?: string | undefined;
|
|
950
|
+
/** Trading venue where execution originated. */
|
|
951
|
+
venue?: string | undefined;
|
|
952
|
+
/** Execution cost (price x quantity). */
|
|
953
|
+
totalCost?: number | undefined;
|
|
954
|
+
/** Questrade commission for orders placed with Trade Desk. */
|
|
955
|
+
orderPlacementCommission?: number | undefined;
|
|
956
|
+
/** Questrade commission. */
|
|
957
|
+
commission?: number | undefined;
|
|
958
|
+
/** Liquidity fee charged by execution venue. */
|
|
959
|
+
executionFee?: number | undefined;
|
|
960
|
+
/** SEC fee charged on all sales of US securities. */
|
|
961
|
+
secFee?: number | undefined;
|
|
962
|
+
/** Additional execution fee charged by TSX (if applicable). */
|
|
963
|
+
canadianExecutionFee?: number | undefined;
|
|
964
|
+
/** Internal identifierof the parent order. */
|
|
965
|
+
parentId?: number | undefined;
|
|
966
|
+
/** Execution timestamp. */
|
|
967
|
+
timestamp?: string | undefined;
|
|
968
|
+
}
|
|
969
|
+
/** List of execution records. */
|
|
970
|
+
export type ListExecutionsResponseExecutionsList = Array<Execution>;
|
|
971
|
+
export interface ListExecutionsResponse {
|
|
972
|
+
/** List of execution records. */
|
|
973
|
+
executions?: ListExecutionsResponseExecutionsList | undefined;
|
|
974
|
+
}
|
|
975
|
+
export interface ListMarketsRequest {}
|
|
976
|
+
/** List of trading venue codes. */
|
|
977
|
+
export type MarketTradingVenuesList = Array<string>;
|
|
978
|
+
/** List of primary order route codes. */
|
|
979
|
+
export type MarketPrimaryOrderRoutesList = Array<string>;
|
|
980
|
+
/** List of secondary order route codes. */
|
|
981
|
+
export type MarketSecondaryOrderRoutesList = Array<string>;
|
|
982
|
+
/** List of level 1 market data feed codes. */
|
|
983
|
+
export type MarketLevel1FeedsList = Array<string>;
|
|
984
|
+
/** List of level 2 market data feed codes. */
|
|
985
|
+
export type MarketLevel2FeedsList = Array<string>;
|
|
986
|
+
export interface Market {
|
|
987
|
+
/** Market name. */
|
|
988
|
+
name?: string | undefined;
|
|
989
|
+
/** List of trading venue codes. */
|
|
990
|
+
tradingVenues?: MarketTradingVenuesList | undefined;
|
|
991
|
+
/** Default trading venue code. */
|
|
992
|
+
defaultTradingVenue?: string | undefined;
|
|
993
|
+
/** List of primary order route codes. */
|
|
994
|
+
primaryOrderRoutes?: MarketPrimaryOrderRoutesList | undefined;
|
|
995
|
+
/** List of secondary order route codes. */
|
|
996
|
+
secondaryOrderRoutes?: MarketSecondaryOrderRoutesList | undefined;
|
|
997
|
+
/** List of level 1 market data feed codes. */
|
|
998
|
+
level1Feeds?: MarketLevel1FeedsList | undefined;
|
|
999
|
+
/** Pre-market opening time for current trading date. */
|
|
1000
|
+
extendedStartTime?: string | undefined;
|
|
1001
|
+
/** Regular market opening time for current trading date. */
|
|
1002
|
+
startTime?: string | undefined;
|
|
1003
|
+
/** Regular market closing time for current trading date. */
|
|
1004
|
+
endTime?: string | undefined;
|
|
1005
|
+
/** Currency code (ISO format). */
|
|
1006
|
+
currency?: string | undefined;
|
|
1007
|
+
/** Number of snap quotes that the user can retrieve from a market. */
|
|
1008
|
+
snapQuotesLimit?: number | undefined;
|
|
1009
|
+
/** List of level 2 market data feed codes. */
|
|
1010
|
+
level2Feeds?: MarketLevel2FeedsList | undefined;
|
|
1011
|
+
/** Extended market closing time for current trading date. */
|
|
1012
|
+
extendedEndTime?: string | undefined;
|
|
1013
|
+
}
|
|
1014
|
+
/** List of Quote records. */
|
|
1015
|
+
export type ListMarketsResponseMarketsList = Array<Market>;
|
|
1016
|
+
export interface ListMarketsResponse {
|
|
1017
|
+
/** List of Quote records. */
|
|
1018
|
+
markets?: ListMarketsResponseMarketsList | undefined;
|
|
1019
|
+
}
|
|
1020
|
+
export interface ListOrdersRequest {
|
|
1021
|
+
/** Account number. Can occur in the 'location' header only. */
|
|
1022
|
+
id: string;
|
|
1023
|
+
/** Start of time range in ISO format. By default - start of today, 12:00am. */
|
|
1024
|
+
startTime?: string | undefined;
|
|
1025
|
+
/** End of time range in ISO format. By default - end of today, 11:59pm */
|
|
1026
|
+
endTime?: string | undefined;
|
|
1027
|
+
/** All, Open, Closed - retrieve all, active or closed orders. */
|
|
1028
|
+
stateFilter?: string | undefined;
|
|
1029
|
+
}
|
|
1030
|
+
/** List of order records. */
|
|
1031
|
+
export type ListOrdersResponseOrdersList = Array<Order>;
|
|
1032
|
+
export interface ListOrdersResponse {
|
|
1033
|
+
/** List of order records. */
|
|
1034
|
+
orders?: ListOrdersResponseOrdersList | undefined;
|
|
1035
|
+
}
|
|
1036
|
+
export interface ListPositionsRequest {
|
|
1037
|
+
/** Account number. Can occur in the 'location' header only. */
|
|
1038
|
+
id: string;
|
|
1039
|
+
}
|
|
1040
|
+
export interface Position {
|
|
1041
|
+
/** Position symbol. */
|
|
1042
|
+
symbol?: string | undefined;
|
|
1043
|
+
/** Internal symbol identifier. */
|
|
1044
|
+
symbolId?: number | undefined;
|
|
1045
|
+
/** Position quantity remaining open. */
|
|
1046
|
+
openQuantity?: number | undefined;
|
|
1047
|
+
/** Market value of the position (quantity x price). */
|
|
1048
|
+
currentMarketValue?: number | undefined;
|
|
1049
|
+
/** Current price of the position symbol. */
|
|
1050
|
+
currentPrice?: number | undefined;
|
|
1051
|
+
/** Average price paid for all executions constituting the position. */
|
|
1052
|
+
averageEntryPrice?: number | undefined;
|
|
1053
|
+
/** Realized profit/loss on this position. */
|
|
1054
|
+
closedPnl?: number | undefined;
|
|
1055
|
+
/** Unrealized profit/loss on this position. */
|
|
1056
|
+
openPnl?: number | undefined;
|
|
1057
|
+
/** Total cost of the position. */
|
|
1058
|
+
totalCost?: number | undefined;
|
|
1059
|
+
/** Designates whether real-time quote was used to compute PnL. */
|
|
1060
|
+
isRealTime?: boolean | undefined;
|
|
1061
|
+
/** Designates whether a symbol is currently undergoing a reorg. */
|
|
1062
|
+
isUnderReorg?: boolean | undefined;
|
|
1063
|
+
/** Portion of the position that was closed today. */
|
|
1064
|
+
closedQuantity?: number | undefined;
|
|
1065
|
+
}
|
|
1066
|
+
/** List of account records. */
|
|
1067
|
+
export type ListPositionsResponsePositionsList = Array<Position>;
|
|
1068
|
+
export interface ListPositionsResponse {
|
|
1069
|
+
/** List of account records. */
|
|
1070
|
+
positions?: ListPositionsResponsePositionsList | undefined;
|
|
1071
|
+
}
|
|
1072
|
+
export interface ListQuotesRequest {
|
|
1073
|
+
/** Comma-separated list of symbol ids. */
|
|
1074
|
+
ids?: string | undefined;
|
|
1075
|
+
}
|
|
1076
|
+
/** List of Quote records. */
|
|
1077
|
+
export type ListQuotesResponseQuotesList = Array<Quote>;
|
|
1078
|
+
export interface ListQuotesResponse {
|
|
1079
|
+
/** List of Quote records. */
|
|
1080
|
+
quotes?: ListQuotesResponseQuotesList | undefined;
|
|
1081
|
+
}
|
|
1082
|
+
export interface ListSymbolsRequest {
|
|
1083
|
+
/** Comma-separated list of symbol ids. */
|
|
1084
|
+
ids?: string | undefined;
|
|
1085
|
+
/** Comma separated list of symbol names. */
|
|
1086
|
+
names?: string | undefined;
|
|
1087
|
+
}
|
|
1088
|
+
/** List of UnderlyingMultiplierPair records. */
|
|
1089
|
+
export type ListSymbolsResponseSymbolsItemOptionContractDeliverablesUnderlyingsList =
|
|
1090
|
+
Array<UnderlyingMultiplierPair>;
|
|
1091
|
+
/** Option contract deliverables. */
|
|
1092
|
+
export interface ListSymbolsResponseSymbolsItemOptionContractDeliverables {
|
|
1093
|
+
/** List of UnderlyingMultiplierPair records. */
|
|
1094
|
+
underlyings?: ListSymbolsResponseSymbolsItemOptionContractDeliverablesUnderlyingsList | undefined;
|
|
1095
|
+
/** Amount of cash in lieu deliverable per contract. */
|
|
1096
|
+
cashInLieu?: number | undefined;
|
|
1097
|
+
}
|
|
1098
|
+
/** List of MinTickData records. */
|
|
1099
|
+
export type ListSymbolsResponseSymbolsItemMinTicksList = Array<MinTickData>;
|
|
1100
|
+
export interface ListSymbolsResponseSymbolsItem {
|
|
1101
|
+
/** Symbol that follows Questrade symbology (e.g., "TD.TO"). */
|
|
1102
|
+
symbol?: string | undefined;
|
|
1103
|
+
/** Symbol identifier */
|
|
1104
|
+
symbolId?: number | undefined;
|
|
1105
|
+
/** Closing trade price from the previous trading day. */
|
|
1106
|
+
prevDayClosePrice?: number | undefined;
|
|
1107
|
+
/** 52-week high price. */
|
|
1108
|
+
highPrice52?: number | undefined;
|
|
1109
|
+
/** 52-week high price. */
|
|
1110
|
+
lowPrice52?: number | undefined;
|
|
1111
|
+
/** Average trading volume over trailing 3 months. */
|
|
1112
|
+
averageVol3Months?: number | undefined;
|
|
1113
|
+
/** Average trading volume over trailing 20 days. */
|
|
1114
|
+
averageVol20Days?: number | undefined;
|
|
1115
|
+
/** Total number of shares outstanding. */
|
|
1116
|
+
outstandingShares?: number | undefined;
|
|
1117
|
+
/** Trailing 12-month earnings per share. */
|
|
1118
|
+
eps?: number | undefined;
|
|
1119
|
+
/** Trailing 12-month price to earnings ratio. */
|
|
1120
|
+
pe?: number | undefined;
|
|
1121
|
+
/** Dividend amount per share. */
|
|
1122
|
+
dividend?: number | undefined;
|
|
1123
|
+
/** Dividend yield (dividend / prevDayClosePrice). */
|
|
1124
|
+
yield?: number | undefined;
|
|
1125
|
+
/** Dividend ex-date. */
|
|
1126
|
+
exDate?: string | undefined;
|
|
1127
|
+
/** Market capitalization (outstandingShares * prevDayClosePrice). */
|
|
1128
|
+
marketCap?: number | undefined;
|
|
1129
|
+
tradeUnit?: number | undefined;
|
|
1130
|
+
/** Option type (e.g., "Call"). See Option Type section for all allowed values. */
|
|
1131
|
+
optionType?: OptionType | null | undefined;
|
|
1132
|
+
/** Option duration type (e.g., "Weekly"). See Option Duration Type section for all allowed values. */
|
|
1133
|
+
optionDurationType?: OptionDurationType | null | undefined;
|
|
1134
|
+
/** Option root symbol (e.g., "MSFT"). */
|
|
1135
|
+
optionRoot?: string | undefined;
|
|
1136
|
+
/** Option contract deliverables. */
|
|
1137
|
+
optionContractDeliverables?: ListSymbolsResponseSymbolsItemOptionContractDeliverables | undefined;
|
|
1138
|
+
/** Option exercise style (e.g., "American"). See Option Exercise Type section for all allowed values. */
|
|
1139
|
+
optionExerciseType?: OptionExerciseType | null | undefined;
|
|
1140
|
+
/** Primary listing exchange. See Listing Exchange section for the list of all listing exchanges. */
|
|
1141
|
+
listingExchange?: ListingExchange | undefined;
|
|
1142
|
+
/** Symbol description (e.g., "Microsoft Corp."). */
|
|
1143
|
+
description?: string | undefined;
|
|
1144
|
+
/** Security type (e.g., "Stock"). See Security Type section for all allowed values. */
|
|
1145
|
+
securityType?: SecurityType | undefined;
|
|
1146
|
+
/** Option expiry date. */
|
|
1147
|
+
optionExpiryDate?: string | null | undefined;
|
|
1148
|
+
/** Dividend declaration date. */
|
|
1149
|
+
dividendDate?: string | undefined;
|
|
1150
|
+
/** Option strike price */
|
|
1151
|
+
optionStrikePrice?: number | null | undefined;
|
|
1152
|
+
isTradable?: boolean | undefined;
|
|
1153
|
+
/** Indicates whether the symbol is actively listed. */
|
|
1154
|
+
isQuotable?: boolean | undefined;
|
|
1155
|
+
/** Indicates whether the symbol is an underlying option. */
|
|
1156
|
+
hasOptions?: boolean | undefined;
|
|
1157
|
+
/** List of MinTickData records. */
|
|
1158
|
+
minTicks?: ListSymbolsResponseSymbolsItemMinTicksList | undefined;
|
|
1159
|
+
/** Industry sector classification. */
|
|
1160
|
+
industrySector?: string | undefined;
|
|
1161
|
+
/** Industry group classification. */
|
|
1162
|
+
industryGroup?: string | undefined;
|
|
1163
|
+
/** Industry subgroup classification. */
|
|
1164
|
+
industrySubGroup?: string | undefined;
|
|
1165
|
+
/** String Currency code (follows ISO format). */
|
|
1166
|
+
currency?: string | undefined;
|
|
1167
|
+
}
|
|
1168
|
+
export type ListSymbolsResponseSymbolsList = Array<ListSymbolsResponseSymbolsItem>;
|
|
1169
|
+
export interface ListSymbolsResponse {
|
|
1170
|
+
symbols?: ListSymbolsResponseSymbolsList | undefined;
|
|
1171
|
+
}
|
|
1172
|
+
export type PlaceBracketOrderRequestComponentsItem = GetBracketOrderImpactRequestComponentsItem;
|
|
1173
|
+
/** List of bracket order components */
|
|
1174
|
+
export type PlaceBracketOrderRequestComponentsList =
|
|
1175
|
+
Array<GetBracketOrderImpactRequestComponentsItem>;
|
|
1176
|
+
export interface PlaceBracketOrderRequest {
|
|
1177
|
+
/** Account number against which order is being submitted. Can occur in the 'Location' header only. */
|
|
1178
|
+
id: string;
|
|
1179
|
+
/** Internal symbol identifier. */
|
|
1180
|
+
symbolId?: number | undefined;
|
|
1181
|
+
/** Primary order route (e.g., "AUTO"). */
|
|
1182
|
+
primaryRoute?: string | undefined;
|
|
1183
|
+
/** Secondary order route (e.g., "NYSE"). */
|
|
1184
|
+
secondaryRoute?: string | undefined;
|
|
1185
|
+
/** List of bracket order components */
|
|
1186
|
+
components?: PlaceBracketOrderRequestComponentsList | undefined;
|
|
1187
|
+
}
|
|
1188
|
+
/** List of order objects. */
|
|
1189
|
+
export type PlaceOrderResponseOrdersList = Array<Order>;
|
|
1190
|
+
export interface PlaceBracketOrderResponse {
|
|
1191
|
+
/** Internal order identifier. */
|
|
1192
|
+
orderId?: number | undefined;
|
|
1193
|
+
/** List of order objects. */
|
|
1194
|
+
orders?: PlaceOrderResponseOrdersList | undefined;
|
|
1195
|
+
}
|
|
1196
|
+
export interface PlaceOrderRequest {
|
|
1197
|
+
/** Account number against which order is being submitted. Can occur in the 'Location' header only. */
|
|
1198
|
+
id: string;
|
|
1199
|
+
accountNumber?: string | undefined;
|
|
1200
|
+
/** Internal symbol identifier. */
|
|
1201
|
+
symbolId?: number | undefined;
|
|
1202
|
+
/** Order quantity. */
|
|
1203
|
+
quantity?: number | undefined;
|
|
1204
|
+
/** Iceberg instruction quantity. */
|
|
1205
|
+
icebergQuantity?: number | undefined;
|
|
1206
|
+
/** Limit price. */
|
|
1207
|
+
limitPrice?: number | undefined;
|
|
1208
|
+
/** Identifies whether the all-or-none instruction is enabled. */
|
|
1209
|
+
isAllOrNone?: boolean | undefined;
|
|
1210
|
+
/** Identifies whether the anonymous instruction is enabled. */
|
|
1211
|
+
isAnonymous?: boolean | undefined;
|
|
1212
|
+
/** Order type (e.g., "Market"). See Order Type section for all allowed values. */
|
|
1213
|
+
orderType?: OrderType | (string & {}) | undefined;
|
|
1214
|
+
timeInForce?: string | undefined;
|
|
1215
|
+
/** Order side (e.g., "Buy"). See Order Action section for all allowed values. */
|
|
1216
|
+
action?: OrderAction | (string & {}) | undefined;
|
|
1217
|
+
/** Primary order route (e.g., "AUTO"). */
|
|
1218
|
+
primaryRoute?: string | undefined;
|
|
1219
|
+
/** Secondary order route (e.g., "NYSE"). */
|
|
1220
|
+
secondaryRoute?: string | undefined;
|
|
1221
|
+
/** Optional - order id of the order to be replaced. */
|
|
1222
|
+
orderId?: number | undefined;
|
|
1223
|
+
/** Stop price. */
|
|
1224
|
+
stopPrice?: number | undefined;
|
|
1225
|
+
}
|
|
1226
|
+
export interface PlaceOrderResponse {
|
|
1227
|
+
/** Internal order identifier. */
|
|
1228
|
+
orderId?: number | undefined;
|
|
1229
|
+
/** List of order objects. */
|
|
1230
|
+
orders?: PlaceOrderResponseOrdersList | undefined;
|
|
1231
|
+
}
|
|
1232
|
+
export type PlaceStrategyOrderRequestLegsItem = GetStrategyOrderImpactRequestLegsItem;
|
|
1233
|
+
/** Legs data */
|
|
1234
|
+
export type PlaceStrategyOrderRequestLegsList = Array<GetStrategyOrderImpactRequestLegsItem>;
|
|
1235
|
+
export interface PlaceStrategyOrderRequest {
|
|
1236
|
+
/** Account number against which order is being submitted. Can occur in the 'Location' header only. */
|
|
1237
|
+
id: string;
|
|
1238
|
+
/** Internal symbol identifier. Always an underlying symbol Id. */
|
|
1239
|
+
symbolId?: number | undefined;
|
|
1240
|
+
quantity?: number | undefined;
|
|
1241
|
+
/** Limit price */
|
|
1242
|
+
limitPrice?: number | undefined;
|
|
1243
|
+
/** Order type (e.g., "Market"). See Order Type section for all allowed values. */
|
|
1244
|
+
orderType?: OrderType | (string & {}) | undefined;
|
|
1245
|
+
/** Order duration (e.g., "DAY"). See Order Duration section for all allowed values. */
|
|
1246
|
+
timeInForce?: OrderTimeInForce | (string & {}) | undefined;
|
|
1247
|
+
/** Primary order route (e.g., "AUTO"). */
|
|
1248
|
+
primaryRoute?: string | undefined;
|
|
1249
|
+
/** Secondary order route (e.g., "NYSE"). */
|
|
1250
|
+
secondaryRoute?: string | undefined;
|
|
1251
|
+
/** Legs data */
|
|
1252
|
+
legs?: PlaceStrategyOrderRequestLegsList | undefined;
|
|
1253
|
+
/** Strategy type (e.g. "CoveredCall") See Strategy Types section for all allowed values. */
|
|
1254
|
+
strategy?: StrategyTypes | (string & {}) | undefined;
|
|
1255
|
+
}
|
|
1256
|
+
export type PlaceStrategyOrderResponseOrdersList = Array<Order>;
|
|
1257
|
+
export interface PlaceStrategyOrderResponse {
|
|
1258
|
+
orderId?: number | undefined;
|
|
1259
|
+
orders?: PlaceStrategyOrderResponseOrdersList | undefined;
|
|
1260
|
+
}
|
|
1261
|
+
export interface SearchSymbolsRequest {
|
|
1262
|
+
/** Prefix of a symbol or any word in the description. */
|
|
1263
|
+
prefix?: string | undefined;
|
|
1264
|
+
/** Offset in number of records from the beginning of a result set. */
|
|
1265
|
+
offset?: number | undefined;
|
|
1266
|
+
}
|
|
1267
|
+
export interface SearchSymbolsResponseSymbolItem {
|
|
1268
|
+
/** Symbol name. */
|
|
1269
|
+
symbol?: string | undefined;
|
|
1270
|
+
/** Internal unique symbol identifier. */
|
|
1271
|
+
symbolId?: number | undefined;
|
|
1272
|
+
/** Symbol description. */
|
|
1273
|
+
description?: string | undefined;
|
|
1274
|
+
/** Symbol security type. See Security Type section for all allowed values. */
|
|
1275
|
+
securityType?: SecurityType | undefined;
|
|
1276
|
+
/** Primary listing exchange of the symbol. See Listing Exchange section for all allowed values. */
|
|
1277
|
+
listingExchange?: ListingExchange | undefined;
|
|
1278
|
+
/** Whether a symbol is tradable on the platform. */
|
|
1279
|
+
isTradable?: boolean | undefined;
|
|
1280
|
+
/** Whether a symbol has live market data. */
|
|
1281
|
+
isQuotable?: boolean | undefined;
|
|
1282
|
+
/** Symbol currency (ISO format). */
|
|
1283
|
+
currency?: string | undefined;
|
|
1284
|
+
}
|
|
1285
|
+
export type SearchSymbolsResponseSymbolList = Array<SearchSymbolsResponseSymbolItem>;
|
|
1286
|
+
export interface SearchSymbolsResponse {
|
|
1287
|
+
symbols?: SearchSymbolsResponseSymbolList | undefined;
|
|
1288
|
+
}
|
|
1289
|
+
export type CancelOrderError = QuestradeOpError;
|
|
1290
|
+
/** Allows to cancel an existing order. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders-orderid */
|
|
1291
|
+
export const cancelOrder: API.OperationMethod<
|
|
1292
|
+
CancelOrderRequest,
|
|
1293
|
+
CancelOrderResponse,
|
|
1294
|
+
CancelOrderError,
|
|
1295
|
+
QuestradeOpContext
|
|
1296
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1297
|
+
input: __S(0, __c0, 0) as any as S.Schema<CancelOrderRequest>,
|
|
1298
|
+
output: __S(1, __c0, 1) as any as S.Schema<CancelOrderResponse>,
|
|
1299
|
+
errors: [UnknownQuestradeError],
|
|
1300
|
+
protocol: QuestradeProtocol,
|
|
1301
|
+
retry: Retry.Retry,
|
|
1302
|
+
telemetry: TELEMETRY,
|
|
1303
|
+
span: "CancelOrder",
|
|
1304
|
+
}));
|
|
1305
|
+
|
|
1306
|
+
export type GetBalancesError = QuestradeOpError;
|
|
1307
|
+
/** Retrieves per-currency and combined balances for a specified account. Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-balances */
|
|
1308
|
+
export const getBalances: API.OperationMethod<
|
|
1309
|
+
GetBalancesRequest,
|
|
1310
|
+
GetBalancesResponse,
|
|
1311
|
+
GetBalancesError,
|
|
1312
|
+
QuestradeOpContext
|
|
1313
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1314
|
+
input: __S(8, __c1, 0) as any as S.Schema<GetBalancesRequest>,
|
|
1315
|
+
output: __S(11, __c1, 3) as any as S.Schema<GetBalancesResponse>,
|
|
1316
|
+
errors: [UnknownQuestradeError],
|
|
1317
|
+
protocol: QuestradeProtocol,
|
|
1318
|
+
retry: Retry.Retry,
|
|
1319
|
+
telemetry: TELEMETRY,
|
|
1320
|
+
span: "GetBalances",
|
|
1321
|
+
}));
|
|
1322
|
+
|
|
1323
|
+
export type GetBracketOrderImpactError = QuestradeOpError;
|
|
1324
|
+
/** Allows to (re)place or estimate impact of a bracket order against a certain account. The responses are the same for all bracket order insert and replace calls as the responses for old order calls (including impact). OrderGroupID and orderClass will be filled out for bracket orders in response. Data for each component of a bracket order. Primary and only one of the exit orders are required. Primary orderId and one of the exit orders are required. Both exit orders are required otherwise just place a single order. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders-bracket */
|
|
1325
|
+
export const getBracketOrderImpact: API.OperationMethod<
|
|
1326
|
+
GetBracketOrderImpactRequest,
|
|
1327
|
+
GetBracketOrderImpactResponse,
|
|
1328
|
+
GetBracketOrderImpactError,
|
|
1329
|
+
QuestradeOpContext
|
|
1330
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1331
|
+
input: __S(104, __c13, 0) as any as S.Schema<GetBracketOrderImpactRequest>,
|
|
1332
|
+
output: __S(120, __c15, 0) as any as S.Schema<GetBracketOrderImpactResponse>,
|
|
1333
|
+
errors: [UnknownQuestradeError],
|
|
1334
|
+
protocol: QuestradeProtocol,
|
|
1335
|
+
retry: Retry.Retry,
|
|
1336
|
+
telemetry: TELEMETRY,
|
|
1337
|
+
span: "GetBracketOrderImpact",
|
|
1338
|
+
}));
|
|
1339
|
+
|
|
1340
|
+
export type GetOptionChainError = QuestradeOpError;
|
|
1341
|
+
/** Retrieves an option chain for a particular underlying symbol. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/symbols-id-options */
|
|
1342
|
+
export const getOptionChain: API.OperationMethod<
|
|
1343
|
+
GetOptionChainRequest,
|
|
1344
|
+
GetOptionChainResponse,
|
|
1345
|
+
GetOptionChainError,
|
|
1346
|
+
QuestradeOpContext
|
|
1347
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1348
|
+
input: __S(176, __c22, 0) as any as S.Schema<GetOptionChainRequest>,
|
|
1349
|
+
output: __S(183, __c22, 7) as any as S.Schema<GetOptionChainResponse>,
|
|
1350
|
+
errors: [UnknownQuestradeError],
|
|
1351
|
+
protocol: QuestradeProtocol,
|
|
1352
|
+
retry: Retry.Retry,
|
|
1353
|
+
telemetry: TELEMETRY,
|
|
1354
|
+
span: "GetOptionChain",
|
|
1355
|
+
}));
|
|
1356
|
+
|
|
1357
|
+
export type GetOptionQuotesError = QuestradeOpError;
|
|
1358
|
+
/** Retrieves a single Level 1 market data quote and Greek data for one or more option symbols. Option filters based on underlying Ids The underlyingId and expiryDate fields are required in filters. Other fields are optional (if you need multiple expiries, specify multiple filters). You can specify an OptionIds and/or a filters vectors in any given request. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/markets-quotes-options */
|
|
1359
|
+
export const getOptionQuotes: API.OperationMethod<
|
|
1360
|
+
GetOptionQuotesRequest,
|
|
1361
|
+
GetOptionQuotesResponse,
|
|
1362
|
+
GetOptionQuotesError,
|
|
1363
|
+
QuestradeOpContext
|
|
1364
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1365
|
+
input: __S(187, __c23, 3) as any as S.Schema<GetOptionQuotesRequest>,
|
|
1366
|
+
output: __S(190, __c23, 6) as any as S.Schema<GetOptionQuotesResponse>,
|
|
1367
|
+
errors: [UnknownQuestradeError],
|
|
1368
|
+
protocol: QuestradeProtocol,
|
|
1369
|
+
retry: Retry.Retry,
|
|
1370
|
+
telemetry: TELEMETRY,
|
|
1371
|
+
span: "GetOptionQuotes",
|
|
1372
|
+
}));
|
|
1373
|
+
|
|
1374
|
+
export type GetOrderError = QuestradeOpError;
|
|
1375
|
+
/** Retrieves orders for specified account Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-orders */
|
|
1376
|
+
export const getOrder: API.OperationMethod<
|
|
1377
|
+
GetOrderRequest,
|
|
1378
|
+
GetOrderResponse,
|
|
1379
|
+
GetOrderError,
|
|
1380
|
+
QuestradeOpContext
|
|
1381
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1382
|
+
input: __S(192, __c24, 0) as any as S.Schema<GetOrderRequest>,
|
|
1383
|
+
output: __S(200, __c25, 0) as any as S.Schema<GetOrderResponse>,
|
|
1384
|
+
errors: [UnknownQuestradeError],
|
|
1385
|
+
protocol: QuestradeProtocol,
|
|
1386
|
+
retry: Retry.Retry,
|
|
1387
|
+
telemetry: TELEMETRY,
|
|
1388
|
+
span: "GetOrder",
|
|
1389
|
+
}));
|
|
1390
|
+
|
|
1391
|
+
export type GetOrderImpactError = QuestradeOpError;
|
|
1392
|
+
/** Allows to calculate the impact that a given order will have on the account without placing it. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders-impact */
|
|
1393
|
+
export const getOrderImpact: API.OperationMethod<
|
|
1394
|
+
GetOrderImpactRequest,
|
|
1395
|
+
GetOrderImpactResponse,
|
|
1396
|
+
GetOrderImpactError,
|
|
1397
|
+
QuestradeOpContext
|
|
1398
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1399
|
+
input: __S(224, __c28, 0) as any as S.Schema<GetOrderImpactRequest>,
|
|
1400
|
+
output: __S(120, __c15, 0) as any as S.Schema<GetOrderImpactResponse>,
|
|
1401
|
+
errors: [UnknownQuestradeError],
|
|
1402
|
+
protocol: QuestradeProtocol,
|
|
1403
|
+
retry: Retry.Retry,
|
|
1404
|
+
telemetry: TELEMETRY,
|
|
1405
|
+
span: "GetOrderImpact",
|
|
1406
|
+
}));
|
|
1407
|
+
|
|
1408
|
+
export type GetQuoteError = QuestradeOpError;
|
|
1409
|
+
/** Retrieves a single Level 1 market data quote for one or more symbols. IMPORTANT NOTE: Questrade user needs to be subscribed to a real-time data package, to receive market quotes in real-time, otherwise call to get quote is considered snap quote and limit per market can be quickly reached. Without real-time data package, once limit is reached, the response will return delayed data. (Please check "delay" parameter in response always) Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/markets-quotes-id */
|
|
1410
|
+
export const getQuote: API.OperationMethod<
|
|
1411
|
+
GetQuoteRequest,
|
|
1412
|
+
GetQuoteResponse,
|
|
1413
|
+
GetQuoteError,
|
|
1414
|
+
QuestradeOpContext
|
|
1415
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1416
|
+
input: __S(232, __c29, 0) as any as S.Schema<GetQuoteRequest>,
|
|
1417
|
+
output: __S(242, __c30, 2) as any as S.Schema<GetQuoteResponse>,
|
|
1418
|
+
errors: [UnknownQuestradeError],
|
|
1419
|
+
protocol: QuestradeProtocol,
|
|
1420
|
+
retry: Retry.Retry,
|
|
1421
|
+
telemetry: TELEMETRY,
|
|
1422
|
+
span: "GetQuote",
|
|
1423
|
+
}));
|
|
1424
|
+
|
|
1425
|
+
export type GetStrategyOrderImpactError = QuestradeOpError;
|
|
1426
|
+
/** Allows to (re)place or estimate impact of a multi-leg strategy order against a certain account. Maximum of 4 legs is allowed. If the Strategy Type is set as not Custom, then it will be verified to the mentioned strategy. NOTE: Leg quantities will be factorized. For example, if you place quantities of 10 and 1000, then they will be sent as an order quantity of 10 and leg ratio quantities of 1 and 100. Price also uses a factorized strategy. Refer to the strategy quote call to be sure which price to use. Data is the same but URLs for insertion and impact are slightly different. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders-strategy */
|
|
1427
|
+
export const getStrategyOrderImpact: API.OperationMethod<
|
|
1428
|
+
GetStrategyOrderImpactRequest,
|
|
1429
|
+
GetStrategyOrderImpactResponse,
|
|
1430
|
+
GetStrategyOrderImpactError,
|
|
1431
|
+
QuestradeOpContext
|
|
1432
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1433
|
+
input: __S(248, __c31, 0) as any as S.Schema<GetStrategyOrderImpactRequest>,
|
|
1434
|
+
output: __S(249, __c31, 1) as any as S.Schema<GetStrategyOrderImpactResponse>,
|
|
1435
|
+
errors: [UnknownQuestradeError],
|
|
1436
|
+
protocol: QuestradeProtocol,
|
|
1437
|
+
retry: Retry.Retry,
|
|
1438
|
+
telemetry: TELEMETRY,
|
|
1439
|
+
span: "GetStrategyOrderImpact",
|
|
1440
|
+
}));
|
|
1441
|
+
|
|
1442
|
+
export type GetStrategyQuotesError = QuestradeOpError;
|
|
1443
|
+
/** Retrieve a calculated L1 market data quote for a single or many multi-leg strategies. Strategy record for strategy quotes. Strategy record for strategy quotes Leg quantities will be factorized. For example, if you place quantities of 10 and 1000, they will be sent as an order quantity of 10 and leg ratio quantities 1 and 100. Price uses a factorized strategy. Maximum of 4 legs is allowed. The variantId parameter will be echoed so you can match the quotes to the request.The variantId parameter will be echoed so you can match the quotes to the request. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/markets-quotes-strategies */
|
|
1444
|
+
export const getStrategyQuotes: API.OperationMethod<
|
|
1445
|
+
GetStrategyQuotesRequest,
|
|
1446
|
+
GetStrategyQuotesResponse,
|
|
1447
|
+
GetStrategyQuotesError,
|
|
1448
|
+
QuestradeOpContext
|
|
1449
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1450
|
+
input: __S(268, __c33, 4) as any as S.Schema<GetStrategyQuotesRequest>,
|
|
1451
|
+
output: __S(271, __c33, 7) as any as S.Schema<GetStrategyQuotesResponse>,
|
|
1452
|
+
errors: [UnknownQuestradeError],
|
|
1453
|
+
protocol: QuestradeProtocol,
|
|
1454
|
+
retry: Retry.Retry,
|
|
1455
|
+
telemetry: TELEMETRY,
|
|
1456
|
+
span: "GetStrategyQuotes",
|
|
1457
|
+
}));
|
|
1458
|
+
|
|
1459
|
+
export type GetSymbolError = QuestradeOpError;
|
|
1460
|
+
/** Retrieves detailed information about one or more symbol. Notes: Either list of ids or names can be specified, but not both. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/symbols-id */
|
|
1461
|
+
export const getSymbol: API.OperationMethod<
|
|
1462
|
+
GetSymbolRequest,
|
|
1463
|
+
GetSymbolResponse,
|
|
1464
|
+
GetSymbolError,
|
|
1465
|
+
QuestradeOpContext
|
|
1466
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1467
|
+
input: __S(16, __c2, 0) as any as S.Schema<GetSymbolRequest>,
|
|
1468
|
+
output: __S(31, __c3, 7) as any as S.Schema<GetSymbolResponse>,
|
|
1469
|
+
errors: [UnknownQuestradeError],
|
|
1470
|
+
protocol: QuestradeProtocol,
|
|
1471
|
+
retry: Retry.Retry,
|
|
1472
|
+
telemetry: TELEMETRY,
|
|
1473
|
+
span: "GetSymbol",
|
|
1474
|
+
}));
|
|
1475
|
+
|
|
1476
|
+
export type GetTimeError = QuestradeOpError;
|
|
1477
|
+
/** Retrieves current server time. Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/time */
|
|
1478
|
+
export const getTime: API.OperationMethod<
|
|
1479
|
+
GetTimeRequest,
|
|
1480
|
+
GetTimeResponse,
|
|
1481
|
+
GetTimeError,
|
|
1482
|
+
QuestradeOpContext
|
|
1483
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1484
|
+
input: __S(32, __c4, 0) as any as S.Schema<GetTimeRequest>,
|
|
1485
|
+
output: __S(33, __c4, 1) as any as S.Schema<GetTimeResponse>,
|
|
1486
|
+
errors: [UnknownQuestradeError],
|
|
1487
|
+
protocol: QuestradeProtocol,
|
|
1488
|
+
retry: Retry.Retry,
|
|
1489
|
+
telemetry: TELEMETRY,
|
|
1490
|
+
span: "GetTime",
|
|
1491
|
+
}));
|
|
1492
|
+
|
|
1493
|
+
export type ListAccountsError = QuestradeOpError;
|
|
1494
|
+
/** Retrieves the accounts associated with the user on behalf of which the API client is authorized. Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts */
|
|
1495
|
+
export const listAccounts: API.OperationMethod<
|
|
1496
|
+
ListAccountsRequest,
|
|
1497
|
+
ListAccountsResponse,
|
|
1498
|
+
ListAccountsError,
|
|
1499
|
+
QuestradeOpContext
|
|
1500
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1501
|
+
input: __S(40, __c5, 0) as any as S.Schema<ListAccountsRequest>,
|
|
1502
|
+
output: __S(43, __c5, 3) as any as S.Schema<ListAccountsResponse>,
|
|
1503
|
+
errors: [UnknownQuestradeError],
|
|
1504
|
+
protocol: QuestradeProtocol,
|
|
1505
|
+
retry: Retry.Retry,
|
|
1506
|
+
telemetry: TELEMETRY,
|
|
1507
|
+
span: "ListAccounts",
|
|
1508
|
+
}));
|
|
1509
|
+
|
|
1510
|
+
export type ListActivitiesError = QuestradeOpError;
|
|
1511
|
+
/** Retrieve account activities, including cash transactions, dividends, trades, etc. Maximum 31 days of data can be requested at a time. Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-activities */
|
|
1512
|
+
export const listActivities: API.OperationMethod<
|
|
1513
|
+
ListActivitiesRequest,
|
|
1514
|
+
ListActivitiesResponse,
|
|
1515
|
+
ListActivitiesError,
|
|
1516
|
+
QuestradeOpContext
|
|
1517
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1518
|
+
input: __S(48, __c6, 0) as any as S.Schema<ListActivitiesRequest>,
|
|
1519
|
+
output: __S(51, __c6, 3) as any as S.Schema<ListActivitiesResponse>,
|
|
1520
|
+
errors: [UnknownQuestradeError],
|
|
1521
|
+
protocol: QuestradeProtocol,
|
|
1522
|
+
retry: Retry.Retry,
|
|
1523
|
+
telemetry: TELEMETRY,
|
|
1524
|
+
span: "ListActivities",
|
|
1525
|
+
}));
|
|
1526
|
+
|
|
1527
|
+
export type ListCandlesError = QuestradeOpError;
|
|
1528
|
+
/** Retrieves historical market data in the form of OHLC candlesticks for a specified symbol. This call is limited to returning 2,000 candlesticks in a single response. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/markets-candles-id */
|
|
1529
|
+
export const listCandles: API.OperationMethod<
|
|
1530
|
+
ListCandlesRequest,
|
|
1531
|
+
ListCandlesResponse,
|
|
1532
|
+
ListCandlesError,
|
|
1533
|
+
QuestradeOpContext
|
|
1534
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1535
|
+
input: __S(56, __c7, 0) as any as S.Schema<ListCandlesRequest>,
|
|
1536
|
+
output: __S(59, __c7, 3) as any as S.Schema<ListCandlesResponse>,
|
|
1537
|
+
errors: [UnknownQuestradeError],
|
|
1538
|
+
protocol: QuestradeProtocol,
|
|
1539
|
+
retry: Retry.Retry,
|
|
1540
|
+
telemetry: TELEMETRY,
|
|
1541
|
+
span: "ListCandles",
|
|
1542
|
+
}));
|
|
1543
|
+
|
|
1544
|
+
export type ListExecutionsError = QuestradeOpError;
|
|
1545
|
+
/** Retrieves executions for a specific account. Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-executions */
|
|
1546
|
+
export const listExecutions: API.OperationMethod<
|
|
1547
|
+
ListExecutionsRequest,
|
|
1548
|
+
ListExecutionsResponse,
|
|
1549
|
+
ListExecutionsError,
|
|
1550
|
+
QuestradeOpContext
|
|
1551
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1552
|
+
input: __S(64, __c8, 0) as any as S.Schema<ListExecutionsRequest>,
|
|
1553
|
+
output: __S(67, __c8, 3) as any as S.Schema<ListExecutionsResponse>,
|
|
1554
|
+
errors: [UnknownQuestradeError],
|
|
1555
|
+
protocol: QuestradeProtocol,
|
|
1556
|
+
retry: Retry.Retry,
|
|
1557
|
+
telemetry: TELEMETRY,
|
|
1558
|
+
span: "ListExecutions",
|
|
1559
|
+
}));
|
|
1560
|
+
|
|
1561
|
+
export type ListMarketsError = QuestradeOpError;
|
|
1562
|
+
/** Retrieves information about supported markets. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/markets */
|
|
1563
|
+
export const listMarkets: API.OperationMethod<
|
|
1564
|
+
ListMarketsRequest,
|
|
1565
|
+
ListMarketsResponse,
|
|
1566
|
+
ListMarketsError,
|
|
1567
|
+
QuestradeOpContext
|
|
1568
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1569
|
+
input: __S(72, __c9, 0) as any as S.Schema<ListMarketsRequest>,
|
|
1570
|
+
output: __S(76, __c9, 4) as any as S.Schema<ListMarketsResponse>,
|
|
1571
|
+
errors: [UnknownQuestradeError],
|
|
1572
|
+
protocol: QuestradeProtocol,
|
|
1573
|
+
retry: Retry.Retry,
|
|
1574
|
+
telemetry: TELEMETRY,
|
|
1575
|
+
span: "ListMarkets",
|
|
1576
|
+
}));
|
|
1577
|
+
|
|
1578
|
+
export type ListOrdersError = QuestradeOpError;
|
|
1579
|
+
/** Retrieves orders for specified account Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-orders */
|
|
1580
|
+
export const listOrders: API.OperationMethod<
|
|
1581
|
+
ListOrdersRequest,
|
|
1582
|
+
ListOrdersResponse,
|
|
1583
|
+
ListOrdersError,
|
|
1584
|
+
QuestradeOpContext
|
|
1585
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1586
|
+
input: __S(80, __c10, 0) as any as S.Schema<ListOrdersRequest>,
|
|
1587
|
+
output: __S(200, __c25, 0) as any as S.Schema<ListOrdersResponse>,
|
|
1588
|
+
errors: [UnknownQuestradeError],
|
|
1589
|
+
protocol: QuestradeProtocol,
|
|
1590
|
+
retry: Retry.Retry,
|
|
1591
|
+
telemetry: TELEMETRY,
|
|
1592
|
+
span: "ListOrders",
|
|
1593
|
+
}));
|
|
1594
|
+
|
|
1595
|
+
export type ListPositionsError = QuestradeOpError;
|
|
1596
|
+
/** Retrieves positions in a specified account. Documentation: https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-positions */
|
|
1597
|
+
export const listPositions: API.OperationMethod<
|
|
1598
|
+
ListPositionsRequest,
|
|
1599
|
+
ListPositionsResponse,
|
|
1600
|
+
ListPositionsError,
|
|
1601
|
+
QuestradeOpContext
|
|
1602
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1603
|
+
input: __S(88, __c11, 0) as any as S.Schema<ListPositionsRequest>,
|
|
1604
|
+
output: __S(91, __c11, 3) as any as S.Schema<ListPositionsResponse>,
|
|
1605
|
+
errors: [UnknownQuestradeError],
|
|
1606
|
+
protocol: QuestradeProtocol,
|
|
1607
|
+
retry: Retry.Retry,
|
|
1608
|
+
telemetry: TELEMETRY,
|
|
1609
|
+
span: "ListPositions",
|
|
1610
|
+
}));
|
|
1611
|
+
|
|
1612
|
+
export type ListQuotesError = QuestradeOpError;
|
|
1613
|
+
/** Retrieves a single Level 1 market data quote for one or more symbols. IMPORTANT NOTE: Questrade user needs to be subscribed to a real-time data package, to receive market quotes in real-time, otherwise call to get quote is considered snap quote and limit per market can be quickly reached. Without real-time data package, once limit is reached, the response will return delayed data. (Please check "delay" parameter in response always) Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/markets-quotes-id */
|
|
1614
|
+
export const listQuotes: API.OperationMethod<
|
|
1615
|
+
ListQuotesRequest,
|
|
1616
|
+
ListQuotesResponse,
|
|
1617
|
+
ListQuotesError,
|
|
1618
|
+
QuestradeOpContext
|
|
1619
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1620
|
+
input: __S(96, __c12, 0) as any as S.Schema<ListQuotesRequest>,
|
|
1621
|
+
output: __S(242, __c30, 2) as any as S.Schema<ListQuotesResponse>,
|
|
1622
|
+
errors: [UnknownQuestradeError],
|
|
1623
|
+
protocol: QuestradeProtocol,
|
|
1624
|
+
retry: Retry.Retry,
|
|
1625
|
+
telemetry: TELEMETRY,
|
|
1626
|
+
span: "ListQuotes",
|
|
1627
|
+
}));
|
|
1628
|
+
|
|
1629
|
+
export type ListSymbolsError = QuestradeOpError;
|
|
1630
|
+
/** Retrieves detailed information about one or more symbol. Notes: Either list of ids or names can be specified, but not both. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/symbols-id */
|
|
1631
|
+
export const listSymbols: API.OperationMethod<
|
|
1632
|
+
ListSymbolsRequest,
|
|
1633
|
+
ListSymbolsResponse,
|
|
1634
|
+
ListSymbolsError,
|
|
1635
|
+
QuestradeOpContext
|
|
1636
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1637
|
+
input: __S(128, __c16, 0) as any as S.Schema<ListSymbolsRequest>,
|
|
1638
|
+
output: __S(31, __c3, 7) as any as S.Schema<ListSymbolsResponse>,
|
|
1639
|
+
errors: [UnknownQuestradeError],
|
|
1640
|
+
protocol: QuestradeProtocol,
|
|
1641
|
+
retry: Retry.Retry,
|
|
1642
|
+
telemetry: TELEMETRY,
|
|
1643
|
+
span: "ListSymbols",
|
|
1644
|
+
}));
|
|
1645
|
+
|
|
1646
|
+
export type PlaceBracketOrderError = QuestradeOpError;
|
|
1647
|
+
/** Allows to (re)place or estimate impact of a bracket order against a certain account. The responses are the same for all bracket order insert and replace calls as the responses for old order calls (including impact). OrderGroupID and orderClass will be filled out for bracket orders in response. Data for each component of a bracket order. Primary and only one of the exit orders are required. Primary orderId and one of the exit orders are required. Both exit orders are required otherwise just place a single order. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders-bracket */
|
|
1648
|
+
export const placeBracketOrder: API.OperationMethod<
|
|
1649
|
+
PlaceBracketOrderRequest,
|
|
1650
|
+
PlaceBracketOrderResponse,
|
|
1651
|
+
PlaceBracketOrderError,
|
|
1652
|
+
QuestradeOpContext
|
|
1653
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1654
|
+
input: __S(136, __c17, 0) as any as S.Schema<PlaceBracketOrderRequest>,
|
|
1655
|
+
output: __S(144, __c18, 0) as any as S.Schema<PlaceBracketOrderResponse>,
|
|
1656
|
+
errors: [UnknownQuestradeError],
|
|
1657
|
+
protocol: QuestradeProtocol,
|
|
1658
|
+
retry: Retry.Retry,
|
|
1659
|
+
telemetry: TELEMETRY,
|
|
1660
|
+
span: "PlaceBracketOrder",
|
|
1661
|
+
}));
|
|
1662
|
+
|
|
1663
|
+
export type PlaceOrderError = QuestradeOpError;
|
|
1664
|
+
/** Allows to (re)place an order against a certain account. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders */
|
|
1665
|
+
export const placeOrder: API.OperationMethod<
|
|
1666
|
+
PlaceOrderRequest,
|
|
1667
|
+
PlaceOrderResponse,
|
|
1668
|
+
PlaceOrderError,
|
|
1669
|
+
QuestradeOpContext
|
|
1670
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1671
|
+
input: __S(152, __c19, 0) as any as S.Schema<PlaceOrderRequest>,
|
|
1672
|
+
output: __S(144, __c18, 0) as any as S.Schema<PlaceOrderResponse>,
|
|
1673
|
+
errors: [UnknownQuestradeError],
|
|
1674
|
+
protocol: QuestradeProtocol,
|
|
1675
|
+
retry: Retry.Retry,
|
|
1676
|
+
telemetry: TELEMETRY,
|
|
1677
|
+
span: "PlaceOrder",
|
|
1678
|
+
}));
|
|
1679
|
+
|
|
1680
|
+
export type PlaceStrategyOrderError = QuestradeOpError;
|
|
1681
|
+
/** Allows to (re)place or estimate impact of a multi-leg strategy order against a certain account. Maximum of 4 legs is allowed. If the Strategy Type is set as not Custom, then it will be verified to the mentioned strategy. NOTE: Leg quantities will be factorized. For example, if you place quantities of 10 and 1000, then they will be sent as an order quantity of 10 and leg ratio quantities of 1 and 100. Price also uses a factorized strategy. Refer to the strategy quote call to be sure which price to use. Data is the same but URLs for insertion and impact are slightly different. Documentation: https://www.questrade.com/api/documentation/rest-operations/order-calls/accounts-id-orders-strategy */
|
|
1682
|
+
export const placeStrategyOrder: API.OperationMethod<
|
|
1683
|
+
PlaceStrategyOrderRequest,
|
|
1684
|
+
PlaceStrategyOrderResponse,
|
|
1685
|
+
PlaceStrategyOrderError,
|
|
1686
|
+
QuestradeOpContext
|
|
1687
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1688
|
+
input: __S(160, __c20, 0) as any as S.Schema<PlaceStrategyOrderRequest>,
|
|
1689
|
+
output: __S(144, __c18, 0) as any as S.Schema<PlaceStrategyOrderResponse>,
|
|
1690
|
+
errors: [UnknownQuestradeError],
|
|
1691
|
+
protocol: QuestradeProtocol,
|
|
1692
|
+
retry: Retry.Retry,
|
|
1693
|
+
telemetry: TELEMETRY,
|
|
1694
|
+
span: "PlaceStrategyOrder",
|
|
1695
|
+
}));
|
|
1696
|
+
|
|
1697
|
+
export type SearchSymbolsError = QuestradeOpError;
|
|
1698
|
+
/** Retrieves symbol(s) using several search criteria. Documentation: https://www.questrade.com/api/documentation/rest-operations/market-calls/symbols-search */
|
|
1699
|
+
export const searchSymbols: API.OperationMethod<
|
|
1700
|
+
SearchSymbolsRequest,
|
|
1701
|
+
SearchSymbolsResponse,
|
|
1702
|
+
SearchSymbolsError,
|
|
1703
|
+
QuestradeOpContext
|
|
1704
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1705
|
+
input: __S(168, __c21, 0) as any as S.Schema<SearchSymbolsRequest>,
|
|
1706
|
+
output: __S(171, __c21, 3) as any as S.Schema<SearchSymbolsResponse>,
|
|
1707
|
+
errors: [UnknownQuestradeError],
|
|
1708
|
+
protocol: QuestradeProtocol,
|
|
1709
|
+
retry: Retry.Retry,
|
|
1710
|
+
telemetry: TELEMETRY,
|
|
1711
|
+
span: "SearchSymbols",
|
|
1712
|
+
}));
|
|
1713
|
+
|
|
1714
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
1715
|
+
function __c0(j: number): any {
|
|
1716
|
+
switch (j) {
|
|
1717
|
+
case 0:
|
|
1718
|
+
return S.suspend(() =>
|
|
1719
|
+
S.Struct({
|
|
1720
|
+
id: S.String.pipe(T.Label()),
|
|
1721
|
+
orderId: S.Number.pipe(T.Label()),
|
|
1722
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/v1/accounts/{id}/orders/{orderId}", code: 200 })),
|
|
1723
|
+
).annotate({ identifier: "CancelOrderRequest" });
|
|
1724
|
+
case 1:
|
|
1725
|
+
return S.suspend(() =>
|
|
1726
|
+
S.Struct({
|
|
1727
|
+
orderId: S.optional(S.Number),
|
|
1728
|
+
}),
|
|
1729
|
+
).annotate({ identifier: "CancelOrderResponse" });
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
function __c1(j: number): any {
|
|
1733
|
+
switch (j) {
|
|
1734
|
+
case 0:
|
|
1735
|
+
return S.suspend(() =>
|
|
1736
|
+
S.Struct({
|
|
1737
|
+
id: S.String.pipe(T.Label()),
|
|
1738
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/accounts/{id}/balances", code: 200 })),
|
|
1739
|
+
).annotate({ identifier: "GetBalancesRequest" });
|
|
1740
|
+
case 1:
|
|
1741
|
+
return S.suspend(() =>
|
|
1742
|
+
S.Struct({
|
|
1743
|
+
currency: S.optional(S.String),
|
|
1744
|
+
cash: S.optional(S.Number),
|
|
1745
|
+
marketValue: S.optional(S.Number),
|
|
1746
|
+
totalEquity: S.optional(S.Number),
|
|
1747
|
+
buyingPower: S.optional(S.Number),
|
|
1748
|
+
maintenanceExcess: S.optional(S.Number),
|
|
1749
|
+
isRealTime: S.optional(S.Boolean),
|
|
1750
|
+
}),
|
|
1751
|
+
).annotate({ identifier: "Balance" });
|
|
1752
|
+
case 2:
|
|
1753
|
+
return S.Array(__S(9, __c1, 1));
|
|
1754
|
+
case 3:
|
|
1755
|
+
return S.suspend(() =>
|
|
1756
|
+
S.Struct({
|
|
1757
|
+
perCurrencyBalances: S.optional(__S(10, __c1, 2)),
|
|
1758
|
+
combinedBalances: S.optional(__S(10, __c1, 2)),
|
|
1759
|
+
sodPerCurrencyBalances: S.optional(__S(10, __c1, 2)),
|
|
1760
|
+
sodCombinedBalances: S.optional(__S(10, __c1, 2)),
|
|
1761
|
+
}),
|
|
1762
|
+
).annotate({ identifier: "GetBalancesResponse" });
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
function __c2(j: number): any {
|
|
1766
|
+
switch (j) {
|
|
1767
|
+
case 0:
|
|
1768
|
+
return S.suspend(() =>
|
|
1769
|
+
S.Struct({
|
|
1770
|
+
id: S.Number.pipe(T.Label()),
|
|
1771
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/symbols/{id}", code: 200 })),
|
|
1772
|
+
).annotate({ identifier: "GetSymbolRequest" });
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
function __c3(j: number): any {
|
|
1776
|
+
switch (j) {
|
|
1777
|
+
case 0:
|
|
1778
|
+
return S.suspend(() =>
|
|
1779
|
+
S.Struct({
|
|
1780
|
+
multiplier: S.optional(S.Number),
|
|
1781
|
+
underlyingSymbol: S.optional(S.String),
|
|
1782
|
+
underlyingSymbolId: S.optional(S.String),
|
|
1783
|
+
}),
|
|
1784
|
+
).annotate({ identifier: "UnderlyingMultiplierPair" });
|
|
1785
|
+
case 1:
|
|
1786
|
+
return S.Array(__S(24, __c3, 0));
|
|
1787
|
+
case 2:
|
|
1788
|
+
return S.suspend(() =>
|
|
1789
|
+
S.Struct({
|
|
1790
|
+
underlyings: S.optional(__S(25, __c3, 1)),
|
|
1791
|
+
cashInLieu: S.optional(S.Number),
|
|
1792
|
+
}),
|
|
1793
|
+
).annotate({ identifier: "GetSymbolResponseSymbolsItemOptionContractDeliverables" });
|
|
1794
|
+
case 3:
|
|
1795
|
+
return S.suspend(() =>
|
|
1796
|
+
S.Struct({
|
|
1797
|
+
pivot: S.optional(S.Number),
|
|
1798
|
+
minTick: S.optional(S.Number),
|
|
1799
|
+
}),
|
|
1800
|
+
).annotate({ identifier: "MinTickData" });
|
|
1801
|
+
case 4:
|
|
1802
|
+
return S.Array(__S(27, __c3, 3));
|
|
1803
|
+
case 5:
|
|
1804
|
+
return S.suspend(() =>
|
|
1805
|
+
S.Struct({
|
|
1806
|
+
symbol: S.optional(S.String),
|
|
1807
|
+
symbolId: S.optional(S.Number),
|
|
1808
|
+
prevDayClosePrice: S.optional(S.Number),
|
|
1809
|
+
highPrice52: S.optional(S.Number),
|
|
1810
|
+
lowPrice52: S.optional(S.Number),
|
|
1811
|
+
averageVol3Months: S.optional(S.Number),
|
|
1812
|
+
averageVol20Days: S.optional(S.Number),
|
|
1813
|
+
outstandingShares: S.optional(S.Number),
|
|
1814
|
+
eps: S.optional(S.Number),
|
|
1815
|
+
pe: S.optional(S.Number),
|
|
1816
|
+
dividend: S.optional(S.Number),
|
|
1817
|
+
yield: S.optional(S.Number),
|
|
1818
|
+
exDate: S.optional(S.String),
|
|
1819
|
+
marketCap: S.optional(S.Number),
|
|
1820
|
+
tradeUnit: S.optional(S.Number),
|
|
1821
|
+
optionType: S.optional(S.NullOr(S.String)),
|
|
1822
|
+
optionDurationType: S.optional(S.NullOr(S.String)),
|
|
1823
|
+
optionRoot: S.optional(S.String),
|
|
1824
|
+
optionContractDeliverables: S.optional(__S(26, __c3, 2)),
|
|
1825
|
+
optionExerciseType: S.optional(S.NullOr(S.String)),
|
|
1826
|
+
listingExchange: S.optional(S.String),
|
|
1827
|
+
description: S.optional(S.String),
|
|
1828
|
+
securityType: S.optional(S.String),
|
|
1829
|
+
optionExpiryDate: S.optional(S.NullOr(S.String)),
|
|
1830
|
+
dividendDate: S.optional(S.String),
|
|
1831
|
+
optionStrikePrice: S.optional(S.NullOr(S.Number)),
|
|
1832
|
+
isTradable: S.optional(S.Boolean),
|
|
1833
|
+
isQuotable: S.optional(S.Boolean),
|
|
1834
|
+
hasOptions: S.optional(S.Boolean),
|
|
1835
|
+
minTicks: S.optional(__S(28, __c3, 4)),
|
|
1836
|
+
industrySector: S.optional(S.String),
|
|
1837
|
+
industryGroup: S.optional(S.String),
|
|
1838
|
+
industrySubGroup: S.optional(S.String),
|
|
1839
|
+
currency: S.optional(S.String),
|
|
1840
|
+
}),
|
|
1841
|
+
).annotate({ identifier: "GetSymbolResponseSymbolsItem" });
|
|
1842
|
+
case 6:
|
|
1843
|
+
return S.Array(__S(29, __c3, 5));
|
|
1844
|
+
case 7:
|
|
1845
|
+
return S.suspend(() =>
|
|
1846
|
+
S.Struct({
|
|
1847
|
+
symbols: S.optional(__S(30, __c3, 6)),
|
|
1848
|
+
}),
|
|
1849
|
+
).annotate({ identifier: "GetSymbolResponse" });
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
function __c4(j: number): any {
|
|
1853
|
+
switch (j) {
|
|
1854
|
+
case 0:
|
|
1855
|
+
return S.suspend(() =>
|
|
1856
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/time", code: 200 })),
|
|
1857
|
+
).annotate({ identifier: "GetTimeRequest" });
|
|
1858
|
+
case 1:
|
|
1859
|
+
return S.suspend(() =>
|
|
1860
|
+
S.Struct({
|
|
1861
|
+
time: S.optional(S.String),
|
|
1862
|
+
}),
|
|
1863
|
+
).annotate({ identifier: "GetTimeResponse" });
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
function __c5(j: number): any {
|
|
1867
|
+
switch (j) {
|
|
1868
|
+
case 0:
|
|
1869
|
+
return S.suspend(() =>
|
|
1870
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/accounts", code: 200 })),
|
|
1871
|
+
).annotate({ identifier: "ListAccountsRequest" });
|
|
1872
|
+
case 1:
|
|
1873
|
+
return S.suspend(() =>
|
|
1874
|
+
S.Struct({
|
|
1875
|
+
type: S.optional(S.String),
|
|
1876
|
+
number: S.optional(S.String),
|
|
1877
|
+
status: S.optional(S.String),
|
|
1878
|
+
isPrimary: S.optional(S.Boolean),
|
|
1879
|
+
isBilling: S.optional(S.Boolean),
|
|
1880
|
+
clientAccountType: S.optional(S.String),
|
|
1881
|
+
}),
|
|
1882
|
+
).annotate({ identifier: "Account" });
|
|
1883
|
+
case 2:
|
|
1884
|
+
return S.Array(__S(41, __c5, 1));
|
|
1885
|
+
case 3:
|
|
1886
|
+
return S.suspend(() =>
|
|
1887
|
+
S.Struct({
|
|
1888
|
+
accounts: S.optional(__S(42, __c5, 2)),
|
|
1889
|
+
userId: S.optional(S.Number),
|
|
1890
|
+
}),
|
|
1891
|
+
).annotate({ identifier: "ListAccountsResponse" });
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
function __c6(j: number): any {
|
|
1895
|
+
switch (j) {
|
|
1896
|
+
case 0:
|
|
1897
|
+
return S.suspend(() =>
|
|
1898
|
+
S.Struct({
|
|
1899
|
+
id: S.String.pipe(T.Label()),
|
|
1900
|
+
startTime: S.optional(S.String.pipe(T.Query())),
|
|
1901
|
+
endTime: S.optional(S.String.pipe(T.Query())),
|
|
1902
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/accounts/{id}/activities", code: 200 })),
|
|
1903
|
+
).annotate({ identifier: "ListActivitiesRequest" });
|
|
1904
|
+
case 1:
|
|
1905
|
+
return S.suspend(() =>
|
|
1906
|
+
S.Struct({
|
|
1907
|
+
tradeDate: S.optional(S.String),
|
|
1908
|
+
transactionDate: S.optional(S.String),
|
|
1909
|
+
settlementDate: S.optional(S.String),
|
|
1910
|
+
action: S.optional(S.String),
|
|
1911
|
+
symbol: S.optional(S.String),
|
|
1912
|
+
symbolId: S.optional(S.Number),
|
|
1913
|
+
description: S.optional(S.String),
|
|
1914
|
+
currency: S.optional(S.String),
|
|
1915
|
+
quantity: S.optional(S.Number),
|
|
1916
|
+
price: S.optional(S.Number),
|
|
1917
|
+
grossAmount: S.optional(S.Number),
|
|
1918
|
+
commission: S.optional(S.Number),
|
|
1919
|
+
netAmount: S.optional(S.Number),
|
|
1920
|
+
type: S.optional(S.String),
|
|
1921
|
+
}),
|
|
1922
|
+
).annotate({ identifier: "AccountActivity" });
|
|
1923
|
+
case 2:
|
|
1924
|
+
return S.Array(__S(49, __c6, 1));
|
|
1925
|
+
case 3:
|
|
1926
|
+
return S.suspend(() =>
|
|
1927
|
+
S.Struct({
|
|
1928
|
+
activities: S.optional(__S(50, __c6, 2)),
|
|
1929
|
+
}),
|
|
1930
|
+
).annotate({ identifier: "ListActivitiesResponse" });
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
function __c7(j: number): any {
|
|
1934
|
+
switch (j) {
|
|
1935
|
+
case 0:
|
|
1936
|
+
return S.suspend(() =>
|
|
1937
|
+
S.Struct({
|
|
1938
|
+
id: S.Number.pipe(T.Label()),
|
|
1939
|
+
startTime: S.optional(S.String.pipe(T.Query())),
|
|
1940
|
+
endTime: S.optional(S.String.pipe(T.Query())),
|
|
1941
|
+
interval: S.optional(S.String.pipe(T.Query())),
|
|
1942
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/markets/candles/{id}", code: 200 })),
|
|
1943
|
+
).annotate({ identifier: "ListCandlesRequest" });
|
|
1944
|
+
case 1:
|
|
1945
|
+
return S.suspend(() =>
|
|
1946
|
+
S.Struct({
|
|
1947
|
+
start: S.optional(S.String),
|
|
1948
|
+
end: S.optional(S.String),
|
|
1949
|
+
low: S.optional(S.Number),
|
|
1950
|
+
high: S.optional(S.Number),
|
|
1951
|
+
open: S.optional(S.Number),
|
|
1952
|
+
close: S.optional(S.Number),
|
|
1953
|
+
volume: S.optional(S.Number),
|
|
1954
|
+
}),
|
|
1955
|
+
).annotate({ identifier: "Candle" });
|
|
1956
|
+
case 2:
|
|
1957
|
+
return S.Array(__S(57, __c7, 1));
|
|
1958
|
+
case 3:
|
|
1959
|
+
return S.suspend(() =>
|
|
1960
|
+
S.Struct({
|
|
1961
|
+
candles: S.optional(__S(58, __c7, 2)),
|
|
1962
|
+
}),
|
|
1963
|
+
).annotate({ identifier: "ListCandlesResponse" });
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
function __c8(j: number): any {
|
|
1967
|
+
switch (j) {
|
|
1968
|
+
case 0:
|
|
1969
|
+
return S.suspend(() =>
|
|
1970
|
+
S.Struct({
|
|
1971
|
+
id: S.String.pipe(T.Label()),
|
|
1972
|
+
startTime: S.optional(S.String.pipe(T.Query())),
|
|
1973
|
+
endTime: S.optional(S.String.pipe(T.Query())),
|
|
1974
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/accounts/{id}/executions", code: 200 })),
|
|
1975
|
+
).annotate({ identifier: "ListExecutionsRequest" });
|
|
1976
|
+
case 1:
|
|
1977
|
+
return S.suspend(() =>
|
|
1978
|
+
S.Struct({
|
|
1979
|
+
symbol: S.optional(S.String),
|
|
1980
|
+
symbolId: S.optional(S.Number),
|
|
1981
|
+
quantity: S.optional(S.Number),
|
|
1982
|
+
side: S.optional(S.String),
|
|
1983
|
+
price: S.optional(S.Number),
|
|
1984
|
+
id: S.optional(S.Number),
|
|
1985
|
+
orderId: S.optional(S.Number),
|
|
1986
|
+
orderChainId: S.optional(S.Number),
|
|
1987
|
+
exchangeExecId: S.optional(S.String),
|
|
1988
|
+
notes: S.optional(S.String),
|
|
1989
|
+
venue: S.optional(S.String),
|
|
1990
|
+
totalCost: S.optional(S.Number),
|
|
1991
|
+
orderPlacementCommission: S.optional(S.Number),
|
|
1992
|
+
commission: S.optional(S.Number),
|
|
1993
|
+
executionFee: S.optional(S.Number),
|
|
1994
|
+
secFee: S.optional(S.Number),
|
|
1995
|
+
canadianExecutionFee: S.optional(S.Number),
|
|
1996
|
+
parentId: S.optional(S.Number),
|
|
1997
|
+
timestamp: S.optional(S.String),
|
|
1998
|
+
}),
|
|
1999
|
+
).annotate({ identifier: "Execution" });
|
|
2000
|
+
case 2:
|
|
2001
|
+
return S.Array(__S(65, __c8, 1));
|
|
2002
|
+
case 3:
|
|
2003
|
+
return S.suspend(() =>
|
|
2004
|
+
S.Struct({
|
|
2005
|
+
executions: S.optional(__S(66, __c8, 2)),
|
|
2006
|
+
}),
|
|
2007
|
+
).annotate({ identifier: "ListExecutionsResponse" });
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
function __c9(j: number): any {
|
|
2011
|
+
switch (j) {
|
|
2012
|
+
case 0:
|
|
2013
|
+
return S.suspend(() =>
|
|
2014
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/markets", code: 200 })),
|
|
2015
|
+
).annotate({ identifier: "ListMarketsRequest" });
|
|
2016
|
+
case 1:
|
|
2017
|
+
return S.Array(S.String);
|
|
2018
|
+
case 2:
|
|
2019
|
+
return S.suspend(() =>
|
|
2020
|
+
S.Struct({
|
|
2021
|
+
name: S.optional(S.String),
|
|
2022
|
+
tradingVenues: S.optional(__S(73, __c9, 1)),
|
|
2023
|
+
defaultTradingVenue: S.optional(S.String),
|
|
2024
|
+
primaryOrderRoutes: S.optional(__S(73, __c9, 1)),
|
|
2025
|
+
secondaryOrderRoutes: S.optional(__S(73, __c9, 1)),
|
|
2026
|
+
level1Feeds: S.optional(__S(73, __c9, 1)),
|
|
2027
|
+
extendedStartTime: S.optional(S.String),
|
|
2028
|
+
startTime: S.optional(S.String),
|
|
2029
|
+
endTime: S.optional(S.String),
|
|
2030
|
+
currency: S.optional(S.String),
|
|
2031
|
+
snapQuotesLimit: S.optional(S.Number),
|
|
2032
|
+
level2Feeds: S.optional(__S(73, __c9, 1)),
|
|
2033
|
+
extendedEndTime: S.optional(S.String),
|
|
2034
|
+
}),
|
|
2035
|
+
).annotate({ identifier: "Market" });
|
|
2036
|
+
case 3:
|
|
2037
|
+
return S.Array(__S(74, __c9, 2));
|
|
2038
|
+
case 4:
|
|
2039
|
+
return S.suspend(() =>
|
|
2040
|
+
S.Struct({
|
|
2041
|
+
markets: S.optional(__S(75, __c9, 3)),
|
|
2042
|
+
}),
|
|
2043
|
+
).annotate({ identifier: "ListMarketsResponse" });
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
function __c10(j: number): any {
|
|
2047
|
+
switch (j) {
|
|
2048
|
+
case 0:
|
|
2049
|
+
return S.suspend(() =>
|
|
2050
|
+
S.Struct({
|
|
2051
|
+
id: S.String.pipe(T.Label()),
|
|
2052
|
+
startTime: S.optional(S.String.pipe(T.Query())),
|
|
2053
|
+
endTime: S.optional(S.String.pipe(T.Query())),
|
|
2054
|
+
stateFilter: S.optional(S.String.pipe(T.Query())),
|
|
2055
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/accounts/{id}/orders", code: 200 })),
|
|
2056
|
+
).annotate({ identifier: "ListOrdersRequest" });
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
function __c11(j: number): any {
|
|
2060
|
+
switch (j) {
|
|
2061
|
+
case 0:
|
|
2062
|
+
return S.suspend(() =>
|
|
2063
|
+
S.Struct({
|
|
2064
|
+
id: S.String.pipe(T.Label()),
|
|
2065
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/accounts/{id}/positions", code: 200 })),
|
|
2066
|
+
).annotate({ identifier: "ListPositionsRequest" });
|
|
2067
|
+
case 1:
|
|
2068
|
+
return S.suspend(() =>
|
|
2069
|
+
S.Struct({
|
|
2070
|
+
symbol: S.optional(S.String),
|
|
2071
|
+
symbolId: S.optional(S.Number),
|
|
2072
|
+
openQuantity: S.optional(S.Number),
|
|
2073
|
+
currentMarketValue: S.optional(S.Number),
|
|
2074
|
+
currentPrice: S.optional(S.Number),
|
|
2075
|
+
averageEntryPrice: S.optional(S.Number),
|
|
2076
|
+
closedPnl: S.optional(S.Number),
|
|
2077
|
+
openPnl: S.optional(S.Number),
|
|
2078
|
+
totalCost: S.optional(S.Number),
|
|
2079
|
+
isRealTime: S.optional(S.Boolean),
|
|
2080
|
+
isUnderReorg: S.optional(S.Boolean),
|
|
2081
|
+
closedQuantity: S.optional(S.Number),
|
|
2082
|
+
}),
|
|
2083
|
+
).annotate({ identifier: "Position" });
|
|
2084
|
+
case 2:
|
|
2085
|
+
return S.Array(__S(89, __c11, 1));
|
|
2086
|
+
case 3:
|
|
2087
|
+
return S.suspend(() =>
|
|
2088
|
+
S.Struct({
|
|
2089
|
+
positions: S.optional(__S(90, __c11, 2)),
|
|
2090
|
+
}),
|
|
2091
|
+
).annotate({ identifier: "ListPositionsResponse" });
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
function __c12(j: number): any {
|
|
2095
|
+
switch (j) {
|
|
2096
|
+
case 0:
|
|
2097
|
+
return S.suspend(() =>
|
|
2098
|
+
S.Struct({
|
|
2099
|
+
ids: S.optional(S.String.pipe(T.Query())),
|
|
2100
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/markets/quotes", code: 200 })),
|
|
2101
|
+
).annotate({ identifier: "ListQuotesRequest" });
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
function __c13(j: number): any {
|
|
2105
|
+
switch (j) {
|
|
2106
|
+
case 0:
|
|
2107
|
+
return S.suspend(() =>
|
|
2108
|
+
S.Struct({
|
|
2109
|
+
id: S.String.pipe(T.Label()),
|
|
2110
|
+
symbolId: S.optional(S.Number),
|
|
2111
|
+
primaryRoute: S.optional(S.String),
|
|
2112
|
+
secondaryRoute: S.optional(S.String),
|
|
2113
|
+
components: S.optional(__S(113, __c14, 1)),
|
|
2114
|
+
}).pipe(
|
|
2115
|
+
T.Http({ method: "POST", uri: "/v1/accounts/{id}/orders/bracket/impact", code: 200 }),
|
|
2116
|
+
),
|
|
2117
|
+
).annotate({ identifier: "GetBracketOrderImpactRequest" });
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
function __c14(j: number): any {
|
|
2121
|
+
switch (j) {
|
|
2122
|
+
case 0:
|
|
2123
|
+
return S.suspend(() =>
|
|
2124
|
+
S.Struct({
|
|
2125
|
+
limitPrice: S.optional(S.Number),
|
|
2126
|
+
stopPrice: S.optional(S.Number),
|
|
2127
|
+
orderType: S.optional(S.String),
|
|
2128
|
+
timeInForce: S.optional(S.String),
|
|
2129
|
+
orderClass: S.optional(S.String),
|
|
2130
|
+
quantity: S.optional(S.Number),
|
|
2131
|
+
action: S.optional(S.String),
|
|
2132
|
+
orderId: S.optional(S.Number),
|
|
2133
|
+
}),
|
|
2134
|
+
).annotate({ identifier: "GetBracketOrderImpactRequestComponentsItem" });
|
|
2135
|
+
case 1:
|
|
2136
|
+
return S.Array(__S(112, __c14, 0));
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
function __c15(j: number): any {
|
|
2140
|
+
switch (j) {
|
|
2141
|
+
case 0:
|
|
2142
|
+
return S.suspend(() =>
|
|
2143
|
+
S.Struct({
|
|
2144
|
+
estimatedCommissions: S.optional(S.Number),
|
|
2145
|
+
buyingPowerEffect: S.optional(S.Number),
|
|
2146
|
+
buyingPowerResult: S.optional(S.Number),
|
|
2147
|
+
maintExcessEffect: S.optional(S.Number),
|
|
2148
|
+
maintExcessResult: S.optional(S.Number),
|
|
2149
|
+
side: S.optional(S.String),
|
|
2150
|
+
tradeValueCalculation: S.optional(S.String),
|
|
2151
|
+
price: S.optional(S.Number),
|
|
2152
|
+
}),
|
|
2153
|
+
).annotate({ identifier: "GetBracketOrderImpactResponse" });
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
function __c16(j: number): any {
|
|
2157
|
+
switch (j) {
|
|
2158
|
+
case 0:
|
|
2159
|
+
return S.suspend(() =>
|
|
2160
|
+
S.Struct({
|
|
2161
|
+
ids: S.optional(S.String.pipe(T.Query())),
|
|
2162
|
+
names: S.optional(S.String.pipe(T.Query())),
|
|
2163
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/symbols", code: 200 })),
|
|
2164
|
+
).annotate({ identifier: "ListSymbolsRequest" });
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
function __c17(j: number): any {
|
|
2168
|
+
switch (j) {
|
|
2169
|
+
case 0:
|
|
2170
|
+
return S.suspend(() =>
|
|
2171
|
+
S.Struct({
|
|
2172
|
+
id: S.String.pipe(T.Label()),
|
|
2173
|
+
symbolId: S.optional(S.Number),
|
|
2174
|
+
primaryRoute: S.optional(S.String),
|
|
2175
|
+
secondaryRoute: S.optional(S.String),
|
|
2176
|
+
components: S.optional(__S(113, __c14, 1)),
|
|
2177
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/accounts/{id}/orders/bracket", code: 200 })),
|
|
2178
|
+
).annotate({ identifier: "PlaceBracketOrderRequest" });
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
function __c18(j: number): any {
|
|
2182
|
+
switch (j) {
|
|
2183
|
+
case 0:
|
|
2184
|
+
return S.suspend(() =>
|
|
2185
|
+
S.Struct({
|
|
2186
|
+
orderId: S.optional(S.Number),
|
|
2187
|
+
orders: S.optional(__S(209, __c26, 1)),
|
|
2188
|
+
}),
|
|
2189
|
+
).annotate({ identifier: "PlaceBracketOrderResponse" });
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
function __c19(j: number): any {
|
|
2193
|
+
switch (j) {
|
|
2194
|
+
case 0:
|
|
2195
|
+
return S.suspend(() =>
|
|
2196
|
+
S.Struct({
|
|
2197
|
+
id: S.String.pipe(T.Label()),
|
|
2198
|
+
accountNumber: S.optional(S.String),
|
|
2199
|
+
symbolId: S.optional(S.Number),
|
|
2200
|
+
quantity: S.optional(S.Number),
|
|
2201
|
+
icebergQuantity: S.optional(S.Number),
|
|
2202
|
+
limitPrice: S.optional(S.Number),
|
|
2203
|
+
isAllOrNone: S.optional(S.Boolean),
|
|
2204
|
+
isAnonymous: S.optional(S.Boolean),
|
|
2205
|
+
orderType: S.optional(S.String),
|
|
2206
|
+
timeInForce: S.optional(S.String),
|
|
2207
|
+
action: S.optional(S.String),
|
|
2208
|
+
primaryRoute: S.optional(S.String),
|
|
2209
|
+
secondaryRoute: S.optional(S.String),
|
|
2210
|
+
orderId: S.optional(S.Number),
|
|
2211
|
+
stopPrice: S.optional(S.Number),
|
|
2212
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/accounts/{id}/orders", code: 200 })),
|
|
2213
|
+
).annotate({ identifier: "PlaceOrderRequest" });
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
function __c20(j: number): any {
|
|
2217
|
+
switch (j) {
|
|
2218
|
+
case 0:
|
|
2219
|
+
return S.suspend(() =>
|
|
2220
|
+
S.Struct({
|
|
2221
|
+
id: S.String.pipe(T.Label()),
|
|
2222
|
+
symbolId: S.optional(S.Number),
|
|
2223
|
+
quantity: S.optional(S.Number),
|
|
2224
|
+
limitPrice: S.optional(S.Number),
|
|
2225
|
+
orderType: S.optional(S.String),
|
|
2226
|
+
timeInForce: S.optional(S.String),
|
|
2227
|
+
primaryRoute: S.optional(S.String),
|
|
2228
|
+
secondaryRoute: S.optional(S.String),
|
|
2229
|
+
legs: S.optional(__S(257, __c32, 1)),
|
|
2230
|
+
strategy: S.optional(S.String),
|
|
2231
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/accounts/{id}/orders/strategy", code: 200 })),
|
|
2232
|
+
).annotate({ identifier: "PlaceStrategyOrderRequest" });
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
function __c21(j: number): any {
|
|
2236
|
+
switch (j) {
|
|
2237
|
+
case 0:
|
|
2238
|
+
return S.suspend(() =>
|
|
2239
|
+
S.Struct({
|
|
2240
|
+
prefix: S.optional(S.String.pipe(T.Query())),
|
|
2241
|
+
offset: S.optional(S.Number.pipe(T.Query())),
|
|
2242
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/symbols/search", code: 200 })),
|
|
2243
|
+
).annotate({ identifier: "SearchSymbolsRequest" });
|
|
2244
|
+
case 1:
|
|
2245
|
+
return S.suspend(() =>
|
|
2246
|
+
S.Struct({
|
|
2247
|
+
symbol: S.optional(S.String),
|
|
2248
|
+
symbolId: S.optional(S.Number),
|
|
2249
|
+
description: S.optional(S.String),
|
|
2250
|
+
securityType: S.optional(S.String),
|
|
2251
|
+
listingExchange: S.optional(S.String),
|
|
2252
|
+
isTradable: S.optional(S.Boolean),
|
|
2253
|
+
isQuotable: S.optional(S.Boolean),
|
|
2254
|
+
currency: S.optional(S.String),
|
|
2255
|
+
}),
|
|
2256
|
+
).annotate({ identifier: "SearchSymbolsResponseSymbolItem" });
|
|
2257
|
+
case 2:
|
|
2258
|
+
return S.Array(__S(169, __c21, 1));
|
|
2259
|
+
case 3:
|
|
2260
|
+
return S.suspend(() =>
|
|
2261
|
+
S.Struct({
|
|
2262
|
+
symbols: S.optional(__S(170, __c21, 2)),
|
|
2263
|
+
}),
|
|
2264
|
+
).annotate({ identifier: "SearchSymbolsResponse" });
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
function __c22(j: number): any {
|
|
2268
|
+
switch (j) {
|
|
2269
|
+
case 0:
|
|
2270
|
+
return S.suspend(() =>
|
|
2271
|
+
S.Struct({
|
|
2272
|
+
id: S.Number.pipe(T.Label()),
|
|
2273
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/symbols/{id}/options", code: 200 })),
|
|
2274
|
+
).annotate({ identifier: "GetOptionChainRequest" });
|
|
2275
|
+
case 1:
|
|
2276
|
+
return S.suspend(() =>
|
|
2277
|
+
S.Struct({
|
|
2278
|
+
strikePrice: S.optional(S.Number),
|
|
2279
|
+
callSymbolId: S.optional(S.Number),
|
|
2280
|
+
putSymbolId: S.optional(S.Number),
|
|
2281
|
+
}),
|
|
2282
|
+
).annotate({ identifier: "ChainPerStrikePrice" });
|
|
2283
|
+
case 2:
|
|
2284
|
+
return S.Array(__S(177, __c22, 1));
|
|
2285
|
+
case 3:
|
|
2286
|
+
return S.suspend(() =>
|
|
2287
|
+
S.Struct({
|
|
2288
|
+
chainPerStrikePrice: S.optional(__S(178, __c22, 2)),
|
|
2289
|
+
multiplier: S.optional(S.Number),
|
|
2290
|
+
optionRoot: S.optional(S.String),
|
|
2291
|
+
}),
|
|
2292
|
+
).annotate({ identifier: "ChainPerRoot" });
|
|
2293
|
+
case 4:
|
|
2294
|
+
return S.Array(__S(179, __c22, 3));
|
|
2295
|
+
case 5:
|
|
2296
|
+
return S.suspend(() =>
|
|
2297
|
+
S.Struct({
|
|
2298
|
+
expiryDate: S.optional(S.String),
|
|
2299
|
+
description: S.optional(S.String),
|
|
2300
|
+
listingExchange: S.optional(S.String),
|
|
2301
|
+
optionExerciseType: S.optional(S.String),
|
|
2302
|
+
chainPerRoot: S.optional(__S(180, __c22, 4)),
|
|
2303
|
+
}),
|
|
2304
|
+
).annotate({ identifier: "GetOptionChainResponseOptionsItem" });
|
|
2305
|
+
case 6:
|
|
2306
|
+
return S.Array(__S(181, __c22, 5));
|
|
2307
|
+
case 7:
|
|
2308
|
+
return S.suspend(() =>
|
|
2309
|
+
S.Struct({
|
|
2310
|
+
optionChain: S.optional(__S(182, __c22, 6)),
|
|
2311
|
+
}),
|
|
2312
|
+
).annotate({ identifier: "GetOptionChainResponse" });
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
function __c23(j: number): any {
|
|
2316
|
+
switch (j) {
|
|
2317
|
+
case 0:
|
|
2318
|
+
return S.suspend(() =>
|
|
2319
|
+
S.Struct({
|
|
2320
|
+
optionType: S.optional(S.String),
|
|
2321
|
+
underlyingId: S.optional(S.Number),
|
|
2322
|
+
expiryDate: S.optional(S.String),
|
|
2323
|
+
minstrikePrice: S.optional(S.Number),
|
|
2324
|
+
maxstrikePrice: S.optional(S.Number),
|
|
2325
|
+
}),
|
|
2326
|
+
).annotate({ identifier: "OptionIdFilter" });
|
|
2327
|
+
case 1:
|
|
2328
|
+
return S.Array(__S(184, __c23, 0));
|
|
2329
|
+
case 2:
|
|
2330
|
+
return S.Array(S.Number);
|
|
2331
|
+
case 3:
|
|
2332
|
+
return S.suspend(() =>
|
|
2333
|
+
S.Struct({
|
|
2334
|
+
filters: S.optional(__S(185, __c23, 1)),
|
|
2335
|
+
optionIds: S.optional(__S(186, __c23, 2)),
|
|
2336
|
+
ids: S.optional(__S(186, __c23, 2)),
|
|
2337
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/markets/quotes/options", code: 200 })),
|
|
2338
|
+
).annotate({ identifier: "GetOptionQuotesRequest" });
|
|
2339
|
+
case 4:
|
|
2340
|
+
return S.suspend(() =>
|
|
2341
|
+
S.Struct({
|
|
2342
|
+
underlying: S.optional(S.String),
|
|
2343
|
+
underlyingId: S.optional(S.Number),
|
|
2344
|
+
symbol: S.optional(S.String),
|
|
2345
|
+
symbolId: S.optional(S.Number),
|
|
2346
|
+
bidPrice: S.optional(S.Number),
|
|
2347
|
+
bidSize: S.optional(S.Number),
|
|
2348
|
+
askPrice: S.optional(S.Number),
|
|
2349
|
+
askSize: S.optional(S.Number),
|
|
2350
|
+
lastTradePriceTrHrs: S.optional(S.Number),
|
|
2351
|
+
lastTradePrice: S.optional(S.Number),
|
|
2352
|
+
lastTradeSize: S.optional(S.Number),
|
|
2353
|
+
lastTradeTick: S.optional(S.String),
|
|
2354
|
+
lastTradeTime: S.optional(S.String),
|
|
2355
|
+
volume: S.optional(S.Number),
|
|
2356
|
+
openPrice: S.optional(S.Number),
|
|
2357
|
+
lowPrice: S.optional(S.Number),
|
|
2358
|
+
volatility: S.optional(S.Number),
|
|
2359
|
+
delta: S.optional(S.Number),
|
|
2360
|
+
gamma: S.optional(S.Number),
|
|
2361
|
+
theta: S.optional(S.Number),
|
|
2362
|
+
vega: S.optional(S.Number),
|
|
2363
|
+
rho: S.optional(S.Number),
|
|
2364
|
+
openInterest: S.optional(S.Number),
|
|
2365
|
+
delay: S.optional(S.Number),
|
|
2366
|
+
isHalted: S.optional(S.Boolean),
|
|
2367
|
+
VWAP: S.optional(S.Number),
|
|
2368
|
+
highPrice: S.optional(S.Number),
|
|
2369
|
+
}),
|
|
2370
|
+
).annotate({ identifier: "GetOptionQuotesResponseOptionQuotesItem" });
|
|
2371
|
+
case 5:
|
|
2372
|
+
return S.Array(__S(188, __c23, 4));
|
|
2373
|
+
case 6:
|
|
2374
|
+
return S.suspend(() =>
|
|
2375
|
+
S.Struct({
|
|
2376
|
+
optionQuotes: S.optional(__S(189, __c23, 5)),
|
|
2377
|
+
}),
|
|
2378
|
+
).annotate({ identifier: "GetOptionQuotesResponse" });
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
function __c24(j: number): any {
|
|
2382
|
+
switch (j) {
|
|
2383
|
+
case 0:
|
|
2384
|
+
return S.suspend(() =>
|
|
2385
|
+
S.Struct({
|
|
2386
|
+
id: S.String.pipe(T.Label()),
|
|
2387
|
+
orderId: S.Number.pipe(T.Label()),
|
|
2388
|
+
startTime: S.optional(S.String.pipe(T.Query())),
|
|
2389
|
+
endTime: S.optional(S.String.pipe(T.Query())),
|
|
2390
|
+
stateFilter: S.optional(S.String.pipe(T.Query())),
|
|
2391
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/accounts/{id}/orders/{orderId}", code: 200 })),
|
|
2392
|
+
).annotate({ identifier: "GetOrderRequest" });
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
function __c25(j: number): any {
|
|
2396
|
+
switch (j) {
|
|
2397
|
+
case 0:
|
|
2398
|
+
return S.suspend(() =>
|
|
2399
|
+
S.Struct({
|
|
2400
|
+
orders: S.optional(__S(209, __c26, 1)),
|
|
2401
|
+
}),
|
|
2402
|
+
).annotate({ identifier: "GetOrderResponse" });
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
function __c26(j: number): any {
|
|
2406
|
+
switch (j) {
|
|
2407
|
+
case 0:
|
|
2408
|
+
return S.suspend(() =>
|
|
2409
|
+
S.Struct({
|
|
2410
|
+
id: S.optional(S.Number),
|
|
2411
|
+
symbol: S.optional(S.String),
|
|
2412
|
+
symbolId: S.optional(S.Number),
|
|
2413
|
+
totalQuantity: S.optional(S.Number),
|
|
2414
|
+
openQuantity: S.optional(S.Number),
|
|
2415
|
+
filledQuantity: S.optional(S.Number),
|
|
2416
|
+
canceledQuantity: S.optional(S.Number),
|
|
2417
|
+
side: S.optional(S.String),
|
|
2418
|
+
type: S.optional(S.String),
|
|
2419
|
+
limitPrice: S.optional(S.Number),
|
|
2420
|
+
stopPrice: S.optional(S.NullOr(S.Number)),
|
|
2421
|
+
isAllOrNone: S.optional(S.Boolean),
|
|
2422
|
+
isAnonymous: S.optional(S.Boolean),
|
|
2423
|
+
icebergQty: S.optional(S.NullOr(S.Unknown)),
|
|
2424
|
+
minQuantity: S.optional(S.NullOr(S.Number)),
|
|
2425
|
+
avgExecPrice: S.optional(S.NullOr(S.Number)),
|
|
2426
|
+
lastExecPrice: S.optional(S.NullOr(S.Number)),
|
|
2427
|
+
source: S.optional(S.String),
|
|
2428
|
+
timeInForce: S.optional(S.String),
|
|
2429
|
+
gtdDate: S.optional(S.NullOr(S.String)),
|
|
2430
|
+
state: S.optional(S.String),
|
|
2431
|
+
clientReasonStr: S.optional(S.String),
|
|
2432
|
+
chainId: S.optional(S.Number),
|
|
2433
|
+
creationTime: S.optional(S.String),
|
|
2434
|
+
updateTime: S.optional(S.String),
|
|
2435
|
+
notes: S.optional(S.String),
|
|
2436
|
+
primaryRoute: S.optional(S.String),
|
|
2437
|
+
secondaryRoute: S.optional(S.String),
|
|
2438
|
+
orderRoute: S.optional(S.String),
|
|
2439
|
+
venueHoldingOrder: S.optional(S.String),
|
|
2440
|
+
comissionCharged: S.optional(S.Number),
|
|
2441
|
+
exchangeOrderId: S.optional(S.String),
|
|
2442
|
+
isSignificantShareHolder: S.optional(S.Boolean),
|
|
2443
|
+
isInsider: S.optional(S.Boolean),
|
|
2444
|
+
isLimitOffsetInDollar: S.optional(S.Boolean),
|
|
2445
|
+
userId: S.optional(S.Number),
|
|
2446
|
+
placementCommission: S.optional(S.NullOr(S.Number)),
|
|
2447
|
+
legs: S.optional(__S(217, __c27, 1)),
|
|
2448
|
+
strategyType: S.optional(S.String),
|
|
2449
|
+
triggerStopPrice: S.optional(S.NullOr(S.Number)),
|
|
2450
|
+
orderGroupId: S.optional(S.Number),
|
|
2451
|
+
orderClass: S.optional(S.NullOr(S.String)),
|
|
2452
|
+
mainChainId: S.optional(S.Number),
|
|
2453
|
+
orderType: S.optional(S.String),
|
|
2454
|
+
icebergQuantity: S.optional(S.Number),
|
|
2455
|
+
commissionCharged: S.optional(S.Number),
|
|
2456
|
+
isSignificantShareholder: S.optional(S.Boolean),
|
|
2457
|
+
rejectionReason: S.optional(S.String),
|
|
2458
|
+
isCrossZero: S.optional(S.Boolean),
|
|
2459
|
+
}),
|
|
2460
|
+
).annotate({ identifier: "Order" });
|
|
2461
|
+
case 1:
|
|
2462
|
+
return S.Array(__S(208, __c26, 0));
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
function __c27(j: number): any {
|
|
2466
|
+
switch (j) {
|
|
2467
|
+
case 0:
|
|
2468
|
+
return S.suspend(() =>
|
|
2469
|
+
S.Struct({
|
|
2470
|
+
legId: S.optional(S.Number),
|
|
2471
|
+
symbol: S.optional(S.String),
|
|
2472
|
+
symbolId: S.optional(S.Number),
|
|
2473
|
+
legRatioQuantity: S.optional(S.Number),
|
|
2474
|
+
side: S.optional(S.String),
|
|
2475
|
+
avgExecPrice: S.optional(S.NullOr(S.Unknown)),
|
|
2476
|
+
lastExecPrice: S.optional(S.NullOr(S.Unknown)),
|
|
2477
|
+
}),
|
|
2478
|
+
).annotate({ identifier: "OrderLeg" });
|
|
2479
|
+
case 1:
|
|
2480
|
+
return S.Array(__S(216, __c27, 0));
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
function __c28(j: number): any {
|
|
2484
|
+
switch (j) {
|
|
2485
|
+
case 0:
|
|
2486
|
+
return S.suspend(() =>
|
|
2487
|
+
S.Struct({
|
|
2488
|
+
id: S.String.pipe(T.Label()),
|
|
2489
|
+
symbolId: S.optional(S.Number),
|
|
2490
|
+
quantity: S.optional(S.Number),
|
|
2491
|
+
orderType: S.optional(S.String),
|
|
2492
|
+
timeInForce: S.optional(S.String),
|
|
2493
|
+
action: S.optional(S.String),
|
|
2494
|
+
primaryRoute: S.optional(S.String),
|
|
2495
|
+
secondaryRoute: S.optional(S.String),
|
|
2496
|
+
accountNumber: S.optional(S.String),
|
|
2497
|
+
isAllOrNone: S.optional(S.Boolean),
|
|
2498
|
+
isAnonymous: S.optional(S.Boolean),
|
|
2499
|
+
isLimitOffsetInDollar: S.optional(S.Boolean),
|
|
2500
|
+
orderId: S.optional(S.Number),
|
|
2501
|
+
icebergQuantity: S.optional(S.Number),
|
|
2502
|
+
limitPrice: S.optional(S.Number),
|
|
2503
|
+
stopPrice: S.optional(S.Number),
|
|
2504
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/accounts/{id}/orders/impact", code: 200 })),
|
|
2505
|
+
).annotate({ identifier: "GetOrderImpactRequest" });
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
function __c29(j: number): any {
|
|
2509
|
+
switch (j) {
|
|
2510
|
+
case 0:
|
|
2511
|
+
return S.suspend(() =>
|
|
2512
|
+
S.Struct({
|
|
2513
|
+
id: S.Number.pipe(T.Label()),
|
|
2514
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/markets/quotes/{id}", code: 200 })),
|
|
2515
|
+
).annotate({ identifier: "GetQuoteRequest" });
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
function __c30(j: number): any {
|
|
2519
|
+
switch (j) {
|
|
2520
|
+
case 0:
|
|
2521
|
+
return S.suspend(() =>
|
|
2522
|
+
S.Struct({
|
|
2523
|
+
symbol: S.optional(S.String),
|
|
2524
|
+
symbolId: S.optional(S.Number),
|
|
2525
|
+
tier: S.optional(S.String),
|
|
2526
|
+
bidPrice: S.optional(S.Number),
|
|
2527
|
+
bidSize: S.optional(S.Number),
|
|
2528
|
+
askPrice: S.optional(S.Number),
|
|
2529
|
+
askSize: S.optional(S.Number),
|
|
2530
|
+
lastTradePriceTrHrs: S.optional(S.Number),
|
|
2531
|
+
lastTradePrice: S.optional(S.Number),
|
|
2532
|
+
lastTradeSize: S.optional(S.Number),
|
|
2533
|
+
lastTradeTick: S.optional(S.String),
|
|
2534
|
+
lastTradeTime: S.optional(S.String),
|
|
2535
|
+
volume: S.optional(S.Number),
|
|
2536
|
+
openPrice: S.optional(S.Number),
|
|
2537
|
+
highPrice: S.optional(S.Number),
|
|
2538
|
+
lowPrice: S.optional(S.Number),
|
|
2539
|
+
delay: S.optional(S.Boolean),
|
|
2540
|
+
isHalted: S.optional(S.Boolean),
|
|
2541
|
+
astTradeTrHrs: S.optional(S.Number),
|
|
2542
|
+
}),
|
|
2543
|
+
).annotate({ identifier: "Quote" });
|
|
2544
|
+
case 1:
|
|
2545
|
+
return S.Array(__S(240, __c30, 0));
|
|
2546
|
+
case 2:
|
|
2547
|
+
return S.suspend(() =>
|
|
2548
|
+
S.Struct({
|
|
2549
|
+
quotes: S.optional(__S(241, __c30, 1)),
|
|
2550
|
+
}),
|
|
2551
|
+
).annotate({ identifier: "GetQuoteResponse" });
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
function __c31(j: number): any {
|
|
2555
|
+
switch (j) {
|
|
2556
|
+
case 0:
|
|
2557
|
+
return S.suspend(() =>
|
|
2558
|
+
S.Struct({
|
|
2559
|
+
id: S.String.pipe(T.Label()),
|
|
2560
|
+
symbolId: S.optional(S.Number),
|
|
2561
|
+
quantity: S.optional(S.Number),
|
|
2562
|
+
limitPrice: S.optional(S.Number),
|
|
2563
|
+
orderType: S.optional(S.String),
|
|
2564
|
+
timeInForce: S.optional(S.String),
|
|
2565
|
+
primaryRoute: S.optional(S.String),
|
|
2566
|
+
secondaryRoute: S.optional(S.String),
|
|
2567
|
+
legs: S.optional(__S(257, __c32, 1)),
|
|
2568
|
+
strategy: S.optional(S.String),
|
|
2569
|
+
}).pipe(
|
|
2570
|
+
T.Http({ method: "POST", uri: "/v1/accounts/{id}/orders/strategy/impact", code: 200 }),
|
|
2571
|
+
),
|
|
2572
|
+
).annotate({ identifier: "GetStrategyOrderImpactRequest" });
|
|
2573
|
+
case 1:
|
|
2574
|
+
return S.suspend(() =>
|
|
2575
|
+
S.Struct({
|
|
2576
|
+
estimatedCommissions: S.optional(S.Number),
|
|
2577
|
+
buyingPowerEffect: S.optional(S.Number),
|
|
2578
|
+
buyingPowerResult: S.optional(S.Number),
|
|
2579
|
+
maintExcessEffect: S.optional(S.Number),
|
|
2580
|
+
maintExcessResult: S.optional(S.Number),
|
|
2581
|
+
tradeValueCalculation: S.optional(S.String),
|
|
2582
|
+
legs: S.optional(__S(217, __c27, 1)),
|
|
2583
|
+
side: S.optional(S.String),
|
|
2584
|
+
effect: S.optional(S.String),
|
|
2585
|
+
price: S.optional(S.Number),
|
|
2586
|
+
strategy: S.optional(S.String),
|
|
2587
|
+
}),
|
|
2588
|
+
).annotate({ identifier: "GetStrategyOrderImpactResponse" });
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
function __c32(j: number): any {
|
|
2592
|
+
switch (j) {
|
|
2593
|
+
case 0:
|
|
2594
|
+
return S.suspend(() =>
|
|
2595
|
+
S.Struct({
|
|
2596
|
+
symbolId: S.optional(S.Number),
|
|
2597
|
+
action: S.optional(S.String),
|
|
2598
|
+
legRatioQty: S.optional(S.Number),
|
|
2599
|
+
strategy: S.optional(S.String),
|
|
2600
|
+
legQuantity: S.optional(S.Number),
|
|
2601
|
+
}),
|
|
2602
|
+
).annotate({ identifier: "GetStrategyOrderImpactRequestLegsItem" });
|
|
2603
|
+
case 1:
|
|
2604
|
+
return S.Array(__S(256, __c32, 0));
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
function __c33(j: number): any {
|
|
2608
|
+
switch (j) {
|
|
2609
|
+
case 0:
|
|
2610
|
+
return S.suspend(() =>
|
|
2611
|
+
S.Struct({
|
|
2612
|
+
symbolId: S.optional(S.Number),
|
|
2613
|
+
ratio: S.optional(S.Number),
|
|
2614
|
+
action: S.optional(S.String),
|
|
2615
|
+
}),
|
|
2616
|
+
).annotate({ identifier: "GetStrategyQuotesRequestVariantsItemLegsItem" });
|
|
2617
|
+
case 1:
|
|
2618
|
+
return S.Array(__S(264, __c33, 0));
|
|
2619
|
+
case 2:
|
|
2620
|
+
return S.suspend(() =>
|
|
2621
|
+
S.Struct({
|
|
2622
|
+
variantId: S.optional(S.Number),
|
|
2623
|
+
strategy: S.optional(S.String),
|
|
2624
|
+
legs: S.optional(__S(265, __c33, 1)),
|
|
2625
|
+
}),
|
|
2626
|
+
).annotate({ identifier: "GetStrategyQuotesRequestVariantsItem" });
|
|
2627
|
+
case 3:
|
|
2628
|
+
return S.Array(__S(266, __c33, 2));
|
|
2629
|
+
case 4:
|
|
2630
|
+
return S.suspend(() =>
|
|
2631
|
+
S.Struct({
|
|
2632
|
+
variants: S.optional(__S(267, __c33, 3)),
|
|
2633
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/markets/quotes/strategies", code: 200 })),
|
|
2634
|
+
).annotate({ identifier: "GetStrategyQuotesRequest" });
|
|
2635
|
+
case 5:
|
|
2636
|
+
return S.suspend(() =>
|
|
2637
|
+
S.Struct({
|
|
2638
|
+
variantId: S.optional(S.Number),
|
|
2639
|
+
bidPrice: S.optional(S.Number),
|
|
2640
|
+
askPrice: S.optional(S.Number),
|
|
2641
|
+
underlying: S.optional(S.String),
|
|
2642
|
+
underlyingId: S.optional(S.Number),
|
|
2643
|
+
openPrice: S.optional(S.NullOr(S.Number)),
|
|
2644
|
+
volatility: S.optional(S.Number),
|
|
2645
|
+
delta: S.optional(S.Number),
|
|
2646
|
+
gamma: S.optional(S.Number),
|
|
2647
|
+
theta: S.optional(S.Number),
|
|
2648
|
+
vega: S.optional(S.Number),
|
|
2649
|
+
rho: S.optional(S.Number),
|
|
2650
|
+
isRealTime: S.optional(S.Boolean),
|
|
2651
|
+
}),
|
|
2652
|
+
).annotate({ identifier: "GetStrategyQuotesResponseStategyQuotesItem" });
|
|
2653
|
+
case 6:
|
|
2654
|
+
return S.Array(__S(269, __c33, 5));
|
|
2655
|
+
case 7:
|
|
2656
|
+
return S.suspend(() =>
|
|
2657
|
+
S.Struct({
|
|
2658
|
+
strategyQuotes: S.optional(__S(270, __c33, 6)),
|
|
2659
|
+
}),
|
|
2660
|
+
).annotate({ identifier: "GetStrategyQuotesResponse" });
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
2664
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
2665
|
+
return (__s[i] ??= __L.at(f, j));
|
|
2666
|
+
}
|