@qtsurfer/api-client 0.18.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 +31 -12
- package/dist/index.d.ts +467 -26
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +428 -15
- package/src/generated/sdk.gen.ts +145 -4
- package/src/generated/types.gen.ts +418 -21
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
|
|
@@ -513,6 +540,9 @@ type SweepBaseConfig = {
|
|
|
513
540
|
buyFeeRate?: number;
|
|
514
541
|
sellFeeRate?: number;
|
|
515
542
|
feeLeg?: "RECEIVED" | "QUOTE" | "BASE";
|
|
543
|
+
/**
|
|
544
|
+
* Share of the free balance each entry locks, in percent (0-100]. Omitted, a backtest sizes every entry with everything available.
|
|
545
|
+
*/
|
|
516
546
|
percentAmountToLock?: number;
|
|
517
547
|
};
|
|
518
548
|
type ExecuteSweepRequest = {
|
|
@@ -1155,6 +1185,12 @@ type StrategySummary = {
|
|
|
1155
1185
|
*
|
|
1156
1186
|
*/
|
|
1157
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;
|
|
1158
1194
|
};
|
|
1159
1195
|
/**
|
|
1160
1196
|
* What is known about a registered strategy: that it compiled, and what validating it found.
|
|
@@ -1266,6 +1302,12 @@ type Dataset = {
|
|
|
1266
1302
|
*
|
|
1267
1303
|
*/
|
|
1268
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;
|
|
1269
1311
|
/**
|
|
1270
1312
|
* When `currentVersionId` last changed. Absent until it has a value.
|
|
1271
1313
|
*/
|
|
@@ -1706,15 +1748,55 @@ type StartLiveRequest = {
|
|
|
1706
1748
|
[key: string]: unknown;
|
|
1707
1749
|
};
|
|
1708
1750
|
/**
|
|
1709
|
-
* 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.
|
|
1710
1752
|
*/
|
|
1711
1753
|
visibility?: "private" | "public";
|
|
1712
1754
|
/**
|
|
1713
|
-
* 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.
|
|
1714
1756
|
*/
|
|
1715
1757
|
relay?: boolean;
|
|
1716
1758
|
name?: string;
|
|
1717
1759
|
description?: string;
|
|
1760
|
+
paper?: LivePaperConfig;
|
|
1761
|
+
};
|
|
1762
|
+
/**
|
|
1763
|
+
* Paper trading for this run: the same economics as a backtest's `baseConfig` (same fields,
|
|
1764
|
+
* defaults and limits), plus `output`. An empty object takes every default. Each quote
|
|
1765
|
+
* currency the run trades gets its own simulated account, opened with `initialFunding` in
|
|
1766
|
+
* that currency; accounts are never added together. As returned on a run, the block is
|
|
1767
|
+
* normalised: `feeRate` is resolved into `buyFeeRate`/`sellFeeRate` and defaults are filled
|
|
1768
|
+
* in.
|
|
1769
|
+
*
|
|
1770
|
+
*/
|
|
1771
|
+
type LivePaperConfig = {
|
|
1772
|
+
/**
|
|
1773
|
+
* Starting capital of each account, in that account's own quote currency.
|
|
1774
|
+
*/
|
|
1775
|
+
initialFunding?: number;
|
|
1776
|
+
/**
|
|
1777
|
+
* Fee rate for both sides (0.001 = 0.1%). Accepted on start; returned resolved into the two fields below.
|
|
1778
|
+
*/
|
|
1779
|
+
feeRate?: number;
|
|
1780
|
+
/**
|
|
1781
|
+
* Buy-side fee rate; overrides `feeRate`.
|
|
1782
|
+
*/
|
|
1783
|
+
buyFeeRate?: number;
|
|
1784
|
+
/**
|
|
1785
|
+
* Sell-side fee rate; overrides `feeRate`.
|
|
1786
|
+
*/
|
|
1787
|
+
sellFeeRate?: number;
|
|
1788
|
+
/**
|
|
1789
|
+
* Which asset fees are charged in. Case-insensitive on start.
|
|
1790
|
+
*/
|
|
1791
|
+
feeLeg?: "RECEIVED" | "QUOTE" | "BASE";
|
|
1792
|
+
/**
|
|
1793
|
+
* Share of the account's free balance each entry locks, in percent. Omitted, the strategy's own setting applies, and without one 10%.
|
|
1794
|
+
*/
|
|
1795
|
+
percentAmountToLock?: number;
|
|
1796
|
+
/**
|
|
1797
|
+
* `separate` keeps paper output out of the run's signals (read it with `GET /live/{runId}/paper`); `mix` also interleaves it into the run's signals as `type: paper`, right after the signal that caused it.
|
|
1798
|
+
*/
|
|
1799
|
+
output?: "separate" | "mix";
|
|
1718
1800
|
};
|
|
1719
1801
|
type UpdateLiveRequest = {
|
|
1720
1802
|
visibility?: "private" | "public";
|
|
@@ -1729,6 +1811,18 @@ type UpdateLiveParamsRequest = {
|
|
|
1729
1811
|
[key: string]: unknown;
|
|
1730
1812
|
};
|
|
1731
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
|
+
};
|
|
1732
1826
|
/**
|
|
1733
1827
|
* A live run's full state, as returned by starting, reading, or stopping it through its strategy.
|
|
1734
1828
|
*/
|
|
@@ -1742,11 +1836,11 @@ type LiveRun = {
|
|
|
1742
1836
|
description?: string;
|
|
1743
1837
|
visibility: "private" | "public";
|
|
1744
1838
|
/**
|
|
1745
|
-
* 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.
|
|
1746
1840
|
*/
|
|
1747
1841
|
stage: "SANDBOX" | "LIVE";
|
|
1748
1842
|
/**
|
|
1749
|
-
* `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.
|
|
1750
1844
|
*/
|
|
1751
1845
|
state: string;
|
|
1752
1846
|
/**
|
|
@@ -1754,7 +1848,17 @@ type LiveRun = {
|
|
|
1754
1848
|
*/
|
|
1755
1849
|
desired: "RUNNING" | "STOPPED";
|
|
1756
1850
|
/**
|
|
1757
|
-
*
|
|
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
|
+
*
|
|
1758
1862
|
*/
|
|
1759
1863
|
reason?: string;
|
|
1760
1864
|
sources: Array<LiveSource>;
|
|
@@ -1766,7 +1870,7 @@ type LiveRun = {
|
|
|
1766
1870
|
*/
|
|
1767
1871
|
paramsVersion: number;
|
|
1768
1872
|
/**
|
|
1769
|
-
* 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.
|
|
1770
1874
|
*/
|
|
1771
1875
|
relay: boolean;
|
|
1772
1876
|
/**
|
|
@@ -1774,11 +1878,15 @@ type LiveRun = {
|
|
|
1774
1878
|
*/
|
|
1775
1879
|
startedAtMs: number;
|
|
1776
1880
|
/**
|
|
1777
|
-
* 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.
|
|
1778
1882
|
*/
|
|
1779
1883
|
gate?: {
|
|
1780
1884
|
[key: string]: unknown;
|
|
1781
1885
|
};
|
|
1886
|
+
/**
|
|
1887
|
+
* The run's paper trading configuration as accepted at start, normalised. Absent when the run has no paper trading.
|
|
1888
|
+
*/
|
|
1889
|
+
paper?: LivePaperConfig;
|
|
1782
1890
|
};
|
|
1783
1891
|
/**
|
|
1784
1892
|
* A run's state as returned by `PATCH /live/{runId}` — narrower than `LiveRun` (no `strategyId`, `params`, or `desired`), since this endpoint is addressed by `runId` alone.
|
|
@@ -1805,17 +1913,31 @@ type LiveRunSummary = {
|
|
|
1805
1913
|
description?: string;
|
|
1806
1914
|
visibility: "private" | "public";
|
|
1807
1915
|
/**
|
|
1808
|
-
* 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.
|
|
1809
1917
|
*/
|
|
1810
1918
|
stage: "SANDBOX" | "LIVE";
|
|
1811
1919
|
/**
|
|
1812
|
-
* `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.
|
|
1813
1921
|
*/
|
|
1814
1922
|
state: string;
|
|
1815
1923
|
/**
|
|
1816
1924
|
* What you last asked for. `state` can lag this briefly after `DELETE`.
|
|
1817
1925
|
*/
|
|
1818
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;
|
|
1819
1941
|
sources: Array<LiveSource>;
|
|
1820
1942
|
/**
|
|
1821
1943
|
* Epoch milliseconds this run was started.
|
|
@@ -1865,6 +1987,106 @@ type LiveSignalPage = {
|
|
|
1865
1987
|
availableSinceMs?: number;
|
|
1866
1988
|
_links?: PublicLiveListLinks;
|
|
1867
1989
|
};
|
|
1990
|
+
type LivePaper = {
|
|
1991
|
+
runId: string;
|
|
1992
|
+
stage: "SANDBOX" | "LIVE";
|
|
1993
|
+
accounts: Array<LivePaperAccount>;
|
|
1994
|
+
};
|
|
1995
|
+
/**
|
|
1996
|
+
* One simulated account — one per quote currency the run trades.
|
|
1997
|
+
*/
|
|
1998
|
+
type LivePaperAccount = {
|
|
1999
|
+
/**
|
|
2000
|
+
* The account's quote currency; every amount below is in it.
|
|
2001
|
+
*/
|
|
2002
|
+
currency: string;
|
|
2003
|
+
initialFunding: number;
|
|
2004
|
+
/**
|
|
2005
|
+
* Latest recorded equity — see `equityKind`.
|
|
2006
|
+
*/
|
|
2007
|
+
equity: number;
|
|
2008
|
+
/**
|
|
2009
|
+
* Market time of that value. Absent while the account holds its starting capital.
|
|
2010
|
+
*/
|
|
2011
|
+
equityAtMs?: number;
|
|
2012
|
+
/**
|
|
2013
|
+
* `equity` at a closed trade, `mark` at a periodic mark-to-market (includes open positions at market price).
|
|
2014
|
+
*/
|
|
2015
|
+
equityKind?: "equity" | "mark";
|
|
2016
|
+
/**
|
|
2017
|
+
* Sum of the PnL of the closed trades.
|
|
2018
|
+
*/
|
|
2019
|
+
realisedPnl: number;
|
|
2020
|
+
/**
|
|
2021
|
+
* Closed trades.
|
|
2022
|
+
*/
|
|
2023
|
+
trades: number;
|
|
2024
|
+
/**
|
|
2025
|
+
* Times open positions were lost because the run was restarted with them open.
|
|
2026
|
+
*/
|
|
2027
|
+
gaps: number;
|
|
2028
|
+
openPositions: Array<LivePaperPosition>;
|
|
2029
|
+
kpi?: LivePaperKpi;
|
|
2030
|
+
};
|
|
2031
|
+
type LivePaperPosition = {
|
|
2032
|
+
instrument: string;
|
|
2033
|
+
/**
|
|
2034
|
+
* Amount held, in the base asset.
|
|
2035
|
+
*/
|
|
2036
|
+
base: number;
|
|
2037
|
+
/**
|
|
2038
|
+
* What it cost, in the account's currency.
|
|
2039
|
+
*/
|
|
2040
|
+
cost: number;
|
|
2041
|
+
};
|
|
2042
|
+
/**
|
|
2043
|
+
* The same KPIs a backtest reports, over the trades closed so far. Absent until the first closed trade is recorded.
|
|
2044
|
+
*/
|
|
2045
|
+
type LivePaperKpi = {
|
|
2046
|
+
totalTrades?: number;
|
|
2047
|
+
winCount?: number;
|
|
2048
|
+
lossCount?: number;
|
|
2049
|
+
/**
|
|
2050
|
+
* Ratio (0.5 = half the trades won).
|
|
2051
|
+
*/
|
|
2052
|
+
winRate?: number;
|
|
2053
|
+
pnlTotal?: number;
|
|
2054
|
+
/**
|
|
2055
|
+
* Percent of `initialFunding` (0-100 scale).
|
|
2056
|
+
*/
|
|
2057
|
+
pnlTotalPercent?: number;
|
|
2058
|
+
sharpeRatio?: number | null;
|
|
2059
|
+
sortinoRatio?: number | null;
|
|
2060
|
+
/**
|
|
2061
|
+
* Ratio (0.15 for 15%).
|
|
2062
|
+
*/
|
|
2063
|
+
cagr?: number | null;
|
|
2064
|
+
maxDrawdown?: number;
|
|
2065
|
+
/**
|
|
2066
|
+
* Percent (0-100 scale).
|
|
2067
|
+
*/
|
|
2068
|
+
maxDrawdownPercent?: number;
|
|
2069
|
+
};
|
|
2070
|
+
type LivePaperEquityPage = {
|
|
2071
|
+
points: Array<LivePaperEquityPoint>;
|
|
2072
|
+
_links?: {
|
|
2073
|
+
next?: {
|
|
2074
|
+
href?: string;
|
|
2075
|
+
};
|
|
2076
|
+
};
|
|
2077
|
+
};
|
|
2078
|
+
type LivePaperEquityPoint = {
|
|
2079
|
+
currency: string;
|
|
2080
|
+
kind: "equity" | "mark" | "gap";
|
|
2081
|
+
/**
|
|
2082
|
+
* Market time of the point.
|
|
2083
|
+
*/
|
|
2084
|
+
eventTsMs: number;
|
|
2085
|
+
/**
|
|
2086
|
+
* Absent on a `gap`.
|
|
2087
|
+
*/
|
|
2088
|
+
equity?: number;
|
|
2089
|
+
};
|
|
1868
2090
|
/**
|
|
1869
2091
|
* One signal, in the same shape the real-time signal channel delivers.
|
|
1870
2092
|
*/
|
|
@@ -1886,9 +2108,12 @@ type LiveSignal = {
|
|
|
1886
2108
|
* The parameter set in force when this signal was produced.
|
|
1887
2109
|
*/
|
|
1888
2110
|
paramsVersion?: number;
|
|
1889
|
-
type: "hint" | "info" | "marker" | "command";
|
|
1890
2111
|
/**
|
|
1891
|
-
* `
|
|
2112
|
+
* `paper` items appear only for a run whose `paper.output` is `mix`; they are not relayed over the WebSocket channel.
|
|
2113
|
+
*/
|
|
2114
|
+
type: "hint" | "info" | "marker" | "command" | "paper";
|
|
2115
|
+
/**
|
|
2116
|
+
* `BUY`/`SELL` for a `hint`, the command name for a `command`; for `paper`, what the item is: `fill`, `trade`, `equity`, `mark`, `kpi` or `gap`. Absent otherwise.
|
|
1892
2117
|
*/
|
|
1893
2118
|
kind?: string | null;
|
|
1894
2119
|
/**
|
|
@@ -1899,10 +2124,13 @@ type LiveSignal = {
|
|
|
1899
2124
|
* Time it was published — always at or after `eventTsMs`.
|
|
1900
2125
|
*/
|
|
1901
2126
|
emittedAtMs: number;
|
|
1902
|
-
|
|
2127
|
+
/**
|
|
2128
|
+
* The instrument the signal is about. `null` only for a `paper` item about a whole account (`equity`, `mark`, `kpi`), whose `data.currency` names the account.
|
|
2129
|
+
*/
|
|
2130
|
+
instrument: LiveSignalInstrument | null;
|
|
1903
2131
|
order?: LiveSignalOrder;
|
|
1904
2132
|
/**
|
|
1905
|
-
* 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.
|
|
1906
2134
|
*/
|
|
1907
2135
|
data?: {
|
|
1908
2136
|
[key: string]: unknown;
|
|
@@ -1949,6 +2177,17 @@ type LiveParamsUpdateResult = {
|
|
|
1949
2177
|
*/
|
|
1950
2178
|
effectiveAtMs: number;
|
|
1951
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
|
+
};
|
|
1952
2191
|
type AuthenticateData = {
|
|
1953
2192
|
body?: never;
|
|
1954
2193
|
path?: never;
|
|
@@ -2185,7 +2424,14 @@ type DownloadKlinesResponse = DownloadKlinesResponses[keyof DownloadKlinesRespon
|
|
|
2185
2424
|
type ListStrategiesData = {
|
|
2186
2425
|
body?: never;
|
|
2187
2426
|
path?: never;
|
|
2188
|
-
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
|
+
};
|
|
2189
2435
|
url: "/strategies";
|
|
2190
2436
|
};
|
|
2191
2437
|
type ListStrategiesResponses = {
|
|
@@ -2215,6 +2461,10 @@ type CompileStrategyErrors = {
|
|
|
2215
2461
|
*
|
|
2216
2462
|
*/
|
|
2217
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;
|
|
2218
2468
|
/**
|
|
2219
2469
|
* Too many compilations in flight. Retry later.
|
|
2220
2470
|
*/
|
|
@@ -2466,7 +2716,9 @@ type ExecuteSweepData = {
|
|
|
2466
2716
|
type ExecuteSweepErrors = {
|
|
2467
2717
|
/**
|
|
2468
2718
|
* Invalid sweep specification, a `type` that cannot be swept yet (`funding`), or the
|
|
2469
|
-
* 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.
|
|
2470
2722
|
*
|
|
2471
2723
|
*/
|
|
2472
2724
|
400: ResponseError;
|
|
@@ -2808,7 +3060,14 @@ type GetBacktestResultResponse = GetBacktestResultResponses[keyof GetBacktestRes
|
|
|
2808
3060
|
type ListDatasetsData = {
|
|
2809
3061
|
body?: never;
|
|
2810
3062
|
path?: never;
|
|
2811
|
-
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
|
+
};
|
|
2812
3071
|
url: "/datasets";
|
|
2813
3072
|
};
|
|
2814
3073
|
type ListDatasetsResponses = {
|
|
@@ -2965,7 +3224,7 @@ type FinalizeDatasetUploadErrors = {
|
|
|
2965
3224
|
*/
|
|
2966
3225
|
409: ResponseError;
|
|
2967
3226
|
/**
|
|
2968
|
-
* 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.
|
|
2969
3228
|
*/
|
|
2970
3229
|
413: ResponseError;
|
|
2971
3230
|
/**
|
|
@@ -3151,7 +3410,7 @@ type StartLiveData = {
|
|
|
3151
3410
|
};
|
|
3152
3411
|
type StartLiveErrors = {
|
|
3153
3412
|
/**
|
|
3154
|
-
* Malformed `sources` (not exactly one entry, missing field, unsupported `type`), or an invalid `visibility
|
|
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.
|
|
3155
3414
|
*/
|
|
3156
3415
|
400: ResponseError;
|
|
3157
3416
|
/**
|
|
@@ -3283,7 +3542,7 @@ type UpdateLiveParamsErrors = {
|
|
|
3283
3542
|
*/
|
|
3284
3543
|
404: ResponseError;
|
|
3285
3544
|
/**
|
|
3286
|
-
* 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.
|
|
3287
3546
|
*/
|
|
3288
3547
|
409: ResponseError;
|
|
3289
3548
|
};
|
|
@@ -3295,6 +3554,48 @@ type UpdateLiveParamsResponses = {
|
|
|
3295
3554
|
200: LiveParamsUpdateResult;
|
|
3296
3555
|
};
|
|
3297
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];
|
|
3298
3599
|
type GetLiveRunSignalsData = {
|
|
3299
3600
|
body?: never;
|
|
3300
3601
|
path: {
|
|
@@ -3317,6 +3618,10 @@ type GetLiveRunSignalsData = {
|
|
|
3317
3618
|
*
|
|
3318
3619
|
*/
|
|
3319
3620
|
instrument?: string;
|
|
3621
|
+
/**
|
|
3622
|
+
* Narrow to one or more signal types, comma-separated (`hint`, `info`, `marker`, `command`, `paper`). Combines with `instrument`.
|
|
3623
|
+
*/
|
|
3624
|
+
type?: string;
|
|
3320
3625
|
/**
|
|
3321
3626
|
* Continue from a previous page's `_links.next`. Takes precedence over `sinceMs`.
|
|
3322
3627
|
*/
|
|
@@ -3330,7 +3635,7 @@ type GetLiveRunSignalsData = {
|
|
|
3330
3635
|
};
|
|
3331
3636
|
type GetLiveRunSignalsErrors = {
|
|
3332
3637
|
/**
|
|
3333
|
-
* `instrument`, `sinceMs`, `limit` or `cursor` is malformed.
|
|
3638
|
+
* `instrument`, `type`, `sinceMs`, `limit` or `cursor` is malformed.
|
|
3334
3639
|
*/
|
|
3335
3640
|
400: ResponseError;
|
|
3336
3641
|
/**
|
|
@@ -3350,6 +3655,68 @@ type GetLiveRunSignalsResponses = {
|
|
|
3350
3655
|
200: LiveSignalPage;
|
|
3351
3656
|
};
|
|
3352
3657
|
type GetLiveRunSignalsResponse = GetLiveRunSignalsResponses[keyof GetLiveRunSignalsResponses];
|
|
3658
|
+
type GetLiveRunPaperData = {
|
|
3659
|
+
body?: never;
|
|
3660
|
+
path: {
|
|
3661
|
+
runId: string;
|
|
3662
|
+
};
|
|
3663
|
+
query?: never;
|
|
3664
|
+
url: "/live/{runId}/paper";
|
|
3665
|
+
};
|
|
3666
|
+
type GetLiveRunPaperErrors = {
|
|
3667
|
+
/**
|
|
3668
|
+
* No such run, not one you may read, or a run without paper trading.
|
|
3669
|
+
*/
|
|
3670
|
+
404: ResponseError;
|
|
3671
|
+
};
|
|
3672
|
+
type GetLiveRunPaperError = GetLiveRunPaperErrors[keyof GetLiveRunPaperErrors];
|
|
3673
|
+
type GetLiveRunPaperResponses = {
|
|
3674
|
+
/**
|
|
3675
|
+
* The run's paper accounts
|
|
3676
|
+
*/
|
|
3677
|
+
200: LivePaper;
|
|
3678
|
+
};
|
|
3679
|
+
type GetLiveRunPaperResponse = GetLiveRunPaperResponses[keyof GetLiveRunPaperResponses];
|
|
3680
|
+
type GetLiveRunPaperEquityData = {
|
|
3681
|
+
body?: never;
|
|
3682
|
+
path: {
|
|
3683
|
+
runId: string;
|
|
3684
|
+
};
|
|
3685
|
+
query?: {
|
|
3686
|
+
/**
|
|
3687
|
+
* One account's quote currency, e.g. `USDT`.
|
|
3688
|
+
*/
|
|
3689
|
+
currency?: string;
|
|
3690
|
+
/**
|
|
3691
|
+
* Start from this market time (epoch ms). Ignored when `cursor` is given.
|
|
3692
|
+
*/
|
|
3693
|
+
sinceMs?: number;
|
|
3694
|
+
/**
|
|
3695
|
+
* Continue from a previous page's `_links.next`.
|
|
3696
|
+
*/
|
|
3697
|
+
cursor?: string;
|
|
3698
|
+
limit?: number;
|
|
3699
|
+
};
|
|
3700
|
+
url: "/live/{runId}/paper/equity";
|
|
3701
|
+
};
|
|
3702
|
+
type GetLiveRunPaperEquityErrors = {
|
|
3703
|
+
/**
|
|
3704
|
+
* `sinceMs`, `limit` or `cursor` is malformed.
|
|
3705
|
+
*/
|
|
3706
|
+
400: ResponseError;
|
|
3707
|
+
/**
|
|
3708
|
+
* No such run, not one you may read, or a run without paper trading.
|
|
3709
|
+
*/
|
|
3710
|
+
404: ResponseError;
|
|
3711
|
+
};
|
|
3712
|
+
type GetLiveRunPaperEquityError = GetLiveRunPaperEquityErrors[keyof GetLiveRunPaperEquityErrors];
|
|
3713
|
+
type GetLiveRunPaperEquityResponses = {
|
|
3714
|
+
/**
|
|
3715
|
+
* One page of the curve
|
|
3716
|
+
*/
|
|
3717
|
+
200: LivePaperEquityPage;
|
|
3718
|
+
};
|
|
3719
|
+
type GetLiveRunPaperEquityResponse = GetLiveRunPaperEquityResponses[keyof GetLiveRunPaperEquityResponses];
|
|
3353
3720
|
type MintLiveConnectionTokenData = {
|
|
3354
3721
|
body?: never;
|
|
3355
3722
|
path?: never;
|
|
@@ -3488,6 +3855,10 @@ declare const downloadKlines: <ThrowOnError extends boolean = false>(options: Op
|
|
|
3488
3855
|
* many strategies you have. Check a specific strategy's validation with `GET
|
|
3489
3856
|
* /strategy/{strategyId}`.
|
|
3490
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
|
+
*
|
|
3491
3862
|
*/
|
|
3492
3863
|
declare const listStrategies: <ThrowOnError extends boolean = false>(options?: Options<ListStrategiesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
3493
3864
|
strategies: Array<StrategySummary>;
|
|
@@ -3509,6 +3880,11 @@ declare const listStrategies: <ThrowOnError extends boolean = false>(options?: O
|
|
|
3509
3880
|
* included, is read from `GET /strategy/{strategyId}`. One place to ask, so there is no second
|
|
3510
3881
|
* answer to keep in step.
|
|
3511
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
|
+
*
|
|
3512
3888
|
* For **Java**, the `strategyId` is derived from what the code *means*, not from how it is
|
|
3513
3889
|
* written. Adding a comment, inserting a blank line, re-indenting, reordering imports, or
|
|
3514
3890
|
* moving a method around all return the **same** id — you have not created a second strategy.
|
|
@@ -3802,6 +4178,10 @@ declare const getBacktestResult: <ThrowOnError extends boolean = false>(options:
|
|
|
3802
4178
|
* Every dataset you have created and not deleted, most recently created first. Never a `404`
|
|
3803
4179
|
* — an empty array if you have none, same convention as `GET /strategies`.
|
|
3804
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
|
+
*
|
|
3805
4185
|
*/
|
|
3806
4186
|
declare const listDatasets: <ThrowOnError extends boolean = false>(options?: Options<ListDatasetsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
3807
4187
|
datasets: Array<Dataset>;
|
|
@@ -3975,6 +4355,14 @@ declare const getLive: <ThrowOnError extends boolean = false>(options: Options<G
|
|
|
3975
4355
|
* the "Live execution" guide linked from this tag's description for the full flow (minting a
|
|
3976
4356
|
* connection token, the channel and RPC method).
|
|
3977
4357
|
*
|
|
4358
|
+
* **Paper trading.** Pass a `paper` block to have the run's hints executed in simulation from
|
|
4359
|
+
* its first tick, as a backtest would execute them: fills, closed trades, equity and KPIs,
|
|
4360
|
+
* with one simulated account per quote currency. Omitted, the run has no paper trading. It
|
|
4361
|
+
* takes the same economics as a backtest's `baseConfig` plus where its output goes; read it
|
|
4362
|
+
* back with `GET /live/{runId}/paper`. A strategy that listens to its own execution events
|
|
4363
|
+
* (it overrides `getExecutionCallback()`) has no other execution venue, so it cannot start
|
|
4364
|
+
* without a `paper` block.
|
|
4365
|
+
*
|
|
3978
4366
|
*/
|
|
3979
4367
|
declare const startLive: <ThrowOnError extends boolean = false>(options: Options<StartLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRun, ResponseError, ThrowOnError>;
|
|
3980
4368
|
/**
|
|
@@ -3987,8 +4375,9 @@ declare const startLive: <ThrowOnError extends boolean = false>(options: Options
|
|
|
3987
4375
|
declare const listLive: <ThrowOnError extends boolean = false>(options?: Options<ListLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveListResponse, ResponseError, ThrowOnError>;
|
|
3988
4376
|
/**
|
|
3989
4377
|
* Browse public live runs
|
|
3990
|
-
* Every run whose owner marked it `public
|
|
3991
|
-
* 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.
|
|
3992
4381
|
*
|
|
3993
4382
|
* This is the only `Live Execution` endpoint that needs no `Authorization` header.
|
|
3994
4383
|
*
|
|
@@ -4021,6 +4410,24 @@ declare const updateLive: <ThrowOnError extends boolean = false>(options: Option
|
|
|
4021
4410
|
*
|
|
4022
4411
|
*/
|
|
4023
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>;
|
|
4024
4431
|
/**
|
|
4025
4432
|
* Read a run's signals
|
|
4026
4433
|
* Returns one page of the signals a run has already produced, newest-last, optionally from a
|
|
@@ -4044,11 +4451,45 @@ declare const updateLiveParams: <ThrowOnError extends boolean = false>(options:
|
|
|
4044
4451
|
* serving a shortened page that looks complete. Treat that as a normal outcome: read
|
|
4045
4452
|
* `availableSinceMs` from the error and start again from there.
|
|
4046
4453
|
*
|
|
4047
|
-
* Readable by the run's owner, and by anyone if the run is `public`
|
|
4048
|
-
* 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.
|
|
4049
4457
|
*
|
|
4050
4458
|
*/
|
|
4051
4459
|
declare const getLiveRunSignals: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunSignalsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveSignalPage, ResponseError, ThrowOnError>;
|
|
4460
|
+
/**
|
|
4461
|
+
* Read a run's paper trading
|
|
4462
|
+
* The run's paper trading as last recorded: one entry per simulated account (one per quote
|
|
4463
|
+
* currency the run trades — never added together), with its starting capital, current
|
|
4464
|
+
* equity, realised PnL, open positions and KPIs. The KPIs are the same a backtest reports,
|
|
4465
|
+
* computed over the trades closed so far.
|
|
4466
|
+
*
|
|
4467
|
+
* `equity` is the account's latest recorded value: at the last closed trade (`equityKind:
|
|
4468
|
+
* equity`), or the last periodic mark-to-market while positions are open (`equityKind:
|
|
4469
|
+
* mark`, taken every minute of market time). Until either exists the account holds its
|
|
4470
|
+
* starting capital.
|
|
4471
|
+
*
|
|
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`.
|
|
4474
|
+
*
|
|
4475
|
+
*/
|
|
4476
|
+
declare const getLiveRunPaper: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunPaperData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LivePaper, ResponseError, ThrowOnError>;
|
|
4477
|
+
/**
|
|
4478
|
+
* Read a run's paper equity curve
|
|
4479
|
+
* The run's paper equity curve, oldest first, page by page. It is kept for the life of the
|
|
4480
|
+
* run, so unlike signals it has no moving window. Points are `equity` at every closed trade,
|
|
4481
|
+
* `mark` every minute of market time while positions are open, and `gap` where the run was
|
|
4482
|
+
* restarted with positions open: those positions are not carried over, so the curve has no
|
|
4483
|
+
* value there.
|
|
4484
|
+
*
|
|
4485
|
+
* `currency` narrows to one account; without it, every account's points come interleaved by
|
|
4486
|
+
* time, each carrying its currency.
|
|
4487
|
+
*
|
|
4488
|
+
* Readable by the run's owner, and by anyone if the run is `public` and has reached the `live`
|
|
4489
|
+
* stage.
|
|
4490
|
+
*
|
|
4491
|
+
*/
|
|
4492
|
+
declare const getLiveRunPaperEquity: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunPaperEquityData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LivePaperEquityPage, ResponseError, ThrowOnError>;
|
|
4052
4493
|
/**
|
|
4053
4494
|
* Mint a WebSocket connection token
|
|
4054
4495
|
* Mints a short-lived token for the WebSocket connection used to receive a run's signals in
|
|
@@ -4061,4 +4502,4 @@ declare const mintLiveConnectionToken: <ThrowOnError extends boolean = false>(op
|
|
|
4061
4502
|
|
|
4062
4503
|
declare const client: _hey_api_client_fetch.Client;
|
|
4063
4504
|
|
|
4064
|
-
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 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 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, 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 };
|