@qtsurfer/api-client 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -4
- package/dist/index.d.ts +340 -6
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +387 -3
- package/src/generated/sdk.gen.ts +111 -0
- package/src/generated/types.gen.ts +319 -5
package/README.md
CHANGED
|
@@ -68,13 +68,15 @@ 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 44 operations**
|
|
72
|
+
the spec declares are exported. The rows below describe **spec version 0.127.0**, 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 |
|
|
79
|
+
| `getAccountUsage` | GET | `/account/usage` | Read current resource and storage use |
|
|
78
80
|
| `listExchanges` | GET | `/exchanges` | List the available exchanges |
|
|
79
81
|
| `listInstruments` | GET | `/exchange/{exchangeId}/instruments` | List an exchange's instruments (default spot segment) |
|
|
80
82
|
| `listSegmentInstruments` | GET | `/exchange/{exchangeId}/{segment}/instruments` | List an exchange segment's instruments |
|
|
@@ -105,8 +107,19 @@ independently of this package.
|
|
|
105
107
|
| `getDatasetUpload` | GET | `/datasets/{datasetId}/uploads/{uploadId}` | Get an upload's ingestion state |
|
|
106
108
|
| `importDataset` | POST | `/datasets/imports` | Create a dataset by importing external history |
|
|
107
109
|
| `getDatasetImport` | GET | `/datasets/{datasetId}/imports/{importId}` | Get an import's fetch and ingestion state |
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
| `startLive` | POST | `/strategy/{strategyId}/live` | Start a compiled strategy on a live feed; optionally simulate fills and equity with `paper` |
|
|
111
|
+
| `getLive` | GET | `/strategy/{strategyId}/live` | Read a strategy's current or most recent live run |
|
|
112
|
+
| `stopLive` | DELETE | `/strategy/{strategyId}/live` | Request a strategy's active live run to stop |
|
|
113
|
+
| `listLive` | GET | `/live` | Page all live runs owned by the authenticated account |
|
|
114
|
+
| `listPublicLive` | GET | `/live/public` | Page publicly visible live runs |
|
|
115
|
+
| `updateLive` | PATCH | `/live/{runId}` | Change a run's visibility, name, or description |
|
|
116
|
+
| `updateLiveParams` | PUT | `/live/{runId}/params` | Change parameters while a run stays active |
|
|
117
|
+
| `getLiveRunSignals` | GET | `/live/{runId}/signals` | Page retained signals by time, instrument, or signal type (`paper` items only when output is `mix`) |
|
|
118
|
+
| `getLiveRunPaper` | GET | `/live/{runId}/paper` | Read simulated accounts, open positions, equity, and KPIs for a paper-trading run |
|
|
119
|
+
| `getLiveRunPaperEquity` | GET | `/live/{runId}/paper/equity` | Page the run's retained paper equity curve, optionally by quote currency or start time |
|
|
120
|
+
| `mintLiveConnectionToken` | POST | `/live/token` | Mint a short-lived Centrifugo connection token |
|
|
121
|
+
|
|
122
|
+
All generated types (`Exchange`, `InstrumentDetail`, `BacktestJobResult`, `PrepareJobState`, `ResultMap`, `LivePaper`, `LivePaperAccount`, `LivePaperEquityPage`, etc.) are re-exported from the root.
|
|
110
123
|
|
|
111
124
|
## Configuring the client
|
|
112
125
|
|
package/dist/index.d.ts
CHANGED
|
@@ -513,6 +513,9 @@ type SweepBaseConfig = {
|
|
|
513
513
|
buyFeeRate?: number;
|
|
514
514
|
sellFeeRate?: number;
|
|
515
515
|
feeLeg?: "RECEIVED" | "QUOTE" | "BASE";
|
|
516
|
+
/**
|
|
517
|
+
* Share of the free balance each entry locks, in percent (0-100]. Omitted, a backtest sizes every entry with everything available.
|
|
518
|
+
*/
|
|
516
519
|
percentAmountToLock?: number;
|
|
517
520
|
};
|
|
518
521
|
type ExecuteSweepRequest = {
|
|
@@ -1715,6 +1718,46 @@ type StartLiveRequest = {
|
|
|
1715
1718
|
relay?: boolean;
|
|
1716
1719
|
name?: string;
|
|
1717
1720
|
description?: string;
|
|
1721
|
+
paper?: LivePaperConfig;
|
|
1722
|
+
};
|
|
1723
|
+
/**
|
|
1724
|
+
* Paper trading for this run: the same economics as a backtest's `baseConfig` (same fields,
|
|
1725
|
+
* defaults and limits), plus `output`. An empty object takes every default. Each quote
|
|
1726
|
+
* currency the run trades gets its own simulated account, opened with `initialFunding` in
|
|
1727
|
+
* that currency; accounts are never added together. As returned on a run, the block is
|
|
1728
|
+
* normalised: `feeRate` is resolved into `buyFeeRate`/`sellFeeRate` and defaults are filled
|
|
1729
|
+
* in.
|
|
1730
|
+
*
|
|
1731
|
+
*/
|
|
1732
|
+
type LivePaperConfig = {
|
|
1733
|
+
/**
|
|
1734
|
+
* Starting capital of each account, in that account's own quote currency.
|
|
1735
|
+
*/
|
|
1736
|
+
initialFunding?: number;
|
|
1737
|
+
/**
|
|
1738
|
+
* Fee rate for both sides (0.001 = 0.1%). Accepted on start; returned resolved into the two fields below.
|
|
1739
|
+
*/
|
|
1740
|
+
feeRate?: number;
|
|
1741
|
+
/**
|
|
1742
|
+
* Buy-side fee rate; overrides `feeRate`.
|
|
1743
|
+
*/
|
|
1744
|
+
buyFeeRate?: number;
|
|
1745
|
+
/**
|
|
1746
|
+
* Sell-side fee rate; overrides `feeRate`.
|
|
1747
|
+
*/
|
|
1748
|
+
sellFeeRate?: number;
|
|
1749
|
+
/**
|
|
1750
|
+
* Which asset fees are charged in. Case-insensitive on start.
|
|
1751
|
+
*/
|
|
1752
|
+
feeLeg?: "RECEIVED" | "QUOTE" | "BASE";
|
|
1753
|
+
/**
|
|
1754
|
+
* Share of the account's free balance each entry locks, in percent. Omitted, the strategy's own setting applies, and without one 10%.
|
|
1755
|
+
*/
|
|
1756
|
+
percentAmountToLock?: number;
|
|
1757
|
+
/**
|
|
1758
|
+
* `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.
|
|
1759
|
+
*/
|
|
1760
|
+
output?: "separate" | "mix";
|
|
1718
1761
|
};
|
|
1719
1762
|
type UpdateLiveRequest = {
|
|
1720
1763
|
visibility?: "private" | "public";
|
|
@@ -1779,6 +1822,10 @@ type LiveRun = {
|
|
|
1779
1822
|
gate?: {
|
|
1780
1823
|
[key: string]: unknown;
|
|
1781
1824
|
};
|
|
1825
|
+
/**
|
|
1826
|
+
* The run's paper trading configuration as accepted at start, normalised. Absent when the run has no paper trading.
|
|
1827
|
+
*/
|
|
1828
|
+
paper?: LivePaperConfig;
|
|
1782
1829
|
};
|
|
1783
1830
|
/**
|
|
1784
1831
|
* 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.
|
|
@@ -1792,6 +1839,44 @@ type LiveRunCompact = {
|
|
|
1792
1839
|
state: string;
|
|
1793
1840
|
sources: Array<LiveSource>;
|
|
1794
1841
|
};
|
|
1842
|
+
/**
|
|
1843
|
+
* A run as it appears in `GET /live` — one of your own, narrower than `LiveRun` (no `params`, `paramsVersion`, `relay`, or `gate`), since listing stays cheap regardless of how many runs you have. Check a specific run's full state with `GET /strategy/{strategyId}/live`.
|
|
1844
|
+
*/
|
|
1845
|
+
type LiveRunSummary = {
|
|
1846
|
+
strategyId: StrategyId;
|
|
1847
|
+
/**
|
|
1848
|
+
* This run's own id — its canonical identity for `PATCH`/`PUT .../params` and for `GET /live/public`.
|
|
1849
|
+
*/
|
|
1850
|
+
runId: string;
|
|
1851
|
+
name?: string;
|
|
1852
|
+
description?: string;
|
|
1853
|
+
visibility: "private" | "public";
|
|
1854
|
+
/**
|
|
1855
|
+
* A new run always starts `SANDBOX` — a trial run compared against a second execution for agreement — and moves to `LIVE` once it passes.
|
|
1856
|
+
*/
|
|
1857
|
+
stage: "SANDBOX" | "LIVE";
|
|
1858
|
+
/**
|
|
1859
|
+
* `STARTING` until first observed running; otherwise the runner's own reported state (e.g. `RUNNING`).
|
|
1860
|
+
*/
|
|
1861
|
+
state: string;
|
|
1862
|
+
/**
|
|
1863
|
+
* What you last asked for. `state` can lag this briefly after `DELETE`.
|
|
1864
|
+
*/
|
|
1865
|
+
desired: "RUNNING" | "STOPPED";
|
|
1866
|
+
sources: Array<LiveSource>;
|
|
1867
|
+
/**
|
|
1868
|
+
* Epoch milliseconds this run was started.
|
|
1869
|
+
*/
|
|
1870
|
+
createdAtMs: number;
|
|
1871
|
+
/**
|
|
1872
|
+
* Epoch milliseconds.
|
|
1873
|
+
*/
|
|
1874
|
+
startedAtMs: number;
|
|
1875
|
+
};
|
|
1876
|
+
type LiveListResponse = {
|
|
1877
|
+
runs: Array<LiveRunSummary>;
|
|
1878
|
+
_links?: PublicLiveListLinks;
|
|
1879
|
+
};
|
|
1795
1880
|
/**
|
|
1796
1881
|
* A run as it appears in `GET /live/public` — never reveals who owns it or which strategy it runs.
|
|
1797
1882
|
*/
|
|
@@ -1827,6 +1912,106 @@ type LiveSignalPage = {
|
|
|
1827
1912
|
availableSinceMs?: number;
|
|
1828
1913
|
_links?: PublicLiveListLinks;
|
|
1829
1914
|
};
|
|
1915
|
+
type LivePaper = {
|
|
1916
|
+
runId: string;
|
|
1917
|
+
stage: "SANDBOX" | "LIVE";
|
|
1918
|
+
accounts: Array<LivePaperAccount>;
|
|
1919
|
+
};
|
|
1920
|
+
/**
|
|
1921
|
+
* One simulated account — one per quote currency the run trades.
|
|
1922
|
+
*/
|
|
1923
|
+
type LivePaperAccount = {
|
|
1924
|
+
/**
|
|
1925
|
+
* The account's quote currency; every amount below is in it.
|
|
1926
|
+
*/
|
|
1927
|
+
currency: string;
|
|
1928
|
+
initialFunding: number;
|
|
1929
|
+
/**
|
|
1930
|
+
* Latest recorded equity — see `equityKind`.
|
|
1931
|
+
*/
|
|
1932
|
+
equity: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Market time of that value. Absent while the account holds its starting capital.
|
|
1935
|
+
*/
|
|
1936
|
+
equityAtMs?: number;
|
|
1937
|
+
/**
|
|
1938
|
+
* `equity` at a closed trade, `mark` at a periodic mark-to-market (includes open positions at market price).
|
|
1939
|
+
*/
|
|
1940
|
+
equityKind?: "equity" | "mark";
|
|
1941
|
+
/**
|
|
1942
|
+
* Sum of the PnL of the closed trades.
|
|
1943
|
+
*/
|
|
1944
|
+
realisedPnl: number;
|
|
1945
|
+
/**
|
|
1946
|
+
* Closed trades.
|
|
1947
|
+
*/
|
|
1948
|
+
trades: number;
|
|
1949
|
+
/**
|
|
1950
|
+
* Times open positions were lost because the run was restarted with them open.
|
|
1951
|
+
*/
|
|
1952
|
+
gaps: number;
|
|
1953
|
+
openPositions: Array<LivePaperPosition>;
|
|
1954
|
+
kpi?: LivePaperKpi;
|
|
1955
|
+
};
|
|
1956
|
+
type LivePaperPosition = {
|
|
1957
|
+
instrument: string;
|
|
1958
|
+
/**
|
|
1959
|
+
* Amount held, in the base asset.
|
|
1960
|
+
*/
|
|
1961
|
+
base: number;
|
|
1962
|
+
/**
|
|
1963
|
+
* What it cost, in the account's currency.
|
|
1964
|
+
*/
|
|
1965
|
+
cost: number;
|
|
1966
|
+
};
|
|
1967
|
+
/**
|
|
1968
|
+
* The same KPIs a backtest reports, over the trades closed so far. Absent until the first closed trade is recorded.
|
|
1969
|
+
*/
|
|
1970
|
+
type LivePaperKpi = {
|
|
1971
|
+
totalTrades?: number;
|
|
1972
|
+
winCount?: number;
|
|
1973
|
+
lossCount?: number;
|
|
1974
|
+
/**
|
|
1975
|
+
* Ratio (0.5 = half the trades won).
|
|
1976
|
+
*/
|
|
1977
|
+
winRate?: number;
|
|
1978
|
+
pnlTotal?: number;
|
|
1979
|
+
/**
|
|
1980
|
+
* Percent of `initialFunding` (0-100 scale).
|
|
1981
|
+
*/
|
|
1982
|
+
pnlTotalPercent?: number;
|
|
1983
|
+
sharpeRatio?: number | null;
|
|
1984
|
+
sortinoRatio?: number | null;
|
|
1985
|
+
/**
|
|
1986
|
+
* Ratio (0.15 for 15%).
|
|
1987
|
+
*/
|
|
1988
|
+
cagr?: number | null;
|
|
1989
|
+
maxDrawdown?: number;
|
|
1990
|
+
/**
|
|
1991
|
+
* Percent (0-100 scale).
|
|
1992
|
+
*/
|
|
1993
|
+
maxDrawdownPercent?: number;
|
|
1994
|
+
};
|
|
1995
|
+
type LivePaperEquityPage = {
|
|
1996
|
+
points: Array<LivePaperEquityPoint>;
|
|
1997
|
+
_links?: {
|
|
1998
|
+
next?: {
|
|
1999
|
+
href?: string;
|
|
2000
|
+
};
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
type LivePaperEquityPoint = {
|
|
2004
|
+
currency: string;
|
|
2005
|
+
kind: "equity" | "mark" | "gap";
|
|
2006
|
+
/**
|
|
2007
|
+
* Market time of the point.
|
|
2008
|
+
*/
|
|
2009
|
+
eventTsMs: number;
|
|
2010
|
+
/**
|
|
2011
|
+
* Absent on a `gap`.
|
|
2012
|
+
*/
|
|
2013
|
+
equity?: number;
|
|
2014
|
+
};
|
|
1830
2015
|
/**
|
|
1831
2016
|
* One signal, in the same shape the real-time signal channel delivers.
|
|
1832
2017
|
*/
|
|
@@ -1848,9 +2033,12 @@ type LiveSignal = {
|
|
|
1848
2033
|
* The parameter set in force when this signal was produced.
|
|
1849
2034
|
*/
|
|
1850
2035
|
paramsVersion?: number;
|
|
1851
|
-
type: "hint" | "info" | "marker" | "command";
|
|
1852
2036
|
/**
|
|
1853
|
-
* `
|
|
2037
|
+
* `paper` items appear only for a run whose `paper.output` is `mix`; they are not relayed over the WebSocket channel.
|
|
2038
|
+
*/
|
|
2039
|
+
type: "hint" | "info" | "marker" | "command" | "paper";
|
|
2040
|
+
/**
|
|
2041
|
+
* `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.
|
|
1854
2042
|
*/
|
|
1855
2043
|
kind?: string | null;
|
|
1856
2044
|
/**
|
|
@@ -1861,7 +2049,10 @@ type LiveSignal = {
|
|
|
1861
2049
|
* Time it was published — always at or after `eventTsMs`.
|
|
1862
2050
|
*/
|
|
1863
2051
|
emittedAtMs: number;
|
|
1864
|
-
|
|
2052
|
+
/**
|
|
2053
|
+
* 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.
|
|
2054
|
+
*/
|
|
2055
|
+
instrument: LiveSignalInstrument | null;
|
|
1865
2056
|
order?: LiveSignalOrder;
|
|
1866
2057
|
/**
|
|
1867
2058
|
* The signal's own free-form payload.
|
|
@@ -3113,7 +3304,7 @@ type StartLiveData = {
|
|
|
3113
3304
|
};
|
|
3114
3305
|
type StartLiveErrors = {
|
|
3115
3306
|
/**
|
|
3116
|
-
* Malformed `sources` (not exactly one entry, missing field, unsupported `type`),
|
|
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.
|
|
3117
3308
|
*/
|
|
3118
3309
|
400: ResponseError;
|
|
3119
3310
|
/**
|
|
@@ -3140,6 +3331,35 @@ type StartLiveResponses = {
|
|
|
3140
3331
|
201: LiveRun;
|
|
3141
3332
|
};
|
|
3142
3333
|
type StartLiveResponse = StartLiveResponses[keyof StartLiveResponses];
|
|
3334
|
+
type ListLiveData = {
|
|
3335
|
+
body?: never;
|
|
3336
|
+
path?: never;
|
|
3337
|
+
query?: {
|
|
3338
|
+
/**
|
|
3339
|
+
* The `runId` from a previous page's `_links.next.href`. Omit for the first page.
|
|
3340
|
+
*/
|
|
3341
|
+
cursor?: string;
|
|
3342
|
+
/**
|
|
3343
|
+
* Page size. Larger values are capped, not rejected.
|
|
3344
|
+
*/
|
|
3345
|
+
limit?: number;
|
|
3346
|
+
};
|
|
3347
|
+
url: "/live";
|
|
3348
|
+
};
|
|
3349
|
+
type ListLiveErrors = {
|
|
3350
|
+
/**
|
|
3351
|
+
* An invalid `cursor` or `limit`.
|
|
3352
|
+
*/
|
|
3353
|
+
400: ResponseError;
|
|
3354
|
+
};
|
|
3355
|
+
type ListLiveError = ListLiveErrors[keyof ListLiveErrors];
|
|
3356
|
+
type ListLiveResponses = {
|
|
3357
|
+
/**
|
|
3358
|
+
* A page of your own runs
|
|
3359
|
+
*/
|
|
3360
|
+
200: LiveListResponse;
|
|
3361
|
+
};
|
|
3362
|
+
type ListLiveResponse = ListLiveResponses[keyof ListLiveResponses];
|
|
3143
3363
|
type ListPublicLiveData = {
|
|
3144
3364
|
body?: never;
|
|
3145
3365
|
path?: never;
|
|
@@ -3250,6 +3470,10 @@ type GetLiveRunSignalsData = {
|
|
|
3250
3470
|
*
|
|
3251
3471
|
*/
|
|
3252
3472
|
instrument?: string;
|
|
3473
|
+
/**
|
|
3474
|
+
* Narrow to one or more signal types, comma-separated (`hint`, `info`, `marker`, `command`, `paper`). Combines with `instrument`.
|
|
3475
|
+
*/
|
|
3476
|
+
type?: string;
|
|
3253
3477
|
/**
|
|
3254
3478
|
* Continue from a previous page's `_links.next`. Takes precedence over `sinceMs`.
|
|
3255
3479
|
*/
|
|
@@ -3263,7 +3487,7 @@ type GetLiveRunSignalsData = {
|
|
|
3263
3487
|
};
|
|
3264
3488
|
type GetLiveRunSignalsErrors = {
|
|
3265
3489
|
/**
|
|
3266
|
-
* `instrument`, `sinceMs`, `limit` or `cursor` is malformed.
|
|
3490
|
+
* `instrument`, `type`, `sinceMs`, `limit` or `cursor` is malformed.
|
|
3267
3491
|
*/
|
|
3268
3492
|
400: ResponseError;
|
|
3269
3493
|
/**
|
|
@@ -3283,6 +3507,68 @@ type GetLiveRunSignalsResponses = {
|
|
|
3283
3507
|
200: LiveSignalPage;
|
|
3284
3508
|
};
|
|
3285
3509
|
type GetLiveRunSignalsResponse = GetLiveRunSignalsResponses[keyof GetLiveRunSignalsResponses];
|
|
3510
|
+
type GetLiveRunPaperData = {
|
|
3511
|
+
body?: never;
|
|
3512
|
+
path: {
|
|
3513
|
+
runId: string;
|
|
3514
|
+
};
|
|
3515
|
+
query?: never;
|
|
3516
|
+
url: "/live/{runId}/paper";
|
|
3517
|
+
};
|
|
3518
|
+
type GetLiveRunPaperErrors = {
|
|
3519
|
+
/**
|
|
3520
|
+
* No such run, not one you may read, or a run without paper trading.
|
|
3521
|
+
*/
|
|
3522
|
+
404: ResponseError;
|
|
3523
|
+
};
|
|
3524
|
+
type GetLiveRunPaperError = GetLiveRunPaperErrors[keyof GetLiveRunPaperErrors];
|
|
3525
|
+
type GetLiveRunPaperResponses = {
|
|
3526
|
+
/**
|
|
3527
|
+
* The run's paper accounts
|
|
3528
|
+
*/
|
|
3529
|
+
200: LivePaper;
|
|
3530
|
+
};
|
|
3531
|
+
type GetLiveRunPaperResponse = GetLiveRunPaperResponses[keyof GetLiveRunPaperResponses];
|
|
3532
|
+
type GetLiveRunPaperEquityData = {
|
|
3533
|
+
body?: never;
|
|
3534
|
+
path: {
|
|
3535
|
+
runId: string;
|
|
3536
|
+
};
|
|
3537
|
+
query?: {
|
|
3538
|
+
/**
|
|
3539
|
+
* One account's quote currency, e.g. `USDT`.
|
|
3540
|
+
*/
|
|
3541
|
+
currency?: string;
|
|
3542
|
+
/**
|
|
3543
|
+
* Start from this market time (epoch ms). Ignored when `cursor` is given.
|
|
3544
|
+
*/
|
|
3545
|
+
sinceMs?: number;
|
|
3546
|
+
/**
|
|
3547
|
+
* Continue from a previous page's `_links.next`.
|
|
3548
|
+
*/
|
|
3549
|
+
cursor?: string;
|
|
3550
|
+
limit?: number;
|
|
3551
|
+
};
|
|
3552
|
+
url: "/live/{runId}/paper/equity";
|
|
3553
|
+
};
|
|
3554
|
+
type GetLiveRunPaperEquityErrors = {
|
|
3555
|
+
/**
|
|
3556
|
+
* `sinceMs`, `limit` or `cursor` is malformed.
|
|
3557
|
+
*/
|
|
3558
|
+
400: ResponseError;
|
|
3559
|
+
/**
|
|
3560
|
+
* No such run, not one you may read, or a run without paper trading.
|
|
3561
|
+
*/
|
|
3562
|
+
404: ResponseError;
|
|
3563
|
+
};
|
|
3564
|
+
type GetLiveRunPaperEquityError = GetLiveRunPaperEquityErrors[keyof GetLiveRunPaperEquityErrors];
|
|
3565
|
+
type GetLiveRunPaperEquityResponses = {
|
|
3566
|
+
/**
|
|
3567
|
+
* One page of the curve
|
|
3568
|
+
*/
|
|
3569
|
+
200: LivePaperEquityPage;
|
|
3570
|
+
};
|
|
3571
|
+
type GetLiveRunPaperEquityResponse = GetLiveRunPaperEquityResponses[keyof GetLiveRunPaperEquityResponses];
|
|
3286
3572
|
type MintLiveConnectionTokenData = {
|
|
3287
3573
|
body?: never;
|
|
3288
3574
|
path?: never;
|
|
@@ -3908,8 +4194,24 @@ declare const getLive: <ThrowOnError extends boolean = false>(options: Options<G
|
|
|
3908
4194
|
* the "Live execution" guide linked from this tag's description for the full flow (minting a
|
|
3909
4195
|
* connection token, the channel and RPC method).
|
|
3910
4196
|
*
|
|
4197
|
+
* **Paper trading.** Pass a `paper` block to have the run's hints executed in simulation from
|
|
4198
|
+
* its first tick, as a backtest would execute them: fills, closed trades, equity and KPIs,
|
|
4199
|
+
* with one simulated account per quote currency. Omitted, the run has no paper trading. It
|
|
4200
|
+
* takes the same economics as a backtest's `baseConfig` plus where its output goes; read it
|
|
4201
|
+
* back with `GET /live/{runId}/paper`. A strategy that listens to its own execution events
|
|
4202
|
+
* (it overrides `getExecutionCallback()`) has no other execution venue, so it cannot start
|
|
4203
|
+
* without a `paper` block.
|
|
4204
|
+
*
|
|
3911
4205
|
*/
|
|
3912
4206
|
declare const startLive: <ThrowOnError extends boolean = false>(options: Options<StartLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRun, ResponseError, ThrowOnError>;
|
|
4207
|
+
/**
|
|
4208
|
+
* List your own live runs
|
|
4209
|
+
* Every run you have started, in any `stage`, `desired` state, or `visibility` — newest
|
|
4210
|
+
* first. Unlike `GET /live/public`, this is not filtered to `RUNNING` public runs: it is
|
|
4211
|
+
* the complete list of runs you own, including `sandbox` trials and stopped ones.
|
|
4212
|
+
*
|
|
4213
|
+
*/
|
|
4214
|
+
declare const listLive: <ThrowOnError extends boolean = false>(options?: Options<ListLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveListResponse, ResponseError, ThrowOnError>;
|
|
3913
4215
|
/**
|
|
3914
4216
|
* Browse public live runs
|
|
3915
4217
|
* Every run whose owner marked it `public` and is currently live and running — anyone's,
|
|
@@ -3974,6 +4276,38 @@ declare const updateLiveParams: <ThrowOnError extends boolean = false>(options:
|
|
|
3974
4276
|
*
|
|
3975
4277
|
*/
|
|
3976
4278
|
declare const getLiveRunSignals: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunSignalsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveSignalPage, ResponseError, ThrowOnError>;
|
|
4279
|
+
/**
|
|
4280
|
+
* Read a run's paper trading
|
|
4281
|
+
* The run's paper trading as last recorded: one entry per simulated account (one per quote
|
|
4282
|
+
* currency the run trades — never added together), with its starting capital, current
|
|
4283
|
+
* equity, realised PnL, open positions and KPIs. The KPIs are the same a backtest reports,
|
|
4284
|
+
* computed over the trades closed so far.
|
|
4285
|
+
*
|
|
4286
|
+
* `equity` is the account's latest recorded value: at the last closed trade (`equityKind:
|
|
4287
|
+
* equity`), or the last periodic mark-to-market while positions are open (`equityKind:
|
|
4288
|
+
* mark`, taken every minute of market time). Until either exists the account holds its
|
|
4289
|
+
* starting capital.
|
|
4290
|
+
*
|
|
4291
|
+
* Readable by the run's owner, and by anyone if the run is `public`. A run started without
|
|
4292
|
+
* a `paper` block answers `404`.
|
|
4293
|
+
*
|
|
4294
|
+
*/
|
|
4295
|
+
declare const getLiveRunPaper: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunPaperData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LivePaper, ResponseError, ThrowOnError>;
|
|
4296
|
+
/**
|
|
4297
|
+
* Read a run's paper equity curve
|
|
4298
|
+
* The run's paper equity curve, oldest first, page by page. It is kept for the life of the
|
|
4299
|
+
* run, so unlike signals it has no moving window. Points are `equity` at every closed trade,
|
|
4300
|
+
* `mark` every minute of market time while positions are open, and `gap` where the run was
|
|
4301
|
+
* restarted with positions open: those positions are not carried over, so the curve has no
|
|
4302
|
+
* value there.
|
|
4303
|
+
*
|
|
4304
|
+
* `currency` narrows to one account; without it, every account's points come interleaved by
|
|
4305
|
+
* time, each carrying its currency.
|
|
4306
|
+
*
|
|
4307
|
+
* Readable by the run's owner, and by anyone if the run is `public`.
|
|
4308
|
+
*
|
|
4309
|
+
*/
|
|
4310
|
+
declare const getLiveRunPaperEquity: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunPaperEquityData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LivePaperEquityPage, ResponseError, ThrowOnError>;
|
|
3977
4311
|
/**
|
|
3978
4312
|
* Mint a WebSocket connection token
|
|
3979
4313
|
* Mints a short-lived token for the WebSocket connection used to receive a run's signals in
|
|
@@ -3986,4 +4320,4 @@ declare const mintLiveConnectionToken: <ThrowOnError extends boolean = false>(op
|
|
|
3986
4320
|
|
|
3987
4321
|
declare const client: _hey_api_client_fetch.Client;
|
|
3988
4322
|
|
|
3989
|
-
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 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 LiveParamsUpdateResult, type LiveRun, type LiveRunCompact, 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, listPublicLive, listSegmentInstruments, listStrategies, mintLiveConnectionToken, openDatasetUpload, prepareBacktest, startLive, stopLive, updateLive, updateLiveParams, validateStrategy };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -441,6 +441,18 @@ var startLive = (options) => {
|
|
|
441
441
|
}
|
|
442
442
|
});
|
|
443
443
|
};
|
|
444
|
+
var listLive = (options) => {
|
|
445
|
+
return (options?.client ?? client).get({
|
|
446
|
+
security: [
|
|
447
|
+
{
|
|
448
|
+
scheme: "bearer",
|
|
449
|
+
type: "http"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
url: "/live",
|
|
453
|
+
...options
|
|
454
|
+
});
|
|
455
|
+
};
|
|
444
456
|
var listPublicLive = (options) => {
|
|
445
457
|
return (options?.client ?? client).get({
|
|
446
458
|
url: "/live/public",
|
|
@@ -491,6 +503,30 @@ var getLiveRunSignals = (options) => {
|
|
|
491
503
|
...options
|
|
492
504
|
});
|
|
493
505
|
};
|
|
506
|
+
var getLiveRunPaper = (options) => {
|
|
507
|
+
return (options.client ?? client).get({
|
|
508
|
+
security: [
|
|
509
|
+
{
|
|
510
|
+
scheme: "bearer",
|
|
511
|
+
type: "http"
|
|
512
|
+
}
|
|
513
|
+
],
|
|
514
|
+
url: "/live/{runId}/paper",
|
|
515
|
+
...options
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
var getLiveRunPaperEquity = (options) => {
|
|
519
|
+
return (options.client ?? client).get({
|
|
520
|
+
security: [
|
|
521
|
+
{
|
|
522
|
+
scheme: "bearer",
|
|
523
|
+
type: "http"
|
|
524
|
+
}
|
|
525
|
+
],
|
|
526
|
+
url: "/live/{runId}/paper/equity",
|
|
527
|
+
...options
|
|
528
|
+
});
|
|
529
|
+
};
|
|
494
530
|
var mintLiveConnectionToken = (options) => {
|
|
495
531
|
return (options?.client ?? client).post({
|
|
496
532
|
security: [
|
|
@@ -524,6 +560,8 @@ export {
|
|
|
524
560
|
getDatasetImport,
|
|
525
561
|
getDatasetUpload,
|
|
526
562
|
getLive,
|
|
563
|
+
getLiveRunPaper,
|
|
564
|
+
getLiveRunPaperEquity,
|
|
527
565
|
getLiveRunSignals,
|
|
528
566
|
getPrepareStatus,
|
|
529
567
|
getStrategy,
|
|
@@ -535,6 +573,7 @@ export {
|
|
|
535
573
|
listDatasets,
|
|
536
574
|
listExchanges,
|
|
537
575
|
listInstruments,
|
|
576
|
+
listLive,
|
|
538
577
|
listPublicLive,
|
|
539
578
|
listSegmentInstruments,
|
|
540
579
|
listStrategies,
|