@qtsurfer/api-client 0.23.1 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -5
- package/dist/index.d.ts +460 -80
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +518 -60
- package/src/generated/sdk.gen.ts +88 -7
- package/src/generated/types.gen.ts +399 -71
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,37 @@ type ResponseError = {
|
|
|
13
13
|
* Error description
|
|
14
14
|
*/
|
|
15
15
|
message: string;
|
|
16
|
+
/**
|
|
17
|
+
* A stable token naming the cause, for a client to branch on without reading `message`.
|
|
18
|
+
* Present only on an error that has one, and each operation that can return one lists
|
|
19
|
+
* the values it uses. A client treats a value it does not know like an absent `reason`.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
reason?: string;
|
|
23
|
+
next?: ErrorNextCall;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The call that gets past an error, ready to send: a client that wants the same thing by
|
|
27
|
+
* another route makes this request. Present only on an error that has one.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
type ErrorNextCall = {
|
|
31
|
+
/**
|
|
32
|
+
* HTTP method of the call.
|
|
33
|
+
*/
|
|
34
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
35
|
+
/**
|
|
36
|
+
* Path of the call, relative to the server URL (the one that already ends in `/v1`).
|
|
37
|
+
*/
|
|
38
|
+
path: string;
|
|
39
|
+
/**
|
|
40
|
+
* JSON body of the call, when it has one. Whatever depends on the caller and cannot be
|
|
41
|
+
* known here (such as the `name` of a dataset) is left for the client to add.
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
body?: {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
};
|
|
16
47
|
};
|
|
17
48
|
/**
|
|
18
49
|
* A scalar strategy property value for one execution.
|
|
@@ -22,6 +53,12 @@ type ScalarStrategyParamValue = number | string | boolean;
|
|
|
22
53
|
* Exchange instrument identifier (e.g. a currency pair)
|
|
23
54
|
*/
|
|
24
55
|
type Instrument = string;
|
|
56
|
+
/**
|
|
57
|
+
* An exchange's instrument catalogue: centralized-exchange instruments or decentralized-exchange
|
|
58
|
+
* pools. Read `meta.venueType` to distinguish `cex` from `dex`, including when `data` is empty.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
type InstrumentCatalogueResponse = InstrumentListResponse | PoolListResponse;
|
|
25
62
|
/**
|
|
26
63
|
* HAL-style response envelope for the instruments listing
|
|
27
64
|
*/
|
|
@@ -49,6 +86,10 @@ type InstrumentListMeta = {
|
|
|
49
86
|
* The market segment served in `data`
|
|
50
87
|
*/
|
|
51
88
|
segment: "spot" | "futures";
|
|
89
|
+
/**
|
|
90
|
+
* The venue type of the exchange, as `GET /exchanges` lists it. Always `cex` here; a listing of pools says `dex`.
|
|
91
|
+
*/
|
|
92
|
+
venueType: "cex";
|
|
52
93
|
};
|
|
53
94
|
/**
|
|
54
95
|
* HAL `_links` — segment discovery for the instruments listing
|
|
@@ -67,6 +108,111 @@ type InstrumentLinks = {
|
|
|
67
108
|
*/
|
|
68
109
|
futures?: HalLink;
|
|
69
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* HAL-style response envelope for the instruments listing of a decentralized exchange, whose instruments are pools
|
|
113
|
+
*/
|
|
114
|
+
type PoolListResponse = {
|
|
115
|
+
/**
|
|
116
|
+
* The pools worth running, the most traded in the last 24 hours first
|
|
117
|
+
*/
|
|
118
|
+
data: Array<PoolDetail>;
|
|
119
|
+
meta: PoolListMeta;
|
|
120
|
+
_links: PoolLinks;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Metadata describing the pools listing of a decentralized exchange
|
|
124
|
+
*/
|
|
125
|
+
type PoolListMeta = {
|
|
126
|
+
/**
|
|
127
|
+
* When this listing was last refreshed. It is refreshed every hour, and the `lastPrice` of each pool is as of this time.
|
|
128
|
+
*/
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
/**
|
|
131
|
+
* The exchange the pools belong to
|
|
132
|
+
*/
|
|
133
|
+
exchange: string;
|
|
134
|
+
/**
|
|
135
|
+
* The protocol served in `data`, one of the exchange's `segments`
|
|
136
|
+
*/
|
|
137
|
+
segment: string;
|
|
138
|
+
/**
|
|
139
|
+
* The venue type of the exchange, as `GET /exchanges` lists it. Always `dex` here; a listing of instruments of a centralized exchange says `cex`.
|
|
140
|
+
*/
|
|
141
|
+
venueType: "dex";
|
|
142
|
+
/**
|
|
143
|
+
* A pool with less liquidity than this (in US dollars) is not listed
|
|
144
|
+
*/
|
|
145
|
+
minTvlUsd: number;
|
|
146
|
+
/**
|
|
147
|
+
* The most pools the listing has
|
|
148
|
+
*/
|
|
149
|
+
limit: number;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* HAL `_links` — protocol discovery for the pools listing of a decentralized exchange
|
|
153
|
+
*/
|
|
154
|
+
type PoolLinks = {
|
|
155
|
+
/**
|
|
156
|
+
* Link to this listing
|
|
157
|
+
*/
|
|
158
|
+
self: HalLink;
|
|
159
|
+
[key: string]: HalLink;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* A pool of a decentralized exchange that a live run can read. The listing is a place to start, not the
|
|
163
|
+
* whole market: a live run can read any pool of the protocol, listed or not.
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
type PoolDetail = {
|
|
167
|
+
/**
|
|
168
|
+
* The pool's address, in lower case. It is the value to put in `instruments` of a live run's source.
|
|
169
|
+
*/
|
|
170
|
+
id: string;
|
|
171
|
+
/**
|
|
172
|
+
* The pair written `BASE/QUOTE`, the way the signals of a run on this pool name it (`instrument`)
|
|
173
|
+
*/
|
|
174
|
+
symbol: string;
|
|
175
|
+
/**
|
|
176
|
+
* Symbol of the base token
|
|
177
|
+
*/
|
|
178
|
+
base: string;
|
|
179
|
+
/**
|
|
180
|
+
* Symbol of the quote token
|
|
181
|
+
*/
|
|
182
|
+
quote: string;
|
|
183
|
+
/**
|
|
184
|
+
* Address of the base token, in lower case
|
|
185
|
+
*/
|
|
186
|
+
baseAddress: string;
|
|
187
|
+
/**
|
|
188
|
+
* Address of the quote token, in lower case
|
|
189
|
+
*/
|
|
190
|
+
quoteAddress: string;
|
|
191
|
+
/**
|
|
192
|
+
* The pool's fee tier, in percent (`0.05` is a 0.05 % fee). A protocol can have several pools of the same pair, one per fee tier.
|
|
193
|
+
*/
|
|
194
|
+
feePercent: number;
|
|
195
|
+
/**
|
|
196
|
+
* The price of one base token in the quote token, as the signals of a run on this pool name the pair. It is as of `meta.updatedAt`, so up to one hour old. Absent when there is no price for the pool.
|
|
197
|
+
*/
|
|
198
|
+
lastPrice?: number;
|
|
199
|
+
/**
|
|
200
|
+
* What traded in the pool over the last 24 hours, in the quote token, the same meaning as `volume24h` of an instrument of a centralized exchange. Absent when the quote token has no dollar price to convert from.
|
|
201
|
+
*/
|
|
202
|
+
volume24h?: number;
|
|
203
|
+
/**
|
|
204
|
+
* The liquidity held by the pool, in US dollars
|
|
205
|
+
*/
|
|
206
|
+
tvlUsd: number;
|
|
207
|
+
/**
|
|
208
|
+
* What traded in the pool over the last 24 hours, in US dollars
|
|
209
|
+
*/
|
|
210
|
+
volume24hUsd: number;
|
|
211
|
+
/**
|
|
212
|
+
* When the pool was created. Absent when it is not known
|
|
213
|
+
*/
|
|
214
|
+
createdAt?: string;
|
|
215
|
+
};
|
|
70
216
|
/**
|
|
71
217
|
* HAL `_links` for a strategy — present on a full `StrategyState` body (`GET
|
|
72
218
|
* /strategy/{strategyId}`, and `POST /strategy/{strategyId}/validate`'s already-validated
|
|
@@ -112,6 +258,7 @@ type Account = {
|
|
|
112
258
|
* Your current subscription tier.
|
|
113
259
|
*/
|
|
114
260
|
tier: string;
|
|
261
|
+
scopes: KeyScopes;
|
|
115
262
|
/**
|
|
116
263
|
* Maximum number of strategy executions (and sweeps) you can have running at the same time
|
|
117
264
|
* through the API. Starting one past this number is answered with `429`, whose message
|
|
@@ -227,6 +374,10 @@ type InstrumentDetail = {
|
|
|
227
374
|
* Instrument identifier (e.g. currency pair)
|
|
228
375
|
*/
|
|
229
376
|
id: string;
|
|
377
|
+
/**
|
|
378
|
+
* The instrument's name, the same as `id`. A pool of a decentralized exchange has the same field (`PoolDetail`), so both listings are read alike.
|
|
379
|
+
*/
|
|
380
|
+
symbol: string;
|
|
230
381
|
/**
|
|
231
382
|
* Base currency
|
|
232
383
|
*/
|
|
@@ -235,13 +386,17 @@ type InstrumentDetail = {
|
|
|
235
386
|
* Quote currency
|
|
236
387
|
*/
|
|
237
388
|
quote: string;
|
|
389
|
+
/**
|
|
390
|
+
* Settlement currency. Present on a futures instrument only.
|
|
391
|
+
*/
|
|
392
|
+
settle?: string;
|
|
238
393
|
coverage?: InstrumentCoverage;
|
|
239
394
|
/**
|
|
240
|
-
* Last traded price
|
|
395
|
+
* Last traded price. Absent for an instrument with no recent price.
|
|
241
396
|
*/
|
|
242
397
|
lastPrice?: number;
|
|
243
398
|
/**
|
|
244
|
-
* Trading volume in the last 24 hours (in quote currency)
|
|
399
|
+
* Trading volume in the last 24 hours (in quote currency). Absent for an instrument with no recent volume.
|
|
245
400
|
*/
|
|
246
401
|
volume24h?: number;
|
|
247
402
|
};
|
|
@@ -291,6 +446,18 @@ type Exchange = {
|
|
|
291
446
|
* Description of the exchange
|
|
292
447
|
*/
|
|
293
448
|
description?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Venue category, written as the `venueType` of a live run's source: `cex` is a centralized exchange and `dex` a decentralized one. A `dex` exchange has no market data to prepare or backtest, so its id is not valid in the routes that take an `exchangeId`, except the two instruments routes, which list its pools (the instrument of a run on it is a pool's address).
|
|
451
|
+
*/
|
|
452
|
+
venueType: "cex" | "dex";
|
|
453
|
+
/**
|
|
454
|
+
* The segments the exchange offers, written as in the path of `GET /exchange/{exchangeId}/{segment}/instruments` and as the `segment` of a live run's source. For a `cex` exchange, its market segments (`spot`, `futures`: the ones its instrument catalogues are served under); for a `dex` exchange, the protocols whose pools a run can read.
|
|
455
|
+
*/
|
|
456
|
+
segments: Array<string>;
|
|
457
|
+
/**
|
|
458
|
+
* The segments among `segments` for which live data is published, so the ones a live run can read: a live run on any other segment of the exchange is refused with `400`. It can be empty (an exchange whose live data is not published yet).
|
|
459
|
+
*/
|
|
460
|
+
liveSegments: Array<string>;
|
|
294
461
|
};
|
|
295
462
|
/**
|
|
296
463
|
* Managed exchange data sources available for backtesting.
|
|
@@ -356,11 +523,10 @@ type PrepareRequest = {
|
|
|
356
523
|
* * Managed exchange, `ticker` or `funding` — one of `1s`, `5s`, `1m`, `3m`, `5m`, `15m`,
|
|
357
524
|
* `30m`, `1h`, `2h`, `4h`, `8h`, `12h`, `1d`, `1w`, `1q`; any other label returns `400`.
|
|
358
525
|
* Omitted = `1s`, the publisher's native cadence.
|
|
359
|
-
* * Managed exchange, `kline` —
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
* each.
|
|
526
|
+
* * Managed exchange, `kline` — the same labels as above, `1s` to `1q`; a label that is
|
|
527
|
+
* not a whole number of seconds returns `400`. Omitted = `1s`. This is the width of the
|
|
528
|
+
* bars a run reads: it is chosen here, once, and the same strategy can be run at
|
|
529
|
+
* several cadences by preparing the range at each.
|
|
364
530
|
* * Dataset (`exchangeId: user`) — omitted = the dataset version's own discovered
|
|
365
531
|
* `cadence` (see `DatasetVersion.cadence`), served as-is. Any cadence equal to or
|
|
366
532
|
* coarser than it and an exact multiple of it is accepted, including ones outside the
|
|
@@ -1288,9 +1454,11 @@ type Dataset = {
|
|
|
1288
1454
|
*/
|
|
1289
1455
|
name: string;
|
|
1290
1456
|
/**
|
|
1291
|
-
* `ticker` for an upload
|
|
1292
|
-
* data)
|
|
1293
|
-
* bars rather than raw ticks
|
|
1457
|
+
* `ticker` for an upload, a `dex` import with no `cadence` requested (native per-trade
|
|
1458
|
+
* data) or a `cex` import with `dataType: ticker`. `klines` for a `dex` import that
|
|
1459
|
+
* requested a candle `cadence` — pre-aggregated bars rather than raw ticks — or a `cex`
|
|
1460
|
+
* import with `dataType: klines`. Purely informational; both shapes are read the same
|
|
1461
|
+
* way.
|
|
1294
1462
|
*
|
|
1295
1463
|
*/
|
|
1296
1464
|
type: "ticker" | "klines";
|
|
@@ -1477,11 +1645,12 @@ type DatasetVersion = {
|
|
|
1477
1645
|
rows?: number;
|
|
1478
1646
|
/**
|
|
1479
1647
|
* The cadence discovered from the data's own timestamps. Either a fixed grid — `1s`,
|
|
1480
|
-
* `5s`, `15s`, `1m`, `5m`, `15m`, `30m`, `1h`, `4h`, `
|
|
1481
|
-
* intervals between consecutive rows fall on that step
|
|
1482
|
-
* `rt`: native data at the rate it was captured, each
|
|
1483
|
-
* fixed step — per-trade on-chain swaps, block-spaced
|
|
1484
|
-
* intervals. An `rt` dataset can be resampled to any
|
|
1648
|
+
* `5s`, `15s`, `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`, `1d`,
|
|
1649
|
+
* `1w` — when at least half the intervals between consecutive rows fall on that step
|
|
1650
|
+
* (small clock jitter tolerated), or `rt`: native data at the rate it was captured, each
|
|
1651
|
+
* row at its own timestamp with no fixed step — per-trade on-chain swaps, block-spaced
|
|
1652
|
+
* or sub-second ticks, irregular intervals. An `rt` dataset can be resampled to any
|
|
1653
|
+
* fixed cadence at prepare time.
|
|
1485
1654
|
*
|
|
1486
1655
|
*/
|
|
1487
1656
|
cadence?: string;
|
|
@@ -1554,7 +1723,8 @@ type DatasetUploadState = {
|
|
|
1554
1723
|
};
|
|
1555
1724
|
/**
|
|
1556
1725
|
* `POST /datasets/imports`'s request body. A common block plus one type-specific block,
|
|
1557
|
-
* selected by `type`
|
|
1726
|
+
* selected by `type`: `dex` (block `dex`) or `cex` (block `cex`), the two `venueType`s of
|
|
1727
|
+
* `GET /exchanges`.
|
|
1558
1728
|
*
|
|
1559
1729
|
*/
|
|
1560
1730
|
type DatasetImportRequest = {
|
|
@@ -1574,21 +1744,39 @@ type DatasetImportRequest = {
|
|
|
1574
1744
|
*/
|
|
1575
1745
|
to: string;
|
|
1576
1746
|
/**
|
|
1577
|
-
* Optional
|
|
1578
|
-
*
|
|
1579
|
-
*
|
|
1580
|
-
* `
|
|
1581
|
-
* resulting
|
|
1582
|
-
*
|
|
1583
|
-
* at
|
|
1747
|
+
* Optional; what it means, and what it accepts, depends on `type`. Any other value is
|
|
1748
|
+
* `400`.
|
|
1749
|
+
*
|
|
1750
|
+
* * `dex` — omitted/blank keeps native per-trade event cadence: each swap at its own
|
|
1751
|
+
* timestamp, so the resulting version's `cadence` is `rt` unless the swaps happen to
|
|
1752
|
+
* sit on a fixed grid (see `DatasetVersion.cadence`). Set to `1s`, `1m` or `5m`
|
|
1753
|
+
* instead to get pre-aggregated candles at that width rather than raw trades (the
|
|
1754
|
+
* resulting dataset's `type` becomes `klines`). Not every network supports every
|
|
1755
|
+
* cadence — an unsupported combination fails asynchronously, not at request time (see
|
|
1756
|
+
* `DatasetImportState.error`).
|
|
1757
|
+
* * `cex` — one of `1s`, `5s`, `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`,
|
|
1758
|
+
* `12h`, `1d`, `1w`, `1q`, whether `dataType` is `ticker` or `klines`. Omitted = the
|
|
1759
|
+
* finest cadence every part of the range holds.
|
|
1760
|
+
*
|
|
1761
|
+
* For `cex` the bars are built from the finest data every part of the range holds. A
|
|
1762
|
+
* `cadence` finer than that, or not an exact multiple of it, fails the import
|
|
1763
|
+
* asynchronously (`failed`; the `error` names the finest cadence the range holds) rather
|
|
1764
|
+
* than returning a dataset with a different cadence from the one asked for. So a range
|
|
1765
|
+
* whose history changes cadence part-way (from `1m` to `1s`, say) comes out entirely at
|
|
1766
|
+
* the coarser one when `cadence` is omitted: the dataset has no gap that is only a
|
|
1767
|
+
* change of cadence.
|
|
1584
1768
|
*
|
|
1585
1769
|
*/
|
|
1586
|
-
cadence?: "1s" | "1m" | "5m";
|
|
1770
|
+
cadence?: "1s" | "5s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "8h" | "12h" | "1d" | "1w" | "1q";
|
|
1587
1771
|
/**
|
|
1588
|
-
* The
|
|
1772
|
+
* The kind of venue to import from, the same two values as the `venueType` of
|
|
1773
|
+
* `GET /exchanges`: `dex` — a pool/pair's own on-chain market (block `dex`) — or `cex` —
|
|
1774
|
+
* a centralized exchange's market history (block `cex`).
|
|
1775
|
+
*
|
|
1589
1776
|
*/
|
|
1590
|
-
type: "dex";
|
|
1777
|
+
type: "dex" | "cex";
|
|
1591
1778
|
dex?: DatasetImportDexRequest;
|
|
1779
|
+
cex?: DatasetImportCexRequest;
|
|
1592
1780
|
};
|
|
1593
1781
|
/**
|
|
1594
1782
|
* The `dex` source's own fields — required when `type` is `dex`. `id`/`version` are required
|
|
@@ -1630,6 +1818,32 @@ type DatasetImportDexRequest = {
|
|
|
1630
1818
|
*/
|
|
1631
1819
|
factory?: string;
|
|
1632
1820
|
};
|
|
1821
|
+
/**
|
|
1822
|
+
* The `cex` source's own fields — required when `type` is `cex`. They name a market the way
|
|
1823
|
+
* `GET /exchanges` and the instruments routes do: `exchange` is the `id` of a centralized
|
|
1824
|
+
* exchange, `segment` one of its `segments`.
|
|
1825
|
+
*
|
|
1826
|
+
*/
|
|
1827
|
+
type DatasetImportCexRequest = {
|
|
1828
|
+
/**
|
|
1829
|
+
* The id of a centralized exchange (`venueType` `cex`) of `GET /exchanges`, lower-case.
|
|
1830
|
+
* A decentralized exchange's id is `400`: import its pools with `type: dex`.
|
|
1831
|
+
*
|
|
1832
|
+
*/
|
|
1833
|
+
exchange: string;
|
|
1834
|
+
/**
|
|
1835
|
+
* The market segment, one of the exchange's `segments`. `spot` is the only segment a
|
|
1836
|
+
* `cex` import takes today, which matches `instrument` being a plain spot pair.
|
|
1837
|
+
*
|
|
1838
|
+
*/
|
|
1839
|
+
segment: "spot";
|
|
1840
|
+
/**
|
|
1841
|
+
* What to import, and the resulting dataset's `type`: `ticker` — the exchange's ticker
|
|
1842
|
+
* series — or `klines` — its aggregated bars (open, high, low, close and volume).
|
|
1843
|
+
*
|
|
1844
|
+
*/
|
|
1845
|
+
dataType: "ticker" | "klines";
|
|
1846
|
+
};
|
|
1633
1847
|
/**
|
|
1634
1848
|
* The response to `POST /datasets/imports` — the dataset now exists, and its fetch has started.
|
|
1635
1849
|
*/
|
|
@@ -1677,7 +1891,8 @@ type DatasetImportState = {
|
|
|
1677
1891
|
/**
|
|
1678
1892
|
* A human-readable reason, present when `status` is `failed` — an unresolvable
|
|
1679
1893
|
* pool/pair, no data in the requested range, a range older than the configured source
|
|
1680
|
-
* retains,
|
|
1894
|
+
* retains, a `cex` `cadence` finer than the range holds (the message names the finest
|
|
1895
|
+
* one), the fetch exceeding your tier's time ceiling, or any of
|
|
1681
1896
|
* `DatasetUploadState.error`'s own ingest-side reasons once fetching hands off to it.
|
|
1682
1897
|
* Durably recorded, same as on the upload path.
|
|
1683
1898
|
*
|
|
@@ -1688,6 +1903,18 @@ type DatasetImportState = {
|
|
|
1688
1903
|
*/
|
|
1689
1904
|
version?: DatasetVersion;
|
|
1690
1905
|
};
|
|
1906
|
+
/**
|
|
1907
|
+
* What your API key may do, as a map from a resource to the actions allowed on it. Names are
|
|
1908
|
+
* lower case: `{ "backtests": ["read", "write", "execute"], "exchanges": ["read"] }`. A scope
|
|
1909
|
+
* is a resource and an action: a resource is listed only with at least one action, and a key
|
|
1910
|
+
* with no scope is `{}`. `GET /account` and `POST /auth/token` return the same map for the
|
|
1911
|
+
* same key. The API reports the scopes of a key; it does not yet refuse an operation because
|
|
1912
|
+
* a scope is missing.
|
|
1913
|
+
*
|
|
1914
|
+
*/
|
|
1915
|
+
type KeyScopes = {
|
|
1916
|
+
[key: string]: Array<string>;
|
|
1917
|
+
};
|
|
1691
1918
|
type AuthTokenResponse = {
|
|
1692
1919
|
/**
|
|
1693
1920
|
* Short-lived HS256 JWT. Send as `Authorization: Bearer <token>` on all other endpoints.
|
|
@@ -1701,23 +1928,20 @@ type AuthTokenResponse = {
|
|
|
1701
1928
|
* Seconds until the JWT expires (typically 3600).
|
|
1702
1929
|
*/
|
|
1703
1930
|
expires_in: number;
|
|
1704
|
-
|
|
1705
|
-
* Scopes granted to this token. Reserved for future use; currently always empty.
|
|
1706
|
-
*/
|
|
1707
|
-
scopes?: Array<string>;
|
|
1931
|
+
scopes?: KeyScopes;
|
|
1708
1932
|
/**
|
|
1709
1933
|
* Subscription tier this token was issued for. Drives rate limits and feature flags on downstream endpoints.
|
|
1710
1934
|
*/
|
|
1711
1935
|
tier: "free" | "basic" | "pro" | "elite";
|
|
1712
1936
|
};
|
|
1713
1937
|
/**
|
|
1714
|
-
* Error envelope returned by `POST /auth/token` when the API key is rejected.
|
|
1938
|
+
* Error envelope returned by `POST /auth/token` when the API key is rejected (`401`) or carries no scopes where scopes are required (`403`).
|
|
1715
1939
|
*/
|
|
1716
1940
|
type AuthTokenError = {
|
|
1717
1941
|
/**
|
|
1718
1942
|
* Machine-readable error reason.
|
|
1719
1943
|
*/
|
|
1720
|
-
code: "invalid_apikey" | "apikey_revoked" | "apikey_expired";
|
|
1944
|
+
code: "invalid_apikey" | "apikey_revoked" | "apikey_expired" | "apikey_without_scopes";
|
|
1721
1945
|
/**
|
|
1722
1946
|
* Human-readable description of the failure.
|
|
1723
1947
|
*/
|
|
@@ -1728,17 +1952,23 @@ type AuthTokenError = {
|
|
|
1728
1952
|
*/
|
|
1729
1953
|
type LiveSource = {
|
|
1730
1954
|
/**
|
|
1731
|
-
* Venue category. `
|
|
1955
|
+
* Venue category. `cex` is a centralized exchange and `dex` is one pool on a decentralized exchange, which takes its own `exchange`, `segment`, `type` and `instruments` (see "Sources" in the Live execution guide). `cx` and `dx`, the spellings used before, are still read as `cex` and `dex`; the run always reports the new ones.
|
|
1956
|
+
*/
|
|
1957
|
+
venueType: "cex" | "dex";
|
|
1958
|
+
/**
|
|
1959
|
+
* The exchange id, as `GET /exchanges` lists it. For a `dex` source, the chain the pool is on; `robinhood` is the only one today.
|
|
1732
1960
|
*/
|
|
1733
|
-
venueType: string;
|
|
1734
1961
|
exchange: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* The segment, as `GET /exchanges` lists it for that exchange, among its `liveSegments` (a segment with no live data is refused with `400`). For a `cex` source, the market segment (`spot` today); for a `dex` source, the protocol of the pool, `uniswap-v3` the only one today.
|
|
1964
|
+
*/
|
|
1735
1965
|
segment: string;
|
|
1736
1966
|
/**
|
|
1737
|
-
* Both `ticker` and `kline` connect to the lightest (fastest) cadence available for the exchange — today, 1 tick/second on every supported exchange. Choosing a specific cadence is not offered yet.
|
|
1967
|
+
* Both `ticker` and `kline` connect to the lightest (fastest) cadence available for the exchange — today, 1 tick/second on every supported exchange. Choosing a specific cadence is not offered yet. A `dex` source supports only `kline`: one candle per second of the pool's trades.
|
|
1738
1968
|
*/
|
|
1739
1969
|
type: "ticker" | "kline";
|
|
1740
1970
|
/**
|
|
1741
|
-
* The instruments the run reads. For a run started with a list, that list as sent; for one started without `instruments`, or with `["*"]`, what the start resolved: the list of pairs the compilation of the strategy records as the instruments it accepts, when it records one, or `["*"]` for every instrument the exchange/segment offers (tier-gated). An entry is written `BASE/QUOTE` and either side can be `*` to mean any, such as any base paired with USDT. Symbols are not case-sensitive and spaces around them are ignored, so `btc/usdt` and `BTC/USDT` are the same instrument.
|
|
1971
|
+
* The instruments the run reads. For a run started with a list, that list as sent; for one started without `instruments`, or with `["*"]`, what the start resolved: the list of pairs the compilation of the strategy records as the instruments it accepts, when it records one, or `["*"]` for every instrument the exchange/segment offers (tier-gated). An entry is written `BASE/QUOTE` and either side can be `*` to mean any, such as any base paired with USDT. Symbols are not case-sensitive and spaces around them are ignored, so `btc/usdt` and `BTC/USDT` are the same instrument. A `dex` source holds exactly one entry, the address of its pool.
|
|
1742
1972
|
*/
|
|
1743
1973
|
instruments: Array<string>;
|
|
1744
1974
|
};
|
|
@@ -1747,17 +1977,23 @@ type LiveSource = {
|
|
|
1747
1977
|
*/
|
|
1748
1978
|
type LiveSourceRequest = {
|
|
1749
1979
|
/**
|
|
1750
|
-
* Venue category. `
|
|
1980
|
+
* Venue category. `cex` is a centralized exchange and `dex` is one pool on a decentralized exchange, which takes its own `exchange`, `segment`, `type` and `instruments` (see "Sources" in the Live execution guide). `cx` and `dx`, the spellings used before, are still read as `cex` and `dex`; the run always reports the new ones.
|
|
1981
|
+
*/
|
|
1982
|
+
venueType: "cex" | "dex";
|
|
1983
|
+
/**
|
|
1984
|
+
* The exchange id, as `GET /exchanges` lists it. For a `dex` source, the chain the pool is on; `robinhood` is the only one today.
|
|
1751
1985
|
*/
|
|
1752
|
-
venueType: string;
|
|
1753
1986
|
exchange: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* The segment, as `GET /exchanges` lists it for that exchange, among its `liveSegments` (a segment with no live data is refused with `400`). For a `cex` source, the market segment (`spot` today); for a `dex` source, the protocol of the pool, `uniswap-v3` the only one today.
|
|
1989
|
+
*/
|
|
1754
1990
|
segment: string;
|
|
1755
1991
|
/**
|
|
1756
|
-
* Both `ticker` and `kline` connect to the lightest (fastest) cadence available for the exchange — today, 1 tick/second on every supported exchange. Choosing a specific cadence is not offered yet.
|
|
1992
|
+
* Both `ticker` and `kline` connect to the lightest (fastest) cadence available for the exchange — today, 1 tick/second on every supported exchange. Choosing a specific cadence is not offered yet. A `dex` source supports only `kline`: one candle per second of the pool's trades.
|
|
1757
1993
|
*/
|
|
1758
1994
|
type: "ticker" | "kline";
|
|
1759
1995
|
/**
|
|
1760
|
-
* Which instruments the run reads. A QTScript strategy can declare which instruments it accepts with an `instruments` line in its source. When the compilation of the strategy records that selection as a list of pairs, leaving `instruments` out, or sending `["*"]`, takes that list; otherwise the run reads every instrument the exchange/segment offers. A list of instruments is taken as sent, and `[]` and `null` are refused with `400`. An entry is written `BASE/QUOTE`; either side can be `*` to mean any: any base can be paired with USDT, and BTC can be paired with any quote. Entries are not case-sensitive and spaces around them are ignored, so `btc/usdt` and `BTC/USDT` are the same instrument. An entry that is not of that form (no `/`, an empty side, a `.` or a space inside a side, or a `*` mixed with other characters of a side) makes the run fail when it starts. Plan limits: a list with an entry that has a `*` on a side counts like `["*"]` and only plans that include the wildcard accept it; the other entries are counted one by one. The instruments the run actually reads come back in the run's `sources`.
|
|
1996
|
+
* Which instruments the run reads. A QTScript strategy can declare which instruments it accepts with an `instruments` line in its source. When the compilation of the strategy records that selection as a list of pairs, leaving `instruments` out, or sending `["*"]`, takes that list; otherwise the run reads every instrument the exchange/segment offers. A list of instruments is taken as sent, and `[]` and `null` are refused with `400`. An entry is written `BASE/QUOTE`; either side can be `*` to mean any: any base can be paired with USDT, and BTC can be paired with any quote. Entries are not case-sensitive and spaces around them are ignored, so `btc/usdt` and `BTC/USDT` are the same instrument. An entry that is not of that form (no `/`, an empty side, a `.` or a space inside a side, or a `*` mixed with other characters of a side) makes the run fail when it starts. Plan limits: a list with an entry that has a `*` on a side counts like `["*"]` and only plans that include the wildcard accept it; the other entries are counted one by one. The instruments the run actually reads come back in the run's `sources`. A `dex` source needs exactly one entry, the address of its pool (`0x` and 40 hexadecimal digits, not case-sensitive): it cannot be left out and `*` is not accepted.
|
|
1761
1997
|
*/
|
|
1762
1998
|
instruments?: Array<string>;
|
|
1763
1999
|
};
|
|
@@ -1770,13 +2006,22 @@ type StartLiveRequest = {
|
|
|
1770
2006
|
[key: string]: unknown;
|
|
1771
2007
|
};
|
|
1772
2008
|
/**
|
|
1773
|
-
* A `public` run appears in `GET /live/public` and its signal channel accepts subscriptions from anyone, not only you — from the moment it is
|
|
2009
|
+
* A `public` run appears in `GET /live/public` and its signal channel accepts subscriptions from anyone, not only you — from the moment it is in the `live` stage, which is when it is promoted or, for a run that starts there, at once. While it is a `sandbox` trial, `public` is only what you asked for, and only you can read it.
|
|
1774
2010
|
*/
|
|
1775
2011
|
visibility?: "private" | "public";
|
|
1776
2012
|
/**
|
|
1777
2013
|
* Request that this run's signals be relayed over its WebSocket channel, from its first signal — in the `sandbox` stage too, where only you can subscribe to it. See the "Live execution" guide.
|
|
1778
2014
|
*/
|
|
1779
2015
|
relay?: boolean;
|
|
2016
|
+
/**
|
|
2017
|
+
* Start in the `sandbox` stage even though an earlier run of yours already took this compiled strategy
|
|
2018
|
+
* through it. Without it, such a strategy starts in `LIVE` at once; with `true` it starts in `SANDBOX` like
|
|
2019
|
+
* a first run, which is how to read its signals back over the connection (`history`, kept for the
|
|
2020
|
+
* `sandbox` stage only) while you debug it. For a strategy that has not been through the sandbox it
|
|
2021
|
+
* changes nothing: it always starts there. Anything other than `true` or `false` is `400`.
|
|
2022
|
+
*
|
|
2023
|
+
*/
|
|
2024
|
+
sandbox?: boolean;
|
|
1780
2025
|
/**
|
|
1781
2026
|
* Ask for a **stream URL**: a secret address that a simple client, or a service that passes your signals
|
|
1782
2027
|
* on to others, can open as a plain WebSocket to receive this run's signals as they are produced, one JSON
|
|
@@ -1883,7 +2128,7 @@ type LiveRun = {
|
|
|
1883
2128
|
description?: string;
|
|
1884
2129
|
visibility: "private" | "public";
|
|
1885
2130
|
/**
|
|
1886
|
-
* A new run
|
|
2131
|
+
* A new run starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability. A run that passes moves to `LIVE` automatically when the 24 hours are up. A run of a strategy that an earlier run of yours already took through the trial starts `LIVE`, unless you started it with `sandbox: true`.
|
|
1887
2132
|
*/
|
|
1888
2133
|
stage: "SANDBOX" | "LIVE";
|
|
1889
2134
|
/**
|
|
@@ -1899,12 +2144,15 @@ type LiveRun = {
|
|
|
1899
2144
|
* stack trace or an internal message. Either `resource: ...` (the platform stopped the run for
|
|
1900
2145
|
* exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for
|
|
1901
2146
|
* a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's
|
|
1902
|
-
* definition was refused, the run
|
|
1903
|
-
*
|
|
2147
|
+
* definition was refused, the pool address of a `dex` run is not a pool of its protocol on its chain,
|
|
2148
|
+
* the platform has no room to follow the pool of a `dex` run, the run could not start after several
|
|
2149
|
+
* attempts, the strategy failed while processing data, the run lost its data feed, or the generic
|
|
2150
|
+
* `The run failed.`. The set may grow:
|
|
1904
2151
|
* read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays
|
|
1905
2152
|
* `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your
|
|
1906
|
-
* live-run limit) until then; one that
|
|
1907
|
-
* type
|
|
2153
|
+
* live-run limit) until then; one that cannot run, and will not by waiting, because its strategy cannot
|
|
2154
|
+
* consume its source type or because the pool of a `dex` run is not a pool or has no room to be followed,
|
|
2155
|
+
* is stopped by the platform itself (`desired: STOPPED`), so it holds no place.
|
|
1908
2156
|
*
|
|
1909
2157
|
*/
|
|
1910
2158
|
reason?: string;
|
|
@@ -1925,7 +2173,7 @@ type LiveRun = {
|
|
|
1925
2173
|
*/
|
|
1926
2174
|
startedAtMs: number;
|
|
1927
2175
|
/**
|
|
1928
|
-
* The sandbox trial's promotion verdict. Absent for the whole 24-hour trial and present once it ends, so an absent `gate` means the trial has not finished. `passed` is the verdict; the rest is diagnostic detail whose shape is not yet stabilized as public API: treat it as opaque.
|
|
2176
|
+
* The sandbox trial's promotion verdict. Absent for the whole 24-hour trial and present once it ends, so an absent `gate` means the trial has not finished. A run that started in `LIVE` without a trial has it from the start: the verdict of the earlier run it relies on, with `inheritedFrom` naming that run. `passed` is the verdict; the rest is diagnostic detail whose shape is not yet stabilized as public API: treat it as opaque.
|
|
1929
2177
|
*/
|
|
1930
2178
|
gate?: {
|
|
1931
2179
|
[key: string]: unknown;
|
|
@@ -2057,7 +2305,7 @@ type LiveRunSummary = {
|
|
|
2057
2305
|
description?: string;
|
|
2058
2306
|
visibility: "private" | "public";
|
|
2059
2307
|
/**
|
|
2060
|
-
* A new run
|
|
2308
|
+
* A new run starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability. A run that passes moves to `LIVE` automatically when the 24 hours are up. A run of a strategy that an earlier run of yours already took through the trial starts `LIVE`, unless you started it with `sandbox: true`.
|
|
2061
2309
|
*/
|
|
2062
2310
|
stage: "SANDBOX" | "LIVE";
|
|
2063
2311
|
/**
|
|
@@ -2073,12 +2321,15 @@ type LiveRunSummary = {
|
|
|
2073
2321
|
* stack trace or an internal message. Either `resource: ...` (the platform stopped the run for
|
|
2074
2322
|
* exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for
|
|
2075
2323
|
* a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's
|
|
2076
|
-
* definition was refused, the run
|
|
2077
|
-
*
|
|
2324
|
+
* definition was refused, the pool address of a `dex` run is not a pool of its protocol on its chain,
|
|
2325
|
+
* the platform has no room to follow the pool of a `dex` run, the run could not start after several
|
|
2326
|
+
* attempts, the strategy failed while processing data, the run lost its data feed, or the generic
|
|
2327
|
+
* `The run failed.`. The set may grow:
|
|
2078
2328
|
* read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays
|
|
2079
2329
|
* `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your
|
|
2080
|
-
* live-run limit) until then; one that
|
|
2081
|
-
* type
|
|
2330
|
+
* live-run limit) until then; one that cannot run, and will not by waiting, because its strategy cannot
|
|
2331
|
+
* consume its source type or because the pool of a `dex` run is not a pool or has no room to be followed,
|
|
2332
|
+
* is stopped by the platform itself (`desired: STOPPED`), so it holds no place.
|
|
2082
2333
|
*
|
|
2083
2334
|
*/
|
|
2084
2335
|
reason?: string;
|
|
@@ -2343,6 +2594,10 @@ type AuthenticateErrors = {
|
|
|
2343
2594
|
* API key is invalid, revoked, or expired.
|
|
2344
2595
|
*/
|
|
2345
2596
|
401: AuthTokenError;
|
|
2597
|
+
/**
|
|
2598
|
+
* The API key is valid but carries no scopes, and this deployment requires them.
|
|
2599
|
+
*/
|
|
2600
|
+
403: AuthTokenError;
|
|
2346
2601
|
/**
|
|
2347
2602
|
* Rate limit exceeded for this API key.
|
|
2348
2603
|
*/
|
|
@@ -2408,16 +2663,20 @@ type ListInstrumentsData = {
|
|
|
2408
2663
|
};
|
|
2409
2664
|
type ListInstrumentsErrors = {
|
|
2410
2665
|
/**
|
|
2411
|
-
*
|
|
2666
|
+
* The exchange is not one `GET /exchanges` lists
|
|
2667
|
+
*/
|
|
2668
|
+
400: ResponseError;
|
|
2669
|
+
/**
|
|
2670
|
+
* The instrument catalog is not available
|
|
2412
2671
|
*/
|
|
2413
2672
|
404: ResponseError;
|
|
2414
2673
|
};
|
|
2415
2674
|
type ListInstrumentsError = ListInstrumentsErrors[keyof ListInstrumentsErrors];
|
|
2416
2675
|
type ListInstrumentsResponses = {
|
|
2417
2676
|
/**
|
|
2418
|
-
* The default (spot) segment's instruments in `data`, `meta`, and HAL `_links` (self + spot/futures segment discovery)
|
|
2677
|
+
* The default (spot) segment's instruments in `data`, `meta`, and HAL `_links` (self + spot/futures segment discovery); for a decentralized exchange, its pools
|
|
2419
2678
|
*/
|
|
2420
|
-
200:
|
|
2679
|
+
200: InstrumentCatalogueResponse;
|
|
2421
2680
|
};
|
|
2422
2681
|
type ListInstrumentsResponse = ListInstrumentsResponses[keyof ListInstrumentsResponses];
|
|
2423
2682
|
type ListSegmentInstrumentsData = {
|
|
@@ -2428,16 +2687,20 @@ type ListSegmentInstrumentsData = {
|
|
|
2428
2687
|
*/
|
|
2429
2688
|
exchangeId: string;
|
|
2430
2689
|
/**
|
|
2431
|
-
*
|
|
2690
|
+
* The segment to list instruments for, one of the exchange's `segments` in `GET /exchanges`; `spot` or `futures` for a centralized exchange, a protocol (`uniswap-v3`) for a decentralized one
|
|
2432
2691
|
*/
|
|
2433
|
-
segment:
|
|
2692
|
+
segment: string;
|
|
2434
2693
|
};
|
|
2435
2694
|
query?: never;
|
|
2436
2695
|
url: "/exchange/{exchangeId}/{segment}/instruments";
|
|
2437
2696
|
};
|
|
2438
2697
|
type ListSegmentInstrumentsErrors = {
|
|
2439
2698
|
/**
|
|
2440
|
-
*
|
|
2699
|
+
* The exchange is not one `GET /exchanges` lists, or the segment is not one the exchange has (`spot` or `futures` for a centralized exchange, a protocol for a decentralized one)
|
|
2700
|
+
*/
|
|
2701
|
+
400: ResponseError;
|
|
2702
|
+
/**
|
|
2703
|
+
* The instrument catalog is not available
|
|
2441
2704
|
*/
|
|
2442
2705
|
404: ResponseError;
|
|
2443
2706
|
};
|
|
@@ -2446,7 +2709,7 @@ type ListSegmentInstrumentsResponses = {
|
|
|
2446
2709
|
/**
|
|
2447
2710
|
* An object with a `data` array of instrument details (each with per-data-type coverage) and a `meta` block
|
|
2448
2711
|
*/
|
|
2449
|
-
200:
|
|
2712
|
+
200: InstrumentCatalogueResponse;
|
|
2450
2713
|
};
|
|
2451
2714
|
type ListSegmentInstrumentsResponse = ListSegmentInstrumentsResponses[keyof ListSegmentInstrumentsResponses];
|
|
2452
2715
|
type DownloadTickersData = {
|
|
@@ -2484,25 +2747,38 @@ type DownloadTickersData = {
|
|
|
2484
2747
|
};
|
|
2485
2748
|
type DownloadTickersErrors = {
|
|
2486
2749
|
/**
|
|
2487
|
-
* Missing or malformed parameters (e.g. `hour` not `YYYY-MM-DDTHH`)
|
|
2750
|
+
* Missing or malformed parameters (e.g. `hour` not `YYYY-MM-DDTHH`), an `hour` in the
|
|
2751
|
+
* future, or an hour older than the last 7 days (`reason: OUTSIDE_WINDOW`, with `next`).
|
|
2752
|
+
*
|
|
2488
2753
|
*/
|
|
2489
2754
|
400: ResponseError;
|
|
2490
2755
|
/**
|
|
2491
|
-
* No
|
|
2756
|
+
* No segment for the requested instrument/hour. `reason: NOT_YET_AVAILABLE` — the hour
|
|
2757
|
+
* is not stored yet and no provisional answer was given for it (the answer carries
|
|
2758
|
+
* `Retry-After`); `reason: NO_DATA` — the hour is stored and holds nothing for this
|
|
2759
|
+
* instrument.
|
|
2760
|
+
*
|
|
2492
2761
|
*/
|
|
2493
2762
|
404: ResponseError;
|
|
2494
2763
|
/**
|
|
2495
2764
|
* Unexpected I/O error serving the file.
|
|
2496
2765
|
*/
|
|
2497
2766
|
500: ResponseError;
|
|
2767
|
+
/**
|
|
2768
|
+
* Reads are being limited (of stored or of provisional data) and this one was not served
|
|
2769
|
+
* (`reason: TEMPORARILY_UNAVAILABLE`). Ask again after the `Retry-After` delay.
|
|
2770
|
+
*
|
|
2771
|
+
*/
|
|
2772
|
+
503: ResponseError;
|
|
2498
2773
|
};
|
|
2499
2774
|
type DownloadTickersError = DownloadTickersErrors[keyof DownloadTickersErrors];
|
|
2500
2775
|
type DownloadTickersResponses = {
|
|
2501
2776
|
/**
|
|
2502
2777
|
* One hour of tickers for the instrument. `Content-Type` is
|
|
2503
|
-
* `application/vnd.lastra` by default or
|
|
2778
|
+
* `application/vnd.qtsurfer.lastra` by default or
|
|
2504
2779
|
* `application/vnd.apache.parquet` when `format=parquet` was
|
|
2505
|
-
* requested.
|
|
2780
|
+
* requested. The hour in progress, or one that has ended and is not stored yet, may be
|
|
2781
|
+
* provisional where the service gives provisional answers: see `X-Data-Status`.
|
|
2506
2782
|
*
|
|
2507
2783
|
*/
|
|
2508
2784
|
200: Blob | File;
|
|
@@ -2542,24 +2818,38 @@ type DownloadKlinesData = {
|
|
|
2542
2818
|
};
|
|
2543
2819
|
type DownloadKlinesErrors = {
|
|
2544
2820
|
/**
|
|
2545
|
-
* Missing or malformed parameters (e.g. `hour` not `YYYY-MM-DDTHH`)
|
|
2821
|
+
* Missing or malformed parameters (e.g. `hour` not `YYYY-MM-DDTHH`), an `hour` in the
|
|
2822
|
+
* future, or an hour older than the last 7 days (`reason: OUTSIDE_WINDOW`, with `next`).
|
|
2823
|
+
*
|
|
2546
2824
|
*/
|
|
2547
2825
|
400: ResponseError;
|
|
2548
2826
|
/**
|
|
2549
|
-
* No
|
|
2827
|
+
* No segment for the requested instrument/hour. `reason: NOT_YET_AVAILABLE` — the hour
|
|
2828
|
+
* is not stored yet and no provisional answer was given for it (the answer carries
|
|
2829
|
+
* `Retry-After`); `reason: NO_DATA` — the hour is stored and holds nothing for this
|
|
2830
|
+
* instrument.
|
|
2831
|
+
*
|
|
2550
2832
|
*/
|
|
2551
2833
|
404: ResponseError;
|
|
2552
2834
|
/**
|
|
2553
2835
|
* Unexpected I/O error serving the file.
|
|
2554
2836
|
*/
|
|
2555
2837
|
500: ResponseError;
|
|
2838
|
+
/**
|
|
2839
|
+
* Reads are being limited (of stored or of provisional data) and this one was not served
|
|
2840
|
+
* (`reason: TEMPORARILY_UNAVAILABLE`). Ask again after the `Retry-After` delay.
|
|
2841
|
+
*
|
|
2842
|
+
*/
|
|
2843
|
+
503: ResponseError;
|
|
2556
2844
|
};
|
|
2557
2845
|
type DownloadKlinesError = DownloadKlinesErrors[keyof DownloadKlinesErrors];
|
|
2558
2846
|
type DownloadKlinesResponses = {
|
|
2559
2847
|
/**
|
|
2560
2848
|
* One hour of klines for the instrument. `Content-Type` is
|
|
2561
|
-
* `application/vnd.lastra` by default or
|
|
2562
|
-
* `application/vnd.apache.parquet` when `format=parquet
|
|
2849
|
+
* `application/vnd.qtsurfer.lastra` by default or
|
|
2850
|
+
* `application/vnd.apache.parquet` when `format=parquet` was
|
|
2851
|
+
* requested. The hour in progress, or one that has ended and is not stored yet, may be
|
|
2852
|
+
* provisional where the service gives provisional answers: see `X-Data-Status`.
|
|
2563
2853
|
*
|
|
2564
2854
|
*/
|
|
2565
2855
|
200: Blob | File;
|
|
@@ -3439,6 +3729,15 @@ type ImportDatasetErrors = {
|
|
|
3439
3729
|
* `cadence`, whether that combination is actually servable on the requested `network` —
|
|
3440
3730
|
* is checked later, asynchronously — see the `failed` status on the poll endpoint below.
|
|
3441
3731
|
*
|
|
3732
|
+
* For `type: cex`: no `cex` block, or its `exchange` is not a centralized exchange of
|
|
3733
|
+
* `GET /exchanges` (a decentralized one is `400` too — use `type: dex`), `segment` is not
|
|
3734
|
+
* `spot` (the only segment a `cex` import takes today), `dataType` is not `ticker` or
|
|
3735
|
+
* `klines`, or
|
|
3736
|
+
* `cadence` is not one of the values a `cex` import takes (see `DatasetImportRequest`).
|
|
3737
|
+
* Whether the range holds data, and whether it holds data fine enough for the `cadence`
|
|
3738
|
+
* asked, is checked later, asynchronously — see the `failed` status on the poll endpoint
|
|
3739
|
+
* below.
|
|
3740
|
+
*
|
|
3442
3741
|
*/
|
|
3443
3742
|
400: ResponseError;
|
|
3444
3743
|
/**
|
|
@@ -3554,7 +3853,7 @@ type StartLiveData = {
|
|
|
3554
3853
|
};
|
|
3555
3854
|
type StartLiveErrors = {
|
|
3556
3855
|
/**
|
|
3557
|
-
* Malformed `sources` (not exactly one entry, missing field, unsupported `type`), a `type` the strategy cannot consume (a ticker strategy with a `kline` source, or the reverse; the message names both), an invalid `visibility`, an invalid `paper` block (an unknown field, a wrong type or an out-of-range value), or no `paper` block for a strategy that listens to its own execution events. A `relay` or `stream` that is not `true` or `false`, or a `stream` where streams are not available yet. A `warmFrom` that is not an integer from 0 to 3600. An `instruments` that is empty or `null`.
|
|
3856
|
+
* Malformed `sources` (not exactly one entry, missing field, unsupported `type`), a `venueType`, `exchange` and `segment` that `GET /exchanges` does not list together, or a segment with no live data (the message names what it lists), a `type` the strategy cannot consume (a ticker strategy with a `kline` source, or the reverse; the message names both), an invalid `visibility`, an invalid `paper` block (an unknown field, a wrong type or an out-of-range value), or no `paper` block for a strategy that listens to its own execution events. A `relay` or `stream` that is not `true` or `false`, or a `stream` where streams are not available yet. A `warmFrom` that is not an integer from 0 to 3600. An `instruments` that is empty or `null`.
|
|
3558
3857
|
*/
|
|
3559
3858
|
400: ResponseError;
|
|
3560
3859
|
/**
|
|
@@ -3577,7 +3876,7 @@ type StartLiveErrors = {
|
|
|
3577
3876
|
type StartLiveError = StartLiveErrors[keyof StartLiveErrors];
|
|
3578
3877
|
type StartLiveResponses = {
|
|
3579
3878
|
/**
|
|
3580
|
-
* Started — the run's own state, in the sandbox stage, with its `streamUrl` when you asked for a stream
|
|
3879
|
+
* Started — the run's own state, in the sandbox stage (in the live stage for a strategy that has already been through the sandbox), with its `streamUrl` when you asked for a stream
|
|
3581
3880
|
*/
|
|
3582
3881
|
201: LiveRunWithStream;
|
|
3583
3882
|
};
|
|
@@ -3986,6 +4285,10 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
3986
4285
|
* expires after `expires_in` seconds. Callers should refresh the token
|
|
3987
4286
|
* before expiry (or on a `401` response) by calling this endpoint again.
|
|
3988
4287
|
*
|
|
4288
|
+
* The answer's `scopes` say what the key may do. Where a deployment requires scopes, a key
|
|
4289
|
+
* that carries none is refused with `403` and the code `apikey_without_scopes`: create a key
|
|
4290
|
+
* with at least one scope.
|
|
4291
|
+
*
|
|
3989
4292
|
*/
|
|
3990
4293
|
declare const authenticate: <ThrowOnError extends boolean = false>(options?: Options<AuthenticateData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AuthTokenResponse, unknown, ThrowOnError>;
|
|
3991
4294
|
/**
|
|
@@ -4008,6 +4311,18 @@ declare const getAccount: <ThrowOnError extends boolean = false>(options?: Optio
|
|
|
4008
4311
|
declare const getAccountUsage: <ThrowOnError extends boolean = false>(options?: Options<GetAccountUsageData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<AccountUsage, unknown, ThrowOnError>;
|
|
4009
4312
|
/**
|
|
4010
4313
|
* List the available exchanges
|
|
4314
|
+
* The exchanges the platform knows, centralized and decentralized, each with its `venueType` and the
|
|
4315
|
+
* `segments` it offers. Ids, venue types and segments are lower-case, and are written the same way
|
|
4316
|
+
* wherever the API takes them: `/exchange/binance/spot/instruments`, and the `exchange`, `venueType`
|
|
4317
|
+
* and `segment` of a live run's source.
|
|
4318
|
+
*
|
|
4319
|
+
* `venueType` is `cex` for a centralized exchange and `dex` for a decentralized one. The `segments` of a
|
|
4320
|
+
* `cex` exchange are the market segments its instrument catalogues are served under (`spot`, `futures`);
|
|
4321
|
+
* its `liveSegments`, among them, are those a live run can read, because live data is published for them.
|
|
4322
|
+
* A `dex` exchange has no market data to prepare or backtest, so its id is `400` in the routes that take an
|
|
4323
|
+
* `exchangeId`, except the two instruments routes: its `segments` are the protocols whose pools a run can
|
|
4324
|
+
* read, and those routes list the pools, since the instrument of a run on it is a pool's address.
|
|
4325
|
+
*
|
|
4011
4326
|
*/
|
|
4012
4327
|
declare const listExchanges: <ThrowOnError extends boolean = false>(options?: Options<ListExchangesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Exchange[], unknown, ThrowOnError>;
|
|
4013
4328
|
/**
|
|
@@ -4017,8 +4332,12 @@ declare const listExchanges: <ThrowOnError extends boolean = false>(options?: Op
|
|
|
4017
4332
|
* confirms the served `segment` (`spot`); HAL `_links` carry `self` plus the
|
|
4018
4333
|
* `spot` / `futures` segment-discovery links.
|
|
4019
4334
|
*
|
|
4335
|
+
* For a decentralized exchange (`venueType` `dex` in `GET /exchanges`) the instruments are its pools,
|
|
4336
|
+
* each a `PoolDetail`, and the default segment is the first one the exchange lists (`uniswap-v3` for
|
|
4337
|
+
* `robinhood`).
|
|
4338
|
+
*
|
|
4020
4339
|
*/
|
|
4021
|
-
declare const listInstruments: <ThrowOnError extends boolean = false>(options: Options<ListInstrumentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<
|
|
4340
|
+
declare const listInstruments: <ThrowOnError extends boolean = false>(options: Options<ListInstrumentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<InstrumentCatalogueResponse, ResponseError, ThrowOnError>;
|
|
4022
4341
|
/**
|
|
4023
4342
|
* List an exchange segment's instruments
|
|
4024
4343
|
* Returns the instruments for one market segment of the exchange, each with
|
|
@@ -4026,8 +4345,13 @@ declare const listInstruments: <ThrowOnError extends boolean = false>(options: O
|
|
|
4026
4345
|
* `spot` / `futures` segment-discovery links; the default-segment shortcut is
|
|
4027
4346
|
* `GET /exchange/{exchangeId}/instruments` (spot).
|
|
4028
4347
|
*
|
|
4348
|
+
* For a decentralized exchange the segments are its protocols (`uniswap-v3` for `robinhood`) and the
|
|
4349
|
+
* instruments are its pools, each a `PoolDetail`: the 50 with most volume in the last 24 hours among
|
|
4350
|
+
* those with at least 10,000 US dollars of liquidity, refreshed every hour. The list is a place to
|
|
4351
|
+
* start, not the whole market: a live run can read any pool of the protocol, listed or not.
|
|
4352
|
+
*
|
|
4029
4353
|
*/
|
|
4030
|
-
declare const listSegmentInstruments: <ThrowOnError extends boolean = false>(options: Options<ListSegmentInstrumentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<
|
|
4354
|
+
declare const listSegmentInstruments: <ThrowOnError extends boolean = false>(options: Options<ListSegmentInstrumentsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<InstrumentCatalogueResponse, ResponseError, ThrowOnError>;
|
|
4031
4355
|
/**
|
|
4032
4356
|
* Download one hour of tickers for an instrument as a Lastra segment
|
|
4033
4357
|
* Serves exactly one hour of raw ticker data for the given instrument on the
|
|
@@ -4037,9 +4361,33 @@ declare const listSegmentInstruments: <ThrowOnError extends boolean = false>(opt
|
|
|
4037
4361
|
*
|
|
4038
4362
|
* One segment = one hour, aligned to UTC. The `hour` query parameter selects
|
|
4039
4363
|
* the segment and must match `YYYY-MM-DDTHH` (no minutes/seconds, no timezone
|
|
4040
|
-
* suffix). Example: `hour=2026-
|
|
4041
|
-
* 2026-
|
|
4042
|
-
*
|
|
4364
|
+
* suffix). Example: `hour=2026-10-15T10` is the segment `h10.lastra` of
|
|
4365
|
+
* 2026-10-15, covering `[10:00:00Z, 11:00:00Z)`. The hour has to be one of the last 7 days (see
|
|
4366
|
+
* below): read the example as the shape of the value.
|
|
4367
|
+
*
|
|
4368
|
+
* **Which hours.** The last 7 days: an hour that started no more than 7 days before the
|
|
4369
|
+
* request and has ended. This route gives one hour of one instrument, fast; it is not how to
|
|
4370
|
+
* get older history or a range. An older hour is `400` with `reason: OUTSIDE_WINDOW`, and the
|
|
4371
|
+
* error carries `next`, the `POST /datasets/imports` request that imports exactly that hour
|
|
4372
|
+
* as a dataset (add a `name`); a longer span is imported the same way, within your plan's
|
|
4373
|
+
* limits.
|
|
4374
|
+
*
|
|
4375
|
+
* **The hour in progress and the last hours.** The hour in progress, and an hour that has ended
|
|
4376
|
+
* but is not stored yet, can be answered with what has been received so far, marked provisional:
|
|
4377
|
+
* `200` with `X-Data-Status: provisional` and `X-Data-Through`, the instant of the last row.
|
|
4378
|
+
* Not every deployment of the service gives provisional answers: where it does not, those hours
|
|
4379
|
+
* are `404` with `reason: NOT_YET_AVAILABLE` and a `Retry-After`, and a client that needs them
|
|
4380
|
+
* handles both. A provisional answer is not to keep: it can still grow, and the stored hour
|
|
4381
|
+
* replaces it once there is one. It takes seconds to build, longer the further the hour has gone,
|
|
4382
|
+
* and the service limits how many it builds at once (`503` with `Retry-After`). When there is
|
|
4383
|
+
* nothing to give, because the instrument has no rows in the hour yet or what has been received
|
|
4384
|
+
* does not reach back to the start of the hour, the answer is also `404` with
|
|
4385
|
+
* `reason: NOT_YET_AVAILABLE`.
|
|
4386
|
+
*
|
|
4387
|
+
* **Timestamps.** In a Lastra response the `ts` column holds microseconds since the epoch,
|
|
4388
|
+
* declared by `ts_unit: micros` in the column's metadata and by the response header
|
|
4389
|
+
* `X-Ts-Unit: micros`. In a Parquet response the timestamp column is a `TIMESTAMP` in
|
|
4390
|
+
* milliseconds.
|
|
4043
4391
|
*
|
|
4044
4392
|
* A `format=parquet` query parameter switches the response to on-the-fly
|
|
4045
4393
|
* Parquet conversion via [lastra-convert](https://github.com/QTSurfer/lastra-convert)
|
|
@@ -4072,6 +4420,9 @@ declare const downloadTickers: <ThrowOnError extends boolean = false>(options: O
|
|
|
4072
4420
|
* format read the other with the same code. Use this endpoint when a
|
|
4073
4421
|
* per-tick payload would be too large for the window of interest.
|
|
4074
4422
|
*
|
|
4423
|
+
* The hours served (the last 7 days; the hour in progress and the last hours may be provisional), the timestamps
|
|
4424
|
+
* (`ts` in microseconds, `X-Ts-Unit: micros`) and the errors are those of the tickers route.
|
|
4425
|
+
*
|
|
4075
4426
|
*/
|
|
4076
4427
|
declare const downloadKlines: <ThrowOnError extends boolean = false>(options: Options<DownloadKlinesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Blob | File, ResponseError, ThrowOnError>;
|
|
4077
4428
|
/**
|
|
@@ -4522,8 +4873,18 @@ declare const getDatasetUpload: <ThrowOnError extends boolean = false>(options:
|
|
|
4522
4873
|
* as a dataset version indistinguishable from an uploaded one once it's ready. Poll
|
|
4523
4874
|
* `GET /datasets/{datasetId}/imports/{importId}` for progress.
|
|
4524
4875
|
*
|
|
4525
|
-
* `type` selects the
|
|
4526
|
-
*
|
|
4876
|
+
* `type` selects the kind of venue the history comes from, with the same two values as the
|
|
4877
|
+
* `venueType` of `GET /exchanges`: `dex` — history over a pool/pair's own on-chain market —
|
|
4878
|
+
* and `cex` — the history of a centralized exchange's market, kept by the platform. Each
|
|
4879
|
+
* has its own block (`dex`, `cex`). The exchange id of a `cex` import has to be a centralized
|
|
4880
|
+
* exchange of `GET /exchanges`; a decentralized one (`robinhood`, say) is `400`, and is imported
|
|
4881
|
+
* with `type: dex`.
|
|
4882
|
+
*
|
|
4883
|
+
* A `cex` import covers one instrument over a range: the API reads that range of the
|
|
4884
|
+
* exchange's history, builds the bars of the requested `cadence` from the finest data it has
|
|
4885
|
+
* for it, and stores the result as a dataset version, exactly as for an upload. `cex.dataType`
|
|
4886
|
+
* picks tickers or klines and is also the resulting dataset's `type`. The range is capped by
|
|
4887
|
+
* your tier like any import (`maxImportRangeHours` of `GET /account`).
|
|
4527
4888
|
*
|
|
4528
4889
|
* A `dex` import has two data shapes, chosen by the top-level `cadence`:
|
|
4529
4890
|
*
|
|
@@ -4573,13 +4934,23 @@ declare const stopLive: <ThrowOnError extends boolean = false>(options: Options<
|
|
|
4573
4934
|
declare const getLive: <ThrowOnError extends boolean = false>(options: Options<GetLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRunWithStream, ResponseError, ThrowOnError>;
|
|
4574
4935
|
/**
|
|
4575
4936
|
* Start a strategy on a live market feed
|
|
4576
|
-
* Starts your strategy against a live market feed. A new run
|
|
4937
|
+
* Starts your strategy against a live market feed. A new run begins in the **sandbox**
|
|
4577
4938
|
* stage — a short trial that compares an independent second execution against the first for
|
|
4578
4939
|
* agreement — before it is eligible for promotion to the live stage where it actually
|
|
4579
4940
|
* publishes signals other systems can act on. Poll `GET /strategy/{strategyId}/live` (or
|
|
4580
4941
|
* `PATCH`/`DELETE` `/live/{runId}` once you have the `runId`) to watch `stage` move from
|
|
4581
4942
|
* `SANDBOX` to `LIVE`.
|
|
4582
4943
|
*
|
|
4944
|
+
* A strategy that has already been through that trial does not go through it again. When an
|
|
4945
|
+
* earlier run of yours of the same compiled strategy was promoted to `LIVE`, and none of that
|
|
4946
|
+
* compilation's runs was stopped for using more resources than allowed, the new run starts in
|
|
4947
|
+
* `LIVE` at once: the response says `stage: LIVE` and carries the earlier verdict in `gate`.
|
|
4948
|
+
* The parameters, sources and instruments may differ from the earlier run. Submitting the
|
|
4949
|
+
* strategy again (`POST /strategy`) compiles it anew, and a new compilation goes through the
|
|
4950
|
+
* sandbox like a first run. Send `sandbox: true` to start in the sandbox anyway — for
|
|
4951
|
+
* example to read the run's signals back over the connection while you debug it, which the
|
|
4952
|
+
* live stage does not keep.
|
|
4953
|
+
*
|
|
4583
4954
|
* Only one run per strategy at a time — starting again while one is already running is `409`;
|
|
4584
4955
|
* stop the current one first.
|
|
4585
4956
|
*
|
|
@@ -4588,7 +4959,16 @@ declare const getLive: <ThrowOnError extends boolean = false>(options: Options<G
|
|
|
4588
4959
|
* (fastest) cadence available for the exchange — today that is 1 tick/second on every
|
|
4589
4960
|
* supported exchange; choosing among several cadences is not offered yet.
|
|
4590
4961
|
*
|
|
4591
|
-
* `
|
|
4962
|
+
* `venueType` is `cex` (a centralized exchange) or `dex` (one pool on a decentralized exchange). A `dex` source reads one
|
|
4963
|
+
* pool, takes only `kline`, and needs the pool's address as its single instrument. See the "Live execution" guide,
|
|
4964
|
+
* "Sources".
|
|
4965
|
+
*
|
|
4966
|
+
* `venueType`, `exchange` and `segment` have to be ones `GET /exchanges` lists together: the exchange under that
|
|
4967
|
+
* venue type, and the segment among its `liveSegments`. Case and the spaces around a value do not matter, and the
|
|
4968
|
+
* run reports them back in lower case (`cx`, the older spelling of `cex`, is still read). Anything else is refused
|
|
4969
|
+
* with `400`, naming what the list has.
|
|
4970
|
+
*
|
|
4971
|
+
* `instruments` can be left out, except for a `dex` source. A QTScript strategy can declare which instruments it accepts with an `instruments`
|
|
4592
4972
|
* line in its source; when the compilation of the strategy records that selection as a list of pairs, a
|
|
4593
4973
|
* start that leaves `instruments` out, or sends `["*"]`, takes that list, and otherwise the run reads every
|
|
4594
4974
|
* instrument the exchange/segment offers. A list you send is taken as sent. Either side of an entry can be `*`
|
|
@@ -4801,4 +5181,4 @@ declare const mintLiveConnectionToken: <ThrowOnError extends boolean = false>(op
|
|
|
4801
5181
|
|
|
4802
5182
|
declare const client: _hey_api_client_fetch.Client;
|
|
4803
5183
|
|
|
4804
|
-
export { type AcceptedJob, type Account, type AccountLinks, type AccountUsage, type AccountUsageLinks, type AuthTokenError, type AuthTokenResponse, type AuthenticateData, type AuthenticateError, type AuthenticateErrors, type AuthenticateResponse, type AuthenticateResponses, type BacktestJobResult, type CancelBacktestData, type CancelBacktestError, type CancelBacktestErrors, type CancelBacktestResponse, type CancelBacktestResponses, type CancelSweepData, type CancelSweepError, type CancelSweepErrors, type CancelSweepResponse, type CancelSweepResponses, type ClientOptions, type CompileStrategyData, type CompileStrategyError, type CompileStrategyErrors, type CompileStrategyResponse, type CompileStrategyResponses, type CoverageWindow, type CreateDatasetData, type CreateDatasetError, type CreateDatasetErrors, type CreateDatasetResponse, type CreateDatasetResponses, type DataSourceType, type Dataset, type DatasetCreated, type DatasetImportCreated, type DatasetImportDexRequest, type DatasetImportRequest, type DatasetImportState, type DatasetUploadSession, type DatasetUploadState, type DatasetUploadTarget, type DatasetVersion, type DatasetWithLinks, type DeclaredProperty, type DeleteDatasetData, type DeleteDatasetError, type DeleteDatasetErrors, type DeleteDatasetResponse, type DeleteDatasetResponses, type DeleteStrategyData, type DeleteStrategyError, type DeleteStrategyErrors, type DeleteStrategyResponse, type DeleteStrategyResponses, type DownloadKlinesData, type DownloadKlinesError, type DownloadKlinesErrors, type DownloadKlinesResponse, type DownloadKlinesResponses, type DownloadTickersData, type DownloadTickersError, type DownloadTickersErrors, type DownloadTickersResponse, type DownloadTickersResponses, type EquityCurveMeta, type EquityCurveOptions, type EquityCurveOutMode, type EquityCurveRequest, type EquityCurveResult, type EquityPoint, type Exchange, type ExecuteBacktestData, type ExecuteBacktestError, type ExecuteBacktestErrors, type ExecuteBacktestResponse, type ExecuteBacktestResponses, type ExecuteSweepAccepted, type ExecuteSweepData, type ExecuteSweepError, type ExecuteSweepErrors, type ExecuteSweepRequest, type ExecuteSweepResponse, type ExecuteSweepResponses, type ExecuteSweepResult, type FinalizeDatasetUploadData, type FinalizeDatasetUploadError, type FinalizeDatasetUploadErrors, type FinalizeDatasetUploadResponse, type FinalizeDatasetUploadResponses, type GetAccountData, type GetAccountResponse, type GetAccountResponses, type GetAccountUsageData, type GetAccountUsageResponse, type GetAccountUsageResponses, type GetBacktestResultData, type GetBacktestResultError, type GetBacktestResultErrors, type GetBacktestResultResponse, type GetBacktestResultResponses, type GetDatasetData, type GetDatasetError, type GetDatasetErrors, type GetDatasetImportData, type GetDatasetImportError, type GetDatasetImportErrors, type GetDatasetImportResponse, type GetDatasetImportResponses, type GetDatasetResponse, type GetDatasetResponses, type GetDatasetUploadData, type GetDatasetUploadError, type GetDatasetUploadErrors, type GetDatasetUploadResponse, type GetDatasetUploadResponses, type GetLiveData, type GetLiveError, type GetLiveErrors, type GetLiveResponse, type GetLiveResponses, type GetLiveRunData, type GetLiveRunError, type GetLiveRunErrors, type GetLiveRunPaperData, type GetLiveRunPaperEquityData, type GetLiveRunPaperEquityError, type GetLiveRunPaperEquityErrors, type GetLiveRunPaperEquityResponse, type GetLiveRunPaperEquityResponses, type GetLiveRunPaperError, type GetLiveRunPaperErrors, type GetLiveRunPaperResponse, type GetLiveRunPaperResponses, type GetLiveRunResponse, type GetLiveRunResponses, type GetLiveRunSignalsData, type GetLiveRunSignalsError, type GetLiveRunSignalsErrors, type GetLiveRunSignalsResponse, type GetLiveRunSignalsResponses, type GetPrepareStatusData, type GetPrepareStatusError, type GetPrepareStatusErrors, type GetPrepareStatusResponse, type GetPrepareStatusResponses, type GetStrategyCodeData, type GetStrategyCodeError, type GetStrategyCodeErrors, type GetStrategyCodeResponse, type GetStrategyCodeResponses, type GetStrategyData, type GetStrategyError, type GetStrategyErrors, type GetStrategyResponse, type GetStrategyResponses, type GetSweepResultData, type GetSweepResultError, type GetSweepResultErrors, type GetSweepResultResponse, type GetSweepResultResponses, type GetSweepRunEquityCurveData, type GetSweepRunEquityCurveError, type GetSweepRunEquityCurveErrors, type GetSweepRunEquityCurveResponse, type GetSweepRunEquityCurveResponses, type GetSweepSensitivityData, type GetSweepSensitivityError, type GetSweepSensitivityErrors, type GetSweepSensitivityResponse, type GetSweepSensitivityResponses, type HalLink, type ImportDatasetData, type ImportDatasetError, type ImportDatasetErrors, type ImportDatasetResponse, type ImportDatasetResponses, type Instrument, type InstrumentCoverage, type InstrumentDetail, type InstrumentLinks, type InstrumentListMeta, type InstrumentListResponse, type JobState, type ListDatasetsData, type ListDatasetsResponse, type ListDatasetsResponses, type ListExchangesData, type ListExchangesResponse, type ListExchangesResponses, type ListInstrumentsData, type ListInstrumentsError, type ListInstrumentsErrors, type ListInstrumentsResponse, type ListInstrumentsResponses, type ListLiveData, type ListLiveError, type ListLiveErrors, type ListLiveResponse, type ListLiveResponses, type ListPublicLiveData, type ListPublicLiveError, type ListPublicLiveErrors, type ListPublicLiveResponse, type ListPublicLiveResponses, type ListSegmentInstrumentsData, type ListSegmentInstrumentsError, type ListSegmentInstrumentsErrors, type ListSegmentInstrumentsResponse, type ListSegmentInstrumentsResponses, type ListStrategiesData, type ListStrategiesResponse, type ListStrategiesResponses, type LiveCommandResult, type LiveConnectionToken, type LiveListResponse, type LivePaper, type LivePaperAccount, type LivePaperConfig, type LivePaperEquityPage, type LivePaperEquityPoint, type LivePaperKpi, type LivePaperPosition, type LiveParamsUpdateResult, type LiveRun, type LiveRunCompact, type LiveRunDetail, type LiveRunStats, type LiveRunSummary, type LiveRunWithStream, type LiveSignal, type LiveSignalInstrument, type LiveSignalOrder, type LiveSignalPage, type LiveSource, type LiveSourceRequest, type LiveStreamRevoked, type LiveStreamUrl, type MintLiveConnectionTokenData, type MintLiveConnectionTokenResponse, type MintLiveConnectionTokenResponses, type Notice, type OpenDatasetUploadData, type OpenDatasetUploadError, type OpenDatasetUploadErrors, type OpenDatasetUploadResponse, type OpenDatasetUploadResponses, type Options, type PrepareBacktestData, type PrepareBacktestError, type PrepareBacktestErrors, type PrepareBacktestResponse, type PrepareBacktestResponses, type PrepareJobState, type PrepareRequest, type PublicLiveListLinks, type PublicLiveListResponse, type PublicLiveNextLink, type PublicLiveRun, type ResponseError, type ResultMap, type RevokeLiveStreamData, type RevokeLiveStreamError, type RevokeLiveStreamErrors, type RevokeLiveStreamResponse, type RevokeLiveStreamResponses, type RotateLiveStreamData, type RotateLiveStreamError, type RotateLiveStreamErrors, type RotateLiveStreamResponse, type RotateLiveStreamResponses, type ScalarStrategyParamValue, type SendLiveCommandData, type SendLiveCommandError, type SendLiveCommandErrors, type SendLiveCommandRequest, type SendLiveCommandResponse, type SendLiveCommandResponses, type StartLiveData, type StartLiveError, type StartLiveErrors, type StartLiveRequest, type StartLiveResponse, type StartLiveResponses, type StopLiveData, type StopLiveError, type StopLiveErrors, type StopLiveResponse, type StopLiveResponses, type StrategyId, type StrategyLinks, type StrategyState, type StrategySummary, type SweepAxis, type SweepBaseConfig, type SweepHeatmap, type SweepHeatmapCell, type SweepMarginal, type SweepMarginalPoint, type SweepProgress, type SweepRunRow, type SweepSensitivity, type SweepSpecRequest, type UpdateLiveData, type UpdateLiveError, type UpdateLiveErrors, type UpdateLiveParamsData, type UpdateLiveParamsError, type UpdateLiveParamsErrors, type UpdateLiveParamsRequest, type UpdateLiveParamsResponse, type UpdateLiveParamsResponses, type UpdateLiveRequest, type UpdateLiveResponse, type UpdateLiveResponses, type ValidateStrategyData, type ValidateStrategyError, type ValidateStrategyErrors, type ValidateStrategyResponse, type ValidateStrategyResponses, type WalkForwardAccepted, type WalkForwardFold, type WalkForwardRequest, type WalkForwardResult, type WarmFrom, authenticate, cancelBacktest, cancelSweep, client, compileStrategy, createDataset, deleteDataset, deleteStrategy, downloadKlines, downloadTickers, executeBacktest, executeSweep, finalizeDatasetUpload, getAccount, getAccountUsage, getBacktestResult, getDataset, getDatasetImport, getDatasetUpload, getLive, getLiveRun, getLiveRunPaper, getLiveRunPaperEquity, getLiveRunSignals, getPrepareStatus, getStrategy, getStrategyCode, getSweepResult, getSweepRunEquityCurve, getSweepSensitivity, importDataset, listDatasets, listExchanges, listInstruments, listLive, listPublicLive, listSegmentInstruments, listStrategies, mintLiveConnectionToken, openDatasetUpload, prepareBacktest, revokeLiveStream, rotateLiveStream, sendLiveCommand, startLive, stopLive, updateLive, updateLiveParams, validateStrategy };
|
|
5184
|
+
export { type AcceptedJob, type Account, type AccountLinks, type AccountUsage, type AccountUsageLinks, type AuthTokenError, type AuthTokenResponse, type AuthenticateData, type AuthenticateError, type AuthenticateErrors, type AuthenticateResponse, type AuthenticateResponses, type BacktestJobResult, type CancelBacktestData, type CancelBacktestError, type CancelBacktestErrors, type CancelBacktestResponse, type CancelBacktestResponses, type CancelSweepData, type CancelSweepError, type CancelSweepErrors, type CancelSweepResponse, type CancelSweepResponses, type ClientOptions, type CompileStrategyData, type CompileStrategyError, type CompileStrategyErrors, type CompileStrategyResponse, type CompileStrategyResponses, type CoverageWindow, type CreateDatasetData, type CreateDatasetError, type CreateDatasetErrors, type CreateDatasetResponse, type CreateDatasetResponses, type DataSourceType, type Dataset, type DatasetCreated, type DatasetImportCexRequest, type DatasetImportCreated, type DatasetImportDexRequest, type DatasetImportRequest, type DatasetImportState, type DatasetUploadSession, type DatasetUploadState, type DatasetUploadTarget, type DatasetVersion, type DatasetWithLinks, type DeclaredProperty, type DeleteDatasetData, type DeleteDatasetError, type DeleteDatasetErrors, type DeleteDatasetResponse, type DeleteDatasetResponses, type DeleteStrategyData, type DeleteStrategyError, type DeleteStrategyErrors, type DeleteStrategyResponse, type DeleteStrategyResponses, type DownloadKlinesData, type DownloadKlinesError, type DownloadKlinesErrors, type DownloadKlinesResponse, type DownloadKlinesResponses, type DownloadTickersData, type DownloadTickersError, type DownloadTickersErrors, type DownloadTickersResponse, type DownloadTickersResponses, type EquityCurveMeta, type EquityCurveOptions, type EquityCurveOutMode, type EquityCurveRequest, type EquityCurveResult, type EquityPoint, type ErrorNextCall, type Exchange, type ExecuteBacktestData, type ExecuteBacktestError, type ExecuteBacktestErrors, type ExecuteBacktestResponse, type ExecuteBacktestResponses, type ExecuteSweepAccepted, type ExecuteSweepData, type ExecuteSweepError, type ExecuteSweepErrors, type ExecuteSweepRequest, type ExecuteSweepResponse, type ExecuteSweepResponses, type ExecuteSweepResult, type FinalizeDatasetUploadData, type FinalizeDatasetUploadError, type FinalizeDatasetUploadErrors, type FinalizeDatasetUploadResponse, type FinalizeDatasetUploadResponses, type GetAccountData, type GetAccountResponse, type GetAccountResponses, type GetAccountUsageData, type GetAccountUsageResponse, type GetAccountUsageResponses, type GetBacktestResultData, type GetBacktestResultError, type GetBacktestResultErrors, type GetBacktestResultResponse, type GetBacktestResultResponses, type GetDatasetData, type GetDatasetError, type GetDatasetErrors, type GetDatasetImportData, type GetDatasetImportError, type GetDatasetImportErrors, type GetDatasetImportResponse, type GetDatasetImportResponses, type GetDatasetResponse, type GetDatasetResponses, type GetDatasetUploadData, type GetDatasetUploadError, type GetDatasetUploadErrors, type GetDatasetUploadResponse, type GetDatasetUploadResponses, type GetLiveData, type GetLiveError, type GetLiveErrors, type GetLiveResponse, type GetLiveResponses, type GetLiveRunData, type GetLiveRunError, type GetLiveRunErrors, type GetLiveRunPaperData, type GetLiveRunPaperEquityData, type GetLiveRunPaperEquityError, type GetLiveRunPaperEquityErrors, type GetLiveRunPaperEquityResponse, type GetLiveRunPaperEquityResponses, type GetLiveRunPaperError, type GetLiveRunPaperErrors, type GetLiveRunPaperResponse, type GetLiveRunPaperResponses, type GetLiveRunResponse, type GetLiveRunResponses, type GetLiveRunSignalsData, type GetLiveRunSignalsError, type GetLiveRunSignalsErrors, type GetLiveRunSignalsResponse, type GetLiveRunSignalsResponses, type GetPrepareStatusData, type GetPrepareStatusError, type GetPrepareStatusErrors, type GetPrepareStatusResponse, type GetPrepareStatusResponses, type GetStrategyCodeData, type GetStrategyCodeError, type GetStrategyCodeErrors, type GetStrategyCodeResponse, type GetStrategyCodeResponses, type GetStrategyData, type GetStrategyError, type GetStrategyErrors, type GetStrategyResponse, type GetStrategyResponses, type GetSweepResultData, type GetSweepResultError, type GetSweepResultErrors, type GetSweepResultResponse, type GetSweepResultResponses, type GetSweepRunEquityCurveData, type GetSweepRunEquityCurveError, type GetSweepRunEquityCurveErrors, type GetSweepRunEquityCurveResponse, type GetSweepRunEquityCurveResponses, type GetSweepSensitivityData, type GetSweepSensitivityError, type GetSweepSensitivityErrors, type GetSweepSensitivityResponse, type GetSweepSensitivityResponses, type HalLink, type ImportDatasetData, type ImportDatasetError, type ImportDatasetErrors, type ImportDatasetResponse, type ImportDatasetResponses, type Instrument, type InstrumentCatalogueResponse, type InstrumentCoverage, type InstrumentDetail, type InstrumentLinks, type InstrumentListMeta, type InstrumentListResponse, type JobState, type KeyScopes, type ListDatasetsData, type ListDatasetsResponse, type ListDatasetsResponses, type ListExchangesData, type ListExchangesResponse, type ListExchangesResponses, type ListInstrumentsData, type ListInstrumentsError, type ListInstrumentsErrors, type ListInstrumentsResponse, type ListInstrumentsResponses, type ListLiveData, type ListLiveError, type ListLiveErrors, type ListLiveResponse, type ListLiveResponses, type ListPublicLiveData, type ListPublicLiveError, type ListPublicLiveErrors, type ListPublicLiveResponse, type ListPublicLiveResponses, type ListSegmentInstrumentsData, type ListSegmentInstrumentsError, type ListSegmentInstrumentsErrors, type ListSegmentInstrumentsResponse, type ListSegmentInstrumentsResponses, type ListStrategiesData, type ListStrategiesResponse, type ListStrategiesResponses, type LiveCommandResult, type LiveConnectionToken, type LiveListResponse, type LivePaper, type LivePaperAccount, type LivePaperConfig, type LivePaperEquityPage, type LivePaperEquityPoint, type LivePaperKpi, type LivePaperPosition, type LiveParamsUpdateResult, type LiveRun, type LiveRunCompact, type LiveRunDetail, type LiveRunStats, type LiveRunSummary, type LiveRunWithStream, type LiveSignal, type LiveSignalInstrument, type LiveSignalOrder, type LiveSignalPage, type LiveSource, type LiveSourceRequest, type LiveStreamRevoked, type LiveStreamUrl, type MintLiveConnectionTokenData, type MintLiveConnectionTokenResponse, type MintLiveConnectionTokenResponses, type Notice, type OpenDatasetUploadData, type OpenDatasetUploadError, type OpenDatasetUploadErrors, type OpenDatasetUploadResponse, type OpenDatasetUploadResponses, type Options, type PoolDetail, type PoolLinks, type PoolListMeta, type PoolListResponse, type PrepareBacktestData, type PrepareBacktestError, type PrepareBacktestErrors, type PrepareBacktestResponse, type PrepareBacktestResponses, type PrepareJobState, type PrepareRequest, type PublicLiveListLinks, type PublicLiveListResponse, type PublicLiveNextLink, type PublicLiveRun, type ResponseError, type ResultMap, type RevokeLiveStreamData, type RevokeLiveStreamError, type RevokeLiveStreamErrors, type RevokeLiveStreamResponse, type RevokeLiveStreamResponses, type RotateLiveStreamData, type RotateLiveStreamError, type RotateLiveStreamErrors, type RotateLiveStreamResponse, type RotateLiveStreamResponses, type ScalarStrategyParamValue, type SendLiveCommandData, type SendLiveCommandError, type SendLiveCommandErrors, type SendLiveCommandRequest, type SendLiveCommandResponse, type SendLiveCommandResponses, type StartLiveData, type StartLiveError, type StartLiveErrors, type StartLiveRequest, type StartLiveResponse, type StartLiveResponses, type StopLiveData, type StopLiveError, type StopLiveErrors, type StopLiveResponse, type StopLiveResponses, type StrategyId, type StrategyLinks, type StrategyState, type StrategySummary, type SweepAxis, type SweepBaseConfig, type SweepHeatmap, type SweepHeatmapCell, type SweepMarginal, type SweepMarginalPoint, type SweepProgress, type SweepRunRow, type SweepSensitivity, type SweepSpecRequest, type UpdateLiveData, type UpdateLiveError, type UpdateLiveErrors, type UpdateLiveParamsData, type UpdateLiveParamsError, type UpdateLiveParamsErrors, type UpdateLiveParamsRequest, type UpdateLiveParamsResponse, type UpdateLiveParamsResponses, type UpdateLiveRequest, type UpdateLiveResponse, type UpdateLiveResponses, type ValidateStrategyData, type ValidateStrategyError, type ValidateStrategyErrors, type ValidateStrategyResponse, type ValidateStrategyResponses, type WalkForwardAccepted, type WalkForwardFold, type WalkForwardRequest, type WalkForwardResult, type WarmFrom, authenticate, cancelBacktest, cancelSweep, client, compileStrategy, createDataset, deleteDataset, deleteStrategy, downloadKlines, downloadTickers, executeBacktest, executeSweep, finalizeDatasetUpload, getAccount, getAccountUsage, getBacktestResult, getDataset, getDatasetImport, getDatasetUpload, getLive, getLiveRun, getLiveRunPaper, getLiveRunPaperEquity, getLiveRunSignals, getPrepareStatus, getStrategy, getStrategyCode, getSweepResult, getSweepRunEquityCurve, getSweepSensitivity, importDataset, listDatasets, listExchanges, listInstruments, listLive, listPublicLive, listSegmentInstruments, listStrategies, mintLiveConnectionToken, openDatasetUpload, prepareBacktest, revokeLiveStream, rotateLiveStream, sendLiveCommand, startLive, stopLive, updateLive, updateLiveParams, validateStrategy };
|