@qtsurfer/api-client 0.19.0 → 0.20.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 +26 -10
- package/dist/index.d.ts +207 -25
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +126 -12
- package/src/generated/sdk.gen.ts +66 -7
- package/src/generated/types.gen.ts +174 -17
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ npm install @qtsurfer/api-client
|
|
|
30
30
|
import { client, listExchanges, prepareBacktest } from '@qtsurfer/api-client';
|
|
31
31
|
|
|
32
32
|
client.setConfig({
|
|
33
|
-
baseUrl: 'https://api.qtsurfer.
|
|
33
|
+
baseUrl: 'https://api.qtsurfer.net/v1', // Staging beta server
|
|
34
34
|
headers: {
|
|
35
35
|
Authorization: `Bearer ${process.env.QTSURFER_TOKEN}`,
|
|
36
36
|
},
|
|
@@ -51,7 +51,7 @@ Exchange a long-lived API key for one via `authenticate`:
|
|
|
51
51
|
import { authenticate } from '@qtsurfer/api-client';
|
|
52
52
|
|
|
53
53
|
const { data, error } = await authenticate({
|
|
54
|
-
baseUrl: 'https://api.qtsurfer.
|
|
54
|
+
baseUrl: 'https://api.qtsurfer.net/v1', // Staging beta server
|
|
55
55
|
headers: { 'X-API-Key': process.env.QTSURFER_APIKEY! },
|
|
56
56
|
});
|
|
57
57
|
if (error) throw error;
|
|
@@ -68,21 +68,21 @@ pluggable token stores so callers don't reinvent that plumbing.
|
|
|
68
68
|
|
|
69
69
|
All operations are exported as standalone functions; every operation accepts an `Options` object and returns `{ data, error, response }`.
|
|
70
70
|
|
|
71
|
-
The table is exhaustive: `src/generated/` is produced from the OpenAPI spec, so **all
|
|
72
|
-
the spec declares are exported. The rows below describe **spec version 0.
|
|
71
|
+
The table is exhaustive: `src/generated/` is produced from the OpenAPI spec, so **all 45 operations**
|
|
72
|
+
the spec declares are exported. The rows below describe **spec version 0.128.14**, which is versioned
|
|
73
73
|
independently of this package.
|
|
74
74
|
|
|
75
75
|
| Function | Method | Path | Purpose |
|
|
76
76
|
| -------- | ------ | ---- | ------- |
|
|
77
77
|
| `authenticate` | POST | `/auth/token` | Exchange an API key for a short-lived JWT |
|
|
78
|
-
| `getAccount` | GET | `/account` | Read the authenticated account tier and limits |
|
|
78
|
+
| `getAccount` | GET | `/account` | Read the authenticated account tier and limits, including the full-grid sweep limit |
|
|
79
79
|
| `getAccountUsage` | GET | `/account/usage` | Read current resource and storage use |
|
|
80
80
|
| `listExchanges` | GET | `/exchanges` | List the available exchanges |
|
|
81
81
|
| `listInstruments` | GET | `/exchange/{exchangeId}/instruments` | List an exchange's instruments (default spot segment) |
|
|
82
82
|
| `listSegmentInstruments` | GET | `/exchange/{exchangeId}/{segment}/instruments` | List an exchange segment's instruments |
|
|
83
83
|
| `downloadTickers` | GET | `/exchange/{exchangeId}/tickers/{base}/{quote}` | Download one hour of tickers as a Lastra segment |
|
|
84
84
|
| `downloadKlines` | GET | `/exchange/{exchangeId}/klines/{base}/{quote}` | Download one hour of klines as a Lastra segment |
|
|
85
|
-
| `listStrategies` | GET | `/strategies` | List your registered strategies,
|
|
85
|
+
| `listStrategies` | GET | `/strategies` | List your registered strategies, optionally including deleted strategies and their deletion times |
|
|
86
86
|
| `compileStrategy` | POST | `/strategy` | Compile and register a strategy |
|
|
87
87
|
| `validateStrategy` | POST | `/strategy/{strategyId}/validate` | Check that a registered strategy can actually run |
|
|
88
88
|
| `getStrategy` | GET | `/strategy/{strategyId}` | Get a strategy by id, including its validation state |
|
|
@@ -98,7 +98,7 @@ independently of this package.
|
|
|
98
98
|
| `executeBacktest` | POST | `/backtest/{exchangeId}/{type}/execute` | Execute a compiled strategy against a prepared dataset |
|
|
99
99
|
| `cancelBacktest` | DELETE | `/backtest/{exchangeId}/{type}/execute/{jobId}` | Cancel a running backtest execution |
|
|
100
100
|
| `getBacktestResult` | GET | `/backtest/{exchangeId}/{type}/execute/{jobId}` | Get the result of a backtest execution job |
|
|
101
|
-
| `listDatasets` | GET | `/datasets` | List your datasets |
|
|
101
|
+
| `listDatasets` | GET | `/datasets` | List your datasets, optionally including deleted datasets and their deletion times |
|
|
102
102
|
| `createDataset` | POST | `/datasets` | Create a dataset and obtain its first upload session |
|
|
103
103
|
| `deleteDataset` | DELETE | `/datasets/{datasetId}` | Soft-delete a dataset |
|
|
104
104
|
| `getDataset` | GET | `/datasets/{datasetId}` | Get dataset metadata |
|
|
@@ -114,12 +114,28 @@ independently of this package.
|
|
|
114
114
|
| `listPublicLive` | GET | `/live/public` | Page publicly visible live runs |
|
|
115
115
|
| `updateLive` | PATCH | `/live/{runId}` | Change a run's visibility, name, or description |
|
|
116
116
|
| `updateLiveParams` | PUT | `/live/{runId}/params` | Change parameters while a run stays active |
|
|
117
|
+
| `sendLiveCommand` | POST | `/live/{runId}/commands` | Send a command to a running strategy without restarting it |
|
|
117
118
|
| `getLiveRunSignals` | GET | `/live/{runId}/signals` | Page retained signals by time, instrument, or signal type (`paper` items only when output is `mix`) |
|
|
118
119
|
| `getLiveRunPaper` | GET | `/live/{runId}/paper` | Read simulated accounts, open positions, equity, and KPIs for a paper-trading run |
|
|
119
120
|
| `getLiveRunPaperEquity` | GET | `/live/{runId}/paper/equity` | Page the run's retained paper equity curve, optionally by quote currency or start time |
|
|
120
121
|
| `mintLiveConnectionToken` | POST | `/live/token` | Mint a short-lived Centrifugo connection token |
|
|
121
122
|
|
|
122
|
-
All generated types (`Exchange`, `InstrumentDetail`, `BacktestJobResult`, `PrepareJobState`, `ResultMap`, `LivePaper`, `LivePaperAccount`, `LivePaperEquityPage`, etc.) are re-exported from the root.
|
|
123
|
+
All generated types (`Exchange`, `InstrumentDetail`, `BacktestJobResult`, `PrepareJobState`, `ResultMap`, `LivePaper`, `LivePaperAccount`, `LivePaperEquityPage`, `SendLiveCommandRequest`, `LiveCommandResult`, etc.) are re-exported from the root.
|
|
124
|
+
|
|
125
|
+
`sendLiveCommand` sends a command to every execution behind an owned live run. The strategy must
|
|
126
|
+
implement the engine's `CommandRequestHandler`; `202` means the command was accepted, not that the
|
|
127
|
+
strategy has completed handling it:
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
import { sendLiveCommand } from '@qtsurfer/api-client';
|
|
131
|
+
|
|
132
|
+
const { data, error } = await sendLiveCommand({
|
|
133
|
+
path: { runId },
|
|
134
|
+
body: { command: 'flatten', properties: { instrument: 'BTC/USDT' } },
|
|
135
|
+
});
|
|
136
|
+
if (error) throw error;
|
|
137
|
+
console.log(data.commandId, data.effectiveAtMs);
|
|
138
|
+
```
|
|
123
139
|
|
|
124
140
|
## Configuring the client
|
|
125
141
|
|
|
@@ -130,12 +146,12 @@ import { client, listExchanges } from '@qtsurfer/api-client';
|
|
|
130
146
|
|
|
131
147
|
// Global
|
|
132
148
|
client.setConfig({
|
|
133
|
-
baseUrl: 'https://api.qtsurfer.
|
|
149
|
+
baseUrl: 'https://api.qtsurfer.net/v1', // Staging beta server
|
|
134
150
|
});
|
|
135
151
|
|
|
136
152
|
// Per-call
|
|
137
153
|
await listExchanges({
|
|
138
|
-
baseUrl: 'https://api.qtsurfer.
|
|
154
|
+
baseUrl: 'https://api.qtsurfer.net/v1', // Staging beta server
|
|
139
155
|
headers: { 'X-Request-Id': '...' },
|
|
140
156
|
});
|
|
141
157
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -112,12 +112,34 @@ type Account = {
|
|
|
112
112
|
* Your current subscription tier.
|
|
113
113
|
*/
|
|
114
114
|
tier: string;
|
|
115
|
+
/**
|
|
116
|
+
* Maximum number of strategy executions (and sweeps) you can have running at the same time
|
|
117
|
+
* through the API. Starting one past this number is answered with `429`, whose message
|
|
118
|
+
* carries the same number. The value already includes any API allowance your plan has.
|
|
119
|
+
*
|
|
120
|
+
*/
|
|
121
|
+
maxExecute: number;
|
|
122
|
+
/**
|
|
123
|
+
* Maximum length, in days, of the time range of a backtest on one of your own datasets.
|
|
124
|
+
*/
|
|
125
|
+
maxRangeDays: number;
|
|
126
|
+
/**
|
|
127
|
+
* Largest full grid, in parameter combinations, a sweep may run with the `grid` sampler.
|
|
128
|
+
* A grid with more combinations is refused with `400`; the `random` and `lhs` samplers run
|
|
129
|
+
* only their `samples` and are not held to it.
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
maxSweepCartesian: number;
|
|
133
|
+
/**
|
|
134
|
+
* Maximum length, in hours, of the time range of one dataset import from an exchange.
|
|
135
|
+
*/
|
|
136
|
+
maxImportRangeHours: number;
|
|
115
137
|
/**
|
|
116
138
|
* Maximum number of active datasets your tier allows.
|
|
117
139
|
*/
|
|
118
140
|
maxDatasets: number;
|
|
119
141
|
/**
|
|
120
|
-
* Maximum size, in bytes, of a single dataset version.
|
|
142
|
+
* Maximum size, in bytes, of a single dataset version as stored, that is the `bytes` of its ready version. For a CSV upload that is the converted file, not the file you upload, so estimate from the number of rows. The Datasets guide has the details.
|
|
121
143
|
*/
|
|
122
144
|
maxDatasetBytes: number;
|
|
123
145
|
/**
|
|
@@ -490,6 +512,11 @@ type SweepAxis = {
|
|
|
490
512
|
values: Array<number | boolean>;
|
|
491
513
|
};
|
|
492
514
|
type SweepSpecRequest = {
|
|
515
|
+
/**
|
|
516
|
+
* `grid` runs every combination of the axes and is held to your plan's
|
|
517
|
+
* `maxSweepCartesian` (`GET /account`); `random` and `lhs` run `samples` combinations and are not.
|
|
518
|
+
*
|
|
519
|
+
*/
|
|
493
520
|
sampler?: "grid" | "random" | "lhs";
|
|
494
521
|
/**
|
|
495
522
|
* Reproducibility seed. If omitted, the server generates one with Java's
|
|
@@ -1158,6 +1185,12 @@ type StrategySummary = {
|
|
|
1158
1185
|
*
|
|
1159
1186
|
*/
|
|
1160
1187
|
requiredSources?: Array<string>;
|
|
1188
|
+
/**
|
|
1189
|
+
* When you deleted this strategy. Only ever present in `GET /strategies?includeDeleted=true`,
|
|
1190
|
+
* and only on strategies you have deleted.
|
|
1191
|
+
*
|
|
1192
|
+
*/
|
|
1193
|
+
deletedAt?: string;
|
|
1161
1194
|
};
|
|
1162
1195
|
/**
|
|
1163
1196
|
* What is known about a registered strategy: that it compiled, and what validating it found.
|
|
@@ -1269,6 +1302,12 @@ type Dataset = {
|
|
|
1269
1302
|
*
|
|
1270
1303
|
*/
|
|
1271
1304
|
currentVersionId?: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* When you deleted this dataset. Only ever present in `GET /datasets?includeDeleted=true`,
|
|
1307
|
+
* and only on datasets you have deleted.
|
|
1308
|
+
*
|
|
1309
|
+
*/
|
|
1310
|
+
deletedAt?: string;
|
|
1272
1311
|
/**
|
|
1273
1312
|
* When `currentVersionId` last changed. Absent until it has a value.
|
|
1274
1313
|
*/
|
|
@@ -1709,11 +1748,11 @@ type StartLiveRequest = {
|
|
|
1709
1748
|
[key: string]: unknown;
|
|
1710
1749
|
};
|
|
1711
1750
|
/**
|
|
1712
|
-
* A `public` run appears in `GET /live/public` and its signal channel accepts subscriptions from anyone, not only you.
|
|
1751
|
+
* A `public` run appears in `GET /live/public` and its signal channel accepts subscriptions from anyone, not only you — from the moment it is promoted to `live`. While it is a `sandbox` trial, `public` is only what you asked for, and only you can read it.
|
|
1713
1752
|
*/
|
|
1714
1753
|
visibility?: "private" | "public";
|
|
1715
1754
|
/**
|
|
1716
|
-
* Request that this run's signals be relayed over its WebSocket channel
|
|
1755
|
+
* 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.
|
|
1717
1756
|
*/
|
|
1718
1757
|
relay?: boolean;
|
|
1719
1758
|
name?: string;
|
|
@@ -1772,6 +1811,18 @@ type UpdateLiveParamsRequest = {
|
|
|
1772
1811
|
[key: string]: unknown;
|
|
1773
1812
|
};
|
|
1774
1813
|
};
|
|
1814
|
+
type SendLiveCommandRequest = {
|
|
1815
|
+
/**
|
|
1816
|
+
* The command's text — non-blank.
|
|
1817
|
+
*/
|
|
1818
|
+
command: string;
|
|
1819
|
+
/**
|
|
1820
|
+
* An optional map of your own choosing, alongside command. Absent means none; when given, it must be a JSON object, and `command` and `properties` are the only keys the body may carry. Each entry lands as a top-level entry on the strategy's `CommandRequest` — no key is off limits, since the command's own text is kept separately.
|
|
1821
|
+
*/
|
|
1822
|
+
properties?: {
|
|
1823
|
+
[key: string]: unknown;
|
|
1824
|
+
};
|
|
1825
|
+
};
|
|
1775
1826
|
/**
|
|
1776
1827
|
* A live run's full state, as returned by starting, reading, or stopping it through its strategy.
|
|
1777
1828
|
*/
|
|
@@ -1785,11 +1836,11 @@ type LiveRun = {
|
|
|
1785
1836
|
description?: string;
|
|
1786
1837
|
visibility: "private" | "public";
|
|
1787
1838
|
/**
|
|
1788
|
-
* A new run always starts `SANDBOX
|
|
1839
|
+
* A new run always 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.
|
|
1789
1840
|
*/
|
|
1790
1841
|
stage: "SANDBOX" | "LIVE";
|
|
1791
1842
|
/**
|
|
1792
|
-
* `STARTING`
|
|
1843
|
+
* The run's health right now: `STARTING` (no runner has reported on it yet), `RUNNING`, `LAGGING` (behind the market data, usually while catching up; clears by itself), `HUNG` (stuck inside one strategy call for longer than allowed; clears when it returns), `DEGRADED` (its independent executions produced different signals), `FAILED` (refused, could not start or failed while running; `reason` says why) or `STOPPED`. `LAGGING`, `HUNG` and `DEGRADED` come and go on a running run. The set may grow: read an unknown value as a running run with something to look at. See the Live execution guide.
|
|
1793
1844
|
*/
|
|
1794
1845
|
state: string;
|
|
1795
1846
|
/**
|
|
@@ -1797,7 +1848,17 @@ type LiveRun = {
|
|
|
1797
1848
|
*/
|
|
1798
1849
|
desired: "RUNNING" | "STOPPED";
|
|
1799
1850
|
/**
|
|
1800
|
-
*
|
|
1851
|
+
* Why the run stopped or failed, when there is something to say; absent otherwise. It is never a
|
|
1852
|
+
* stack trace or an internal message. Either `resource: ...` (the platform stopped the run for
|
|
1853
|
+
* exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for
|
|
1854
|
+
* a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's
|
|
1855
|
+
* definition was refused, the run could not start after several attempts, the strategy failed while
|
|
1856
|
+
* processing data, the run lost its data feed, or the generic `The run failed.`. The set may grow:
|
|
1857
|
+
* read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays
|
|
1858
|
+
* `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your
|
|
1859
|
+
* live-run limit) until then; one that can never run because its strategy cannot consume its source
|
|
1860
|
+
* type is stopped by the platform itself (`desired: STOPPED`), so it holds no place.
|
|
1861
|
+
*
|
|
1801
1862
|
*/
|
|
1802
1863
|
reason?: string;
|
|
1803
1864
|
sources: Array<LiveSource>;
|
|
@@ -1809,7 +1870,7 @@ type LiveRun = {
|
|
|
1809
1870
|
*/
|
|
1810
1871
|
paramsVersion: number;
|
|
1811
1872
|
/**
|
|
1812
|
-
* Whether this run's signals are
|
|
1873
|
+
* Whether this run's signals are relayed over the WebSocket channel described in the "Live execution" guide. It is the value requested at start, in either stage.
|
|
1813
1874
|
*/
|
|
1814
1875
|
relay: boolean;
|
|
1815
1876
|
/**
|
|
@@ -1817,7 +1878,7 @@ type LiveRun = {
|
|
|
1817
1878
|
*/
|
|
1818
1879
|
startedAtMs: number;
|
|
1819
1880
|
/**
|
|
1820
|
-
* The sandbox trial's promotion verdict
|
|
1881
|
+
* 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.
|
|
1821
1882
|
*/
|
|
1822
1883
|
gate?: {
|
|
1823
1884
|
[key: string]: unknown;
|
|
@@ -1852,17 +1913,31 @@ type LiveRunSummary = {
|
|
|
1852
1913
|
description?: string;
|
|
1853
1914
|
visibility: "private" | "public";
|
|
1854
1915
|
/**
|
|
1855
|
-
* A new run always starts `SANDBOX
|
|
1916
|
+
* A new run always 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.
|
|
1856
1917
|
*/
|
|
1857
1918
|
stage: "SANDBOX" | "LIVE";
|
|
1858
1919
|
/**
|
|
1859
|
-
* `STARTING`
|
|
1920
|
+
* The run's health right now: `STARTING` (no runner has reported on it yet), `RUNNING`, `LAGGING` (behind the market data, usually while catching up; clears by itself), `HUNG` (stuck inside one strategy call for longer than allowed; clears when it returns), `DEGRADED` (its independent executions produced different signals), `FAILED` (refused, could not start or failed while running; `reason` says why) or `STOPPED`. `LAGGING`, `HUNG` and `DEGRADED` come and go on a running run. The set may grow: read an unknown value as a running run with something to look at. See the Live execution guide.
|
|
1860
1921
|
*/
|
|
1861
1922
|
state: string;
|
|
1862
1923
|
/**
|
|
1863
1924
|
* What you last asked for. `state` can lag this briefly after `DELETE`.
|
|
1864
1925
|
*/
|
|
1865
1926
|
desired: "RUNNING" | "STOPPED";
|
|
1927
|
+
/**
|
|
1928
|
+
* Why the run stopped or failed, when there is something to say; absent otherwise. It is never a
|
|
1929
|
+
* stack trace or an internal message. Either `resource: ...` (the platform stopped the run for
|
|
1930
|
+
* exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for
|
|
1931
|
+
* a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's
|
|
1932
|
+
* definition was refused, the run could not start after several attempts, the strategy failed while
|
|
1933
|
+
* processing data, the run lost its data feed, or the generic `The run failed.`. The set may grow:
|
|
1934
|
+
* read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays
|
|
1935
|
+
* `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your
|
|
1936
|
+
* live-run limit) until then; one that can never run because its strategy cannot consume its source
|
|
1937
|
+
* type is stopped by the platform itself (`desired: STOPPED`), so it holds no place.
|
|
1938
|
+
*
|
|
1939
|
+
*/
|
|
1940
|
+
reason?: string;
|
|
1866
1941
|
sources: Array<LiveSource>;
|
|
1867
1942
|
/**
|
|
1868
1943
|
* Epoch milliseconds this run was started.
|
|
@@ -2055,7 +2130,7 @@ type LiveSignal = {
|
|
|
2055
2130
|
instrument: LiveSignalInstrument | null;
|
|
2056
2131
|
order?: LiveSignalOrder;
|
|
2057
2132
|
/**
|
|
2058
|
-
* The signal's own free-form payload.
|
|
2133
|
+
* The signal's own free-form payload, what the strategy put there with `signal.set(...)`. Whoever may read the run may read it, so on a `public` run it is public. A signal whose `data` is over 8 KiB (8,192 bytes of its JSON) is not pushed on the WebSocket channel, and `GET /live/{runId}/signals` returns it whole.
|
|
2059
2134
|
*/
|
|
2060
2135
|
data?: {
|
|
2061
2136
|
[key: string]: unknown;
|
|
@@ -2102,6 +2177,17 @@ type LiveParamsUpdateResult = {
|
|
|
2102
2177
|
*/
|
|
2103
2178
|
effectiveAtMs: number;
|
|
2104
2179
|
};
|
|
2180
|
+
type LiveCommandResult = {
|
|
2181
|
+
runId: string;
|
|
2182
|
+
/**
|
|
2183
|
+
* This command's own id, generated fresh for this call. A retried request is a second, distinct command — this endpoint takes no idempotency key.
|
|
2184
|
+
*/
|
|
2185
|
+
commandId: string;
|
|
2186
|
+
/**
|
|
2187
|
+
* Epoch milliseconds — the market position every execution applies this command at.
|
|
2188
|
+
*/
|
|
2189
|
+
effectiveAtMs: number;
|
|
2190
|
+
};
|
|
2105
2191
|
type AuthenticateData = {
|
|
2106
2192
|
body?: never;
|
|
2107
2193
|
path?: never;
|
|
@@ -2338,7 +2424,14 @@ type DownloadKlinesResponse = DownloadKlinesResponses[keyof DownloadKlinesRespon
|
|
|
2338
2424
|
type ListStrategiesData = {
|
|
2339
2425
|
body?: never;
|
|
2340
2426
|
path?: never;
|
|
2341
|
-
query?:
|
|
2427
|
+
query?: {
|
|
2428
|
+
/**
|
|
2429
|
+
* `true` also lists the strategies you have deleted, each with its `deletedAt`. Any other
|
|
2430
|
+
* value, or leaving it out, lists only the ones you have not deleted.
|
|
2431
|
+
*
|
|
2432
|
+
*/
|
|
2433
|
+
includeDeleted?: boolean;
|
|
2434
|
+
};
|
|
2342
2435
|
url: "/strategies";
|
|
2343
2436
|
};
|
|
2344
2437
|
type ListStrategiesResponses = {
|
|
@@ -2368,6 +2461,10 @@ type CompileStrategyErrors = {
|
|
|
2368
2461
|
*
|
|
2369
2462
|
*/
|
|
2370
2463
|
400: ResponseError;
|
|
2464
|
+
/**
|
|
2465
|
+
* The source is larger than 32 KiB (32768 bytes). Every endpoint that reads a request body caps it, and the message names the cap; see the Strategy guide.
|
|
2466
|
+
*/
|
|
2467
|
+
413: ResponseError;
|
|
2371
2468
|
/**
|
|
2372
2469
|
* Too many compilations in flight. Retry later.
|
|
2373
2470
|
*/
|
|
@@ -2619,7 +2716,9 @@ type ExecuteSweepData = {
|
|
|
2619
2716
|
type ExecuteSweepErrors = {
|
|
2620
2717
|
/**
|
|
2621
2718
|
* Invalid sweep specification, a `type` that cannot be swept yet (`funding`), or the
|
|
2622
|
-
* expanded grid exceeds the server limit.
|
|
2719
|
+
* expanded grid exceeds the server limit. A full `grid` with more combinations than your
|
|
2720
|
+
* plan allows (`maxSweepCartesian` in `GET /account`) is refused with a message that asks
|
|
2721
|
+
* for the `random` or `lhs` sampler.
|
|
2623
2722
|
*
|
|
2624
2723
|
*/
|
|
2625
2724
|
400: ResponseError;
|
|
@@ -2961,7 +3060,14 @@ type GetBacktestResultResponse = GetBacktestResultResponses[keyof GetBacktestRes
|
|
|
2961
3060
|
type ListDatasetsData = {
|
|
2962
3061
|
body?: never;
|
|
2963
3062
|
path?: never;
|
|
2964
|
-
query?:
|
|
3063
|
+
query?: {
|
|
3064
|
+
/**
|
|
3065
|
+
* `true` also lists the datasets you have deleted, each with its `deletedAt`. Any other
|
|
3066
|
+
* value, or leaving it out, lists only the ones you have not deleted.
|
|
3067
|
+
*
|
|
3068
|
+
*/
|
|
3069
|
+
includeDeleted?: boolean;
|
|
3070
|
+
};
|
|
2965
3071
|
url: "/datasets";
|
|
2966
3072
|
};
|
|
2967
3073
|
type ListDatasetsResponses = {
|
|
@@ -3118,7 +3224,7 @@ type FinalizeDatasetUploadErrors = {
|
|
|
3118
3224
|
*/
|
|
3119
3225
|
409: ResponseError;
|
|
3120
3226
|
/**
|
|
3121
|
-
* The uploaded file
|
|
3227
|
+
* The uploaded file is many times your tier's size limit for a dataset. The limit itself applies to the stored size, which is known only after conversion, so an upload that passes here can still end `failed` when ingest finishes.
|
|
3122
3228
|
*/
|
|
3123
3229
|
413: ResponseError;
|
|
3124
3230
|
/**
|
|
@@ -3304,7 +3410,7 @@ type StartLiveData = {
|
|
|
3304
3410
|
};
|
|
3305
3411
|
type StartLiveErrors = {
|
|
3306
3412
|
/**
|
|
3307
|
-
* Malformed `sources` (not exactly one entry, missing field, unsupported `type`), 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.
|
|
3413
|
+
* 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.
|
|
3308
3414
|
*/
|
|
3309
3415
|
400: ResponseError;
|
|
3310
3416
|
/**
|
|
@@ -3436,7 +3542,7 @@ type UpdateLiveParamsErrors = {
|
|
|
3436
3542
|
*/
|
|
3437
3543
|
404: ResponseError;
|
|
3438
3544
|
/**
|
|
3439
|
-
* This run's
|
|
3545
|
+
* This run's compiled strategy has no record of the parameters it declares. Register the strategy again with `POST /strategy` and start a new run, since a run keeps the compiled version it started with.
|
|
3440
3546
|
*/
|
|
3441
3547
|
409: ResponseError;
|
|
3442
3548
|
};
|
|
@@ -3448,6 +3554,48 @@ type UpdateLiveParamsResponses = {
|
|
|
3448
3554
|
200: LiveParamsUpdateResult;
|
|
3449
3555
|
};
|
|
3450
3556
|
type UpdateLiveParamsResponse = UpdateLiveParamsResponses[keyof UpdateLiveParamsResponses];
|
|
3557
|
+
type SendLiveCommandData = {
|
|
3558
|
+
body: SendLiveCommandRequest;
|
|
3559
|
+
path: {
|
|
3560
|
+
runId: string;
|
|
3561
|
+
};
|
|
3562
|
+
query?: never;
|
|
3563
|
+
url: "/live/{runId}/commands";
|
|
3564
|
+
};
|
|
3565
|
+
type SendLiveCommandErrors = {
|
|
3566
|
+
/**
|
|
3567
|
+
* `command` missing, not a string, blank; `properties` given but not an object; or the body carries any key other than `command` and `properties`.
|
|
3568
|
+
*/
|
|
3569
|
+
400: ResponseError;
|
|
3570
|
+
/**
|
|
3571
|
+
* No such run, or you do not own it.
|
|
3572
|
+
*/
|
|
3573
|
+
404: ResponseError;
|
|
3574
|
+
/**
|
|
3575
|
+
* One of three reasons, each its own message: the run is not running, so there is nothing to tell;
|
|
3576
|
+
* this run's compiled strategy has no record of whether it handles commands — register the strategy
|
|
3577
|
+
* again with `POST /strategy` and start a new run, since a run keeps the compiled version it started
|
|
3578
|
+
* with; or the strategy does not implement `CommandRequestHandler` at all.
|
|
3579
|
+
*
|
|
3580
|
+
*/
|
|
3581
|
+
409: ResponseError;
|
|
3582
|
+
/**
|
|
3583
|
+
* The request body is larger than 2 KiB (2048 bytes). Every endpoint that reads a request body caps it, and the message names the cap.
|
|
3584
|
+
*/
|
|
3585
|
+
413: ResponseError;
|
|
3586
|
+
/**
|
|
3587
|
+
* The command could not be delivered right now, and it was not sent — unlike a parameter update, a command has no fallback path. Try again.
|
|
3588
|
+
*/
|
|
3589
|
+
503: ResponseError;
|
|
3590
|
+
};
|
|
3591
|
+
type SendLiveCommandError = SendLiveCommandErrors[keyof SendLiveCommandErrors];
|
|
3592
|
+
type SendLiveCommandResponses = {
|
|
3593
|
+
/**
|
|
3594
|
+
* Accepted — on its way to every execution behind the run.
|
|
3595
|
+
*/
|
|
3596
|
+
202: LiveCommandResult;
|
|
3597
|
+
};
|
|
3598
|
+
type SendLiveCommandResponse = SendLiveCommandResponses[keyof SendLiveCommandResponses];
|
|
3451
3599
|
type GetLiveRunSignalsData = {
|
|
3452
3600
|
body?: never;
|
|
3453
3601
|
path: {
|
|
@@ -3707,6 +3855,10 @@ declare const downloadKlines: <ThrowOnError extends boolean = false>(options: Op
|
|
|
3707
3855
|
* many strategies you have. Check a specific strategy's validation with `GET
|
|
3708
3856
|
* /strategy/{strategyId}`.
|
|
3709
3857
|
*
|
|
3858
|
+
* With `includeDeleted=true`, strategies you have deleted are listed too, each with the
|
|
3859
|
+
* `deletedAt` it was deleted at — useful to keep a copy of your list in sync, telling a
|
|
3860
|
+
* deleted strategy apart from one that never existed.
|
|
3861
|
+
*
|
|
3710
3862
|
*/
|
|
3711
3863
|
declare const listStrategies: <ThrowOnError extends boolean = false>(options?: Options<ListStrategiesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
3712
3864
|
strategies: Array<StrategySummary>;
|
|
@@ -3728,6 +3880,11 @@ declare const listStrategies: <ThrowOnError extends boolean = false>(options?: O
|
|
|
3728
3880
|
* included, is read from `GET /strategy/{strategyId}`. One place to ask, so there is no second
|
|
3729
3881
|
* answer to keep in step.
|
|
3730
3882
|
*
|
|
3883
|
+
* A `200` means the source parsed and compiled, not that it will run. What only shows once the
|
|
3884
|
+
* strategy sets up its indicators is found by `validate`: for QTScript, a window on an indicator
|
|
3885
|
+
* name that is not registered (`window nosuch m1 { ... }`) registers, and `validate` ends `failed`
|
|
3886
|
+
* on that line.
|
|
3887
|
+
*
|
|
3731
3888
|
* For **Java**, the `strategyId` is derived from what the code *means*, not from how it is
|
|
3732
3889
|
* written. Adding a comment, inserting a blank line, re-indenting, reordering imports, or
|
|
3733
3890
|
* moving a method around all return the **same** id — you have not created a second strategy.
|
|
@@ -4021,6 +4178,10 @@ declare const getBacktestResult: <ThrowOnError extends boolean = false>(options:
|
|
|
4021
4178
|
* Every dataset you have created and not deleted, most recently created first. Never a `404`
|
|
4022
4179
|
* — an empty array if you have none, same convention as `GET /strategies`.
|
|
4023
4180
|
*
|
|
4181
|
+
* With `includeDeleted=true`, datasets you have deleted are listed too, each with the
|
|
4182
|
+
* `deletedAt` it was deleted at — useful to keep a copy of your list in sync, telling a
|
|
4183
|
+
* deleted dataset apart from one that never existed.
|
|
4184
|
+
*
|
|
4024
4185
|
*/
|
|
4025
4186
|
declare const listDatasets: <ThrowOnError extends boolean = false>(options?: Options<ListDatasetsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
4026
4187
|
datasets: Array<Dataset>;
|
|
@@ -4214,8 +4375,9 @@ declare const startLive: <ThrowOnError extends boolean = false>(options: Options
|
|
|
4214
4375
|
declare const listLive: <ThrowOnError extends boolean = false>(options?: Options<ListLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveListResponse, ResponseError, ThrowOnError>;
|
|
4215
4376
|
/**
|
|
4216
4377
|
* Browse public live runs
|
|
4217
|
-
* Every run whose owner marked it `public
|
|
4218
|
-
* yours included, and listed without revealing who owns it.
|
|
4378
|
+
* Every run whose owner marked it `public`, that has been promoted to `live` and is running —
|
|
4379
|
+
* anyone's, yours included, and listed without revealing who owns it. A `public` run still in
|
|
4380
|
+
* its `sandbox` trial is not listed. Most recently started first.
|
|
4219
4381
|
*
|
|
4220
4382
|
* This is the only `Live Execution` endpoint that needs no `Authorization` header.
|
|
4221
4383
|
*
|
|
@@ -4248,6 +4410,24 @@ declare const updateLive: <ThrowOnError extends boolean = false>(options: Option
|
|
|
4248
4410
|
*
|
|
4249
4411
|
*/
|
|
4250
4412
|
declare const updateLiveParams: <ThrowOnError extends boolean = false>(options: Options<UpdateLiveParamsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveParamsUpdateResult, ResponseError, ThrowOnError>;
|
|
4413
|
+
/**
|
|
4414
|
+
* Tell a running strategy a command
|
|
4415
|
+
* Tells a running strategy something **while it stays live**, without restarting it — for a strategy that
|
|
4416
|
+
* implements the engine's `CommandRequestHandler`. Owner only.
|
|
4417
|
+
*
|
|
4418
|
+
* A command is an event, not a stored setting: it is delivered once to every execution behind the run, at
|
|
4419
|
+
* the same market position, and nothing about it is written to the run's state. **It is transient** — a
|
|
4420
|
+
* replica that restarts replays only its recent market history, so a command from before that only reaches
|
|
4421
|
+
* one that was already running when it arrived. Anything the strategy needs to remember across a restart
|
|
4422
|
+
* belongs in a parameter (`PUT /live/{runId}/params`), which does have a stored value; a command does not.
|
|
4423
|
+
*
|
|
4424
|
+
* The command's text is a plain string; an optional `properties` object of your own choosing travels
|
|
4425
|
+
* alongside it. Each entry lands as a top-level entry on the `CommandRequest` the handler receives —
|
|
4426
|
+
* `request.get("<key>")` in Java, `$command.<key>` sugar in QTScript — no key is off limits, since the
|
|
4427
|
+
* command's own text is kept separately.
|
|
4428
|
+
*
|
|
4429
|
+
*/
|
|
4430
|
+
declare const sendLiveCommand: <ThrowOnError extends boolean = false>(options: Options<SendLiveCommandData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveCommandResult, ResponseError, ThrowOnError>;
|
|
4251
4431
|
/**
|
|
4252
4432
|
* Read a run's signals
|
|
4253
4433
|
* Returns one page of the signals a run has already produced, newest-last, optionally from a
|
|
@@ -4271,8 +4451,9 @@ declare const updateLiveParams: <ThrowOnError extends boolean = false>(options:
|
|
|
4271
4451
|
* serving a shortened page that looks complete. Treat that as a normal outcome: read
|
|
4272
4452
|
* `availableSinceMs` from the error and start again from there.
|
|
4273
4453
|
*
|
|
4274
|
-
* Readable by the run's owner, and by anyone if the run is `public`
|
|
4275
|
-
* signal channel applies to a subscription.
|
|
4454
|
+
* Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
|
|
4455
|
+
* stage — the same rule the signal channel applies to a subscription. A `sandbox` run is read
|
|
4456
|
+
* by its owner only, whatever visibility it asked for.
|
|
4276
4457
|
*
|
|
4277
4458
|
*/
|
|
4278
4459
|
declare const getLiveRunSignals: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunSignalsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveSignalPage, ResponseError, ThrowOnError>;
|
|
@@ -4288,8 +4469,8 @@ declare const getLiveRunSignals: <ThrowOnError extends boolean = false>(options:
|
|
|
4288
4469
|
* mark`, taken every minute of market time). Until either exists the account holds its
|
|
4289
4470
|
* starting capital.
|
|
4290
4471
|
*
|
|
4291
|
-
* Readable by the run's owner, and by anyone if the run is `public
|
|
4292
|
-
* a `paper` block answers `404`.
|
|
4472
|
+
* Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
|
|
4473
|
+
* stage. A run started without a `paper` block answers `404`.
|
|
4293
4474
|
*
|
|
4294
4475
|
*/
|
|
4295
4476
|
declare const getLiveRunPaper: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunPaperData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LivePaper, ResponseError, ThrowOnError>;
|
|
@@ -4304,7 +4485,8 @@ declare const getLiveRunPaper: <ThrowOnError extends boolean = false>(options: O
|
|
|
4304
4485
|
* `currency` narrows to one account; without it, every account's points come interleaved by
|
|
4305
4486
|
* time, each carrying its currency.
|
|
4306
4487
|
*
|
|
4307
|
-
* Readable by the run's owner, and by anyone if the run is `public
|
|
4488
|
+
* Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
|
|
4489
|
+
* stage.
|
|
4308
4490
|
*
|
|
4309
4491
|
*/
|
|
4310
4492
|
declare const getLiveRunPaperEquity: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunPaperEquityData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LivePaperEquityPage, ResponseError, ThrowOnError>;
|
|
@@ -4320,4 +4502,4 @@ declare const mintLiveConnectionToken: <ThrowOnError extends boolean = false>(op
|
|
|
4320
4502
|
|
|
4321
4503
|
declare const client: _hey_api_client_fetch.Client;
|
|
4322
4504
|
|
|
4323
|
-
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 GetLiveRunPaperData, type GetLiveRunPaperEquityData, type GetLiveRunPaperEquityError, type GetLiveRunPaperEquityErrors, type GetLiveRunPaperEquityResponse, type GetLiveRunPaperEquityResponses, type GetLiveRunPaperError, type GetLiveRunPaperErrors, type GetLiveRunPaperResponse, type GetLiveRunPaperResponses, 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 LiveConnectionToken, type LiveListResponse, type LivePaper, type LivePaperAccount, type LivePaperConfig, type LivePaperEquityPage, type LivePaperEquityPoint, type LivePaperKpi, type LivePaperPosition, type LiveParamsUpdateResult, type LiveRun, type LiveRunCompact, type LiveRunSummary, type LiveSignal, type LiveSignalInstrument, type LiveSignalOrder, type LiveSignalPage, type LiveSource, 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 ScalarStrategyParamValue, 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, authenticate, cancelBacktest, cancelSweep, client, compileStrategy, createDataset, deleteDataset, deleteStrategy, downloadKlines, downloadTickers, executeBacktest, executeSweep, finalizeDatasetUpload, getAccount, getAccountUsage, getBacktestResult, getDataset, getDatasetImport, getDatasetUpload, getLive, getLiveRunPaper, getLiveRunPaperEquity, getLiveRunSignals, getPrepareStatus, getStrategy, getStrategyCode, getSweepResult, getSweepRunEquityCurve, getSweepSensitivity, importDataset, listDatasets, listExchanges, listInstruments, listLive, listPublicLive, listSegmentInstruments, listStrategies, mintLiveConnectionToken, openDatasetUpload, prepareBacktest, startLive, stopLive, updateLive, updateLiveParams, validateStrategy };
|
|
4505
|
+
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 GetLiveRunPaperData, type GetLiveRunPaperEquityData, type GetLiveRunPaperEquityError, type GetLiveRunPaperEquityErrors, type GetLiveRunPaperEquityResponse, type GetLiveRunPaperEquityResponses, type GetLiveRunPaperError, type GetLiveRunPaperErrors, type GetLiveRunPaperResponse, type GetLiveRunPaperResponses, 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 LiveRunSummary, type LiveSignal, type LiveSignalInstrument, type LiveSignalOrder, type LiveSignalPage, type LiveSource, 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 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, authenticate, cancelBacktest, cancelSweep, client, compileStrategy, createDataset, deleteDataset, deleteStrategy, downloadKlines, downloadTickers, executeBacktest, executeSweep, finalizeDatasetUpload, getAccount, getAccountUsage, getBacktestResult, getDataset, getDatasetImport, getDatasetUpload, getLive, getLiveRunPaper, getLiveRunPaperEquity, getLiveRunSignals, getPrepareStatus, getStrategy, getStrategyCode, getSweepResult, getSweepRunEquityCurve, getSweepSensitivity, importDataset, listDatasets, listExchanges, listInstruments, listLive, listPublicLive, listSegmentInstruments, listStrategies, mintLiveConnectionToken, openDatasetUpload, prepareBacktest, sendLiveCommand, startLive, stopLive, updateLive, updateLiveParams, validateStrategy };
|
package/dist/index.js
CHANGED
|
@@ -491,6 +491,22 @@ var updateLiveParams = (options) => {
|
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
493
|
};
|
|
494
|
+
var sendLiveCommand = (options) => {
|
|
495
|
+
return (options.client ?? client).post({
|
|
496
|
+
security: [
|
|
497
|
+
{
|
|
498
|
+
scheme: "bearer",
|
|
499
|
+
type: "http"
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
url: "/live/{runId}/commands",
|
|
503
|
+
...options,
|
|
504
|
+
headers: {
|
|
505
|
+
"Content-Type": "application/json",
|
|
506
|
+
...options?.headers
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
};
|
|
494
510
|
var getLiveRunSignals = (options) => {
|
|
495
511
|
return (options.client ?? client).get({
|
|
496
512
|
security: [
|
|
@@ -580,6 +596,7 @@ export {
|
|
|
580
596
|
mintLiveConnectionToken,
|
|
581
597
|
openDatasetUpload,
|
|
582
598
|
prepareBacktest,
|
|
599
|
+
sendLiveCommand,
|
|
583
600
|
startLive,
|
|
584
601
|
stopLive,
|
|
585
602
|
updateLive,
|