@qtsurfer/api-client 0.20.0 → 0.21.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 CHANGED
@@ -68,8 +68,8 @@ 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 45 operations**
72
- the spec declares are exported. The rows below describe **spec version 0.128.14**, which is versioned
71
+ The table is exhaustive: `src/generated/` is produced from the OpenAPI spec, so **all 48 operations**
72
+ the spec declares are exported. The rows below describe **spec version 0.128.17**, which is versioned
73
73
  independently of this package.
74
74
 
75
75
  | Function | Method | Path | Purpose |
@@ -107,20 +107,23 @@ independently of this package.
107
107
  | `getDatasetUpload` | GET | `/datasets/{datasetId}/uploads/{uploadId}` | Get an upload's ingestion state |
108
108
  | `importDataset` | POST | `/datasets/imports` | Create a dataset by importing external history |
109
109
  | `getDatasetImport` | GET | `/datasets/{datasetId}/imports/{importId}` | Get an import's fetch and ingestion state |
110
- | `startLive` | POST | `/strategy/{strategyId}/live` | Start a compiled strategy on a live feed; optionally simulate fills and equity with `paper` |
110
+ | `startLive` | POST | `/strategy/{strategyId}/live` | Start a compiled strategy on a live feed; optionally simulate fills and equity with `paper`, or request a plain WebSocket stream URL |
111
111
  | `getLive` | GET | `/strategy/{strategyId}/live` | Read a strategy's current or most recent live run |
112
112
  | `stopLive` | DELETE | `/strategy/{strategyId}/live` | Request a strategy's active live run to stop |
113
113
  | `listLive` | GET | `/live` | Page all live runs owned by the authenticated account |
114
114
  | `listPublicLive` | GET | `/live/public` | Page publicly visible live runs |
115
+ | `getLiveRun` | GET | `/live/{runId}` | Read one owned run by its id, including its latest stats and last-change time |
115
116
  | `updateLive` | PATCH | `/live/{runId}` | Change a run's visibility, name, or description |
116
117
  | `updateLiveParams` | PUT | `/live/{runId}/params` | Change parameters while a run stays active |
118
+ | `rotateLiveStream` | POST | `/live/{runId}/stream` | Replace a run's stream URL and retire the old one |
119
+ | `revokeLiveStream` | DELETE | `/live/{runId}/stream` | Permanently revoke a run's stream URL |
117
120
  | `sendLiveCommand` | POST | `/live/{runId}/commands` | Send a command to a running strategy without restarting it |
118
121
  | `getLiveRunSignals` | GET | `/live/{runId}/signals` | Page retained signals by time, instrument, or signal type (`paper` items only when output is `mix`) |
119
122
  | `getLiveRunPaper` | GET | `/live/{runId}/paper` | Read simulated accounts, open positions, equity, and KPIs for a paper-trading run |
120
123
  | `getLiveRunPaperEquity` | GET | `/live/{runId}/paper/equity` | Page the run's retained paper equity curve, optionally by quote currency or start time |
121
124
  | `mintLiveConnectionToken` | POST | `/live/token` | Mint a short-lived Centrifugo connection token |
122
125
 
123
- All generated types (`Exchange`, `InstrumentDetail`, `BacktestJobResult`, `PrepareJobState`, `ResultMap`, `LivePaper`, `LivePaperAccount`, `LivePaperEquityPage`, `SendLiveCommandRequest`, `LiveCommandResult`, etc.) are re-exported from the root.
126
+ All generated types (`Exchange`, `InstrumentDetail`, `BacktestJobResult`, `PrepareJobState`, `ResultMap`, `LiveRunStats`, `LiveRunDetail`, `LiveRunWithStream`, `LiveStreamUrl`, `LiveStreamRevoked`, `LivePaper`, `LivePaperAccount`, `LivePaperEquityPage`, `SendLiveCommandRequest`, `LiveCommandResult`, etc.) are re-exported from the root.
124
127
 
125
128
  `sendLiveCommand` sends a command to every execution behind an owned live run. The strategy must
126
129
  implement the engine's `CommandRequestHandler`; `202` means the command was accepted, not that the
package/dist/index.d.ts CHANGED
@@ -1755,6 +1755,16 @@ type StartLiveRequest = {
1755
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.
1756
1756
  */
1757
1757
  relay?: boolean;
1758
+ /**
1759
+ * Ask for a **stream URL**: a secret address that a simple client, or a service that passes your signals
1760
+ * on to others, can open as a plain WebSocket to receive this run's signals as they are produced, one JSON
1761
+ * text frame per signal, with none of the live-execution protocol around it. The URL comes back as
1762
+ * `streamUrl` in the response to this call. Available from the `sandbox` stage on, on the plans that may
1763
+ * broadcast; any other plan gets `429`. It can be asked for **only when the run is started** (not added
1764
+ * later), and it also turns `relay` on. See the "Live execution" guide, "A plain WebSocket stream of a run".
1765
+ *
1766
+ */
1767
+ stream?: boolean;
1758
1768
  name?: string;
1759
1769
  description?: string;
1760
1770
  paper?: LivePaperConfig;
@@ -1887,6 +1897,97 @@ type LiveRun = {
1887
1897
  * The run's paper trading configuration as accepted at start, normalised. Absent when the run has no paper trading.
1888
1898
  */
1889
1899
  paper?: LivePaperConfig;
1900
+ /**
1901
+ * The run's latest counters. Returned by the two reads, `GET /strategy/{strategyId}/live` and
1902
+ * `GET /live/{runId}`; never by starting or stopping a run. Absent until the first snapshot exists
1903
+ * (a run that has just started), and absent is not zero.
1904
+ *
1905
+ */
1906
+ stats?: LiveRunStats;
1907
+ };
1908
+ /**
1909
+ * What a run has been doing, as of its last snapshot. The platform refreshes it about once a minute
1910
+ * while the run is being executed, so `opsPerSecond` is an average over that interval, not an
1911
+ * instantaneous rate.
1912
+ *
1913
+ */
1914
+ type LiveRunStats = {
1915
+ /**
1916
+ * Updates of instruments the run has accepted since it started executing. It can start again from zero if the run is restarted.
1917
+ */
1918
+ processed: number;
1919
+ /**
1920
+ * Updates accepted per second over the last refresh interval. `0` when none arrived.
1921
+ */
1922
+ opsPerSecond: number;
1923
+ /**
1924
+ * How many distinct instruments the run has received an update for.
1925
+ */
1926
+ instrumentsSeen: number;
1927
+ /**
1928
+ * Epoch milliseconds when these counters were last written.
1929
+ */
1930
+ asOfMs: number;
1931
+ /**
1932
+ * Epoch milliseconds of the last snapshot in which `processed` had grown. Absent until the run has
1933
+ * processed anything. A run fed by a source that updates rarely (a funding rate, for example) can
1934
+ * stay flat for hours: that is how such a run behaves, not a fault.
1935
+ *
1936
+ */
1937
+ progressedAtMs?: number;
1938
+ /**
1939
+ * `true` when the run is meant to be running (`desired` is `RUNNING`) and its counters have not
1940
+ * been refreshed for several refresh intervals: the platform has stopped updating them, which is
1941
+ * worth checking against `state`. `false` otherwise. A run whose `processed` is flat is not stale;
1942
+ * `progressedAtMs` is how to tell it apart.
1943
+ *
1944
+ */
1945
+ stale: boolean;
1946
+ };
1947
+ /**
1948
+ * A run as returned by `GET /live/{runId}`, the full state of `LiveRun` plus when it last changed.
1949
+ */
1950
+ type LiveRunDetail = LiveRun & {
1951
+ /**
1952
+ * Epoch milliseconds of the run's last change, from any cause. It only moves forward, so of two reads of the same run the one with the larger value is the newer.
1953
+ */
1954
+ updatedAtMs: number;
1955
+ };
1956
+ /**
1957
+ * A run as `LiveRun` describes it, plus its `streamUrl` when it has one. It is what **starting a run** and
1958
+ * `GET /strategy/{strategyId}/live` return: your own run, read with your own credentials. Stopping a run
1959
+ * and `GET /live/{runId}` return `LiveRun`, which never carries the URL.
1960
+ *
1961
+ */
1962
+ type LiveRunWithStream = LiveRun & {
1963
+ /**
1964
+ * The run's secret stream URL (`wss://…`). **Treat it like a password**: anyone who holds it can read
1965
+ * this run's signals, from the sandbox stage on. Present only when the run was started with
1966
+ * `stream: true`, is wanted running, has not had its stream revoked, and your plan still lets you
1967
+ * broadcast; absent otherwise (a plan that lets you broadcast again gets the same URL back). Rotate
1968
+ * it with `POST /live/{runId}/stream` if it leaks, revoke it with `DELETE /live/{runId}/stream`.
1969
+ *
1970
+ */
1971
+ streamUrl?: string;
1972
+ };
1973
+ /**
1974
+ * A run's new stream URL, as returned by `POST /live/{runId}/stream`.
1975
+ */
1976
+ type LiveStreamUrl = {
1977
+ /**
1978
+ * The run's new secret stream URL. The previous one has stopped working.
1979
+ */
1980
+ streamUrl: string;
1981
+ };
1982
+ /**
1983
+ * What `DELETE /live/{runId}/stream` returns.
1984
+ */
1985
+ type LiveStreamRevoked = {
1986
+ runId: string;
1987
+ /**
1988
+ * Always `true`.
1989
+ */
1990
+ revoked: boolean;
1890
1991
  };
1891
1992
  /**
1892
1993
  * 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.
@@ -3392,9 +3493,9 @@ type GetLiveErrors = {
3392
3493
  type GetLiveError = GetLiveErrors[keyof GetLiveErrors];
3393
3494
  type GetLiveResponses = {
3394
3495
  /**
3395
- * The run's current state
3496
+ * The run's current state, with its `streamUrl` when it has one
3396
3497
  */
3397
- 200: LiveRun;
3498
+ 200: LiveRunWithStream;
3398
3499
  };
3399
3500
  type GetLiveResponse = GetLiveResponses[keyof GetLiveResponses];
3400
3501
  type StartLiveData = {
@@ -3410,7 +3511,7 @@ type StartLiveData = {
3410
3511
  };
3411
3512
  type StartLiveErrors = {
3412
3513
  /**
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.
3514
+ * Malformed `sources` (not exactly one entry, missing field, unsupported `type`), a `type` the strategy cannot consume (a ticker strategy with a `kline` source, or the reverse; the message names both), an invalid `visibility`, an invalid `paper` block (an unknown field, a wrong type or an out-of-range value), or no `paper` block for a strategy that listens to its own execution events. A `relay` or `stream` that is not `true` or `false`, or a `stream` where streams are not available yet.
3414
3515
  */
3415
3516
  400: ResponseError;
3416
3517
  /**
@@ -3422,9 +3523,10 @@ type StartLiveErrors = {
3422
3523
  */
3423
3524
  409: ResponseError;
3424
3525
  /**
3425
- * Your plan does not include live runs, would exceed your concurrent-run or
3426
- * instrument-count limit, or the platform is at capacity right now. Carries a
3427
- * `Retry-After` header.
3526
+ * One of two kinds. **Your plan** does not include live runs, would exceed your concurrent-run or
3527
+ * instrument-count limit, or does not let you ask for a `stream`: the message names your plan, and
3528
+ * retrying will not help until something changes, so there is no `Retry-After`. Or **the platform is at
3529
+ * capacity** right now: a `Retry-After` header says when to try again.
3428
3530
  *
3429
3531
  */
3430
3532
  429: ResponseError;
@@ -3432,9 +3534,9 @@ type StartLiveErrors = {
3432
3534
  type StartLiveError = StartLiveErrors[keyof StartLiveErrors];
3433
3535
  type StartLiveResponses = {
3434
3536
  /**
3435
- * Started — the run's own state, in the sandbox stage
3537
+ * Started — the run's own state, in the sandbox stage, with its `streamUrl` when you asked for a stream
3436
3538
  */
3437
- 201: LiveRun;
3539
+ 201: LiveRunWithStream;
3438
3540
  };
3439
3541
  type StartLiveResponse = StartLiveResponses[keyof StartLiveResponses];
3440
3542
  type ListLiveData = {
@@ -3495,6 +3597,31 @@ type ListPublicLiveResponses = {
3495
3597
  200: PublicLiveListResponse;
3496
3598
  };
3497
3599
  type ListPublicLiveResponse = ListPublicLiveResponses[keyof ListPublicLiveResponses];
3600
+ type GetLiveRunData = {
3601
+ body?: never;
3602
+ path: {
3603
+ /**
3604
+ * The `runId` from `POST`/`GET`/`DELETE` `.../live`, from `GET /live` or from `GET /live/public`
3605
+ */
3606
+ runId: string;
3607
+ };
3608
+ query?: never;
3609
+ url: "/live/{runId}";
3610
+ };
3611
+ type GetLiveRunErrors = {
3612
+ /**
3613
+ * No such run, or you do not own it — the two look identical on purpose.
3614
+ */
3615
+ 404: ResponseError;
3616
+ };
3617
+ type GetLiveRunError = GetLiveRunErrors[keyof GetLiveRunErrors];
3618
+ type GetLiveRunResponses = {
3619
+ /**
3620
+ * The run
3621
+ */
3622
+ 200: LiveRunDetail;
3623
+ };
3624
+ type GetLiveRunResponse = GetLiveRunResponses[keyof GetLiveRunResponses];
3498
3625
  type UpdateLiveData = {
3499
3626
  body?: UpdateLiveRequest;
3500
3627
  path: {
@@ -3596,6 +3723,64 @@ type SendLiveCommandResponses = {
3596
3723
  202: LiveCommandResult;
3597
3724
  };
3598
3725
  type SendLiveCommandResponse = SendLiveCommandResponses[keyof SendLiveCommandResponses];
3726
+ type RevokeLiveStreamData = {
3727
+ body?: never;
3728
+ path: {
3729
+ runId: string;
3730
+ };
3731
+ query?: never;
3732
+ url: "/live/{runId}/stream";
3733
+ };
3734
+ type RevokeLiveStreamErrors = {
3735
+ /**
3736
+ * No such run, or you do not own it.
3737
+ */
3738
+ 404: ResponseError;
3739
+ /**
3740
+ * The run was started without a stream, so there is nothing to revoke.
3741
+ */
3742
+ 409: ResponseError;
3743
+ };
3744
+ type RevokeLiveStreamError = RevokeLiveStreamErrors[keyof RevokeLiveStreamErrors];
3745
+ type RevokeLiveStreamResponses = {
3746
+ /**
3747
+ * Revoked (or already revoked).
3748
+ */
3749
+ 200: LiveStreamRevoked;
3750
+ };
3751
+ type RevokeLiveStreamResponse = RevokeLiveStreamResponses[keyof RevokeLiveStreamResponses];
3752
+ type RotateLiveStreamData = {
3753
+ body?: never;
3754
+ path: {
3755
+ runId: string;
3756
+ };
3757
+ query?: never;
3758
+ url: "/live/{runId}/stream";
3759
+ };
3760
+ type RotateLiveStreamErrors = {
3761
+ /**
3762
+ * No such run, or you do not own it.
3763
+ */
3764
+ 404: ResponseError;
3765
+ /**
3766
+ * One of three reasons, each its own message: the run was started without a stream; its stream was
3767
+ * revoked (a revoked stream cannot be restored: start the run again with a stream); or the run is stopped.
3768
+ *
3769
+ */
3770
+ 409: ResponseError;
3771
+ /**
3772
+ * Your plan does not let you broadcast a run's signals. The message names your plan; retrying will not help until it changes, so there is no `Retry-After`.
3773
+ */
3774
+ 429: ResponseError;
3775
+ };
3776
+ type RotateLiveStreamError = RotateLiveStreamErrors[keyof RotateLiveStreamErrors];
3777
+ type RotateLiveStreamResponses = {
3778
+ /**
3779
+ * The new URL.
3780
+ */
3781
+ 200: LiveStreamUrl;
3782
+ };
3783
+ type RotateLiveStreamResponse = RotateLiveStreamResponses[keyof RotateLiveStreamResponses];
3599
3784
  type GetLiveRunSignalsData = {
3600
3785
  body?: never;
3601
3786
  path: {
@@ -4316,7 +4501,8 @@ declare const getDatasetImport: <ThrowOnError extends boolean = false>(options:
4316
4501
  * Requests a stop. The run winds down at its own next check-in rather than instantly —
4317
4502
  * poll `GET`/`PATCH` `.../live` and expect `state` to remain `RUNNING` for a short window
4318
4503
  * after `desired` flips to `STOPPED`. Calling this again on an already-stopped run is not an
4319
- * error; it returns the same (unchanged) state.
4504
+ * error; it returns the same (unchanged) state. A stopped run has no stream: its `streamUrl`, if it had one,
4505
+ * stops working and is not in this response.
4320
4506
  *
4321
4507
  */
4322
4508
  declare const stopLive: <ThrowOnError extends boolean = false>(options: Options<StopLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRun, ResponseError, ThrowOnError>;
@@ -4324,10 +4510,15 @@ declare const stopLive: <ThrowOnError extends boolean = false>(options: Options<
4324
4510
  * Get this strategy's current (or most recent) live run
4325
4511
  * The run you last started for this strategy — its most complete state, including `params`
4326
4512
  * and the promotion `gate` once the sandbox trial has one to report. Returns the run's last
4327
- * known state even after it has stopped; this endpoint never disappears history.
4513
+ * known state even after it has stopped; this endpoint never disappears history. When the run was started
4514
+ * with a `stream`, `streamUrl` is here too while the run is running and your plan allows it.
4515
+ *
4516
+ * While the run is being executed it also carries `stats`, the run's latest counters (updates
4517
+ * processed, rate, instruments seen), refreshed about once a minute. Starting or stopping a run
4518
+ * does not return them; read them here.
4328
4519
  *
4329
4520
  */
4330
- declare const getLive: <ThrowOnError extends boolean = false>(options: Options<GetLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRun, ResponseError, ThrowOnError>;
4521
+ declare const getLive: <ThrowOnError extends boolean = false>(options: Options<GetLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRunWithStream, ResponseError, ThrowOnError>;
4331
4522
  /**
4332
4523
  * Start a strategy on a live market feed
4333
4524
  * Starts your strategy against a live market feed. A new run always begins in the **sandbox**
@@ -4363,8 +4554,13 @@ declare const getLive: <ThrowOnError extends boolean = false>(options: Options<G
4363
4554
  * (it overrides `getExecutionCallback()`) has no other execution venue, so it cannot start
4364
4555
  * without a `paper` block.
4365
4556
  *
4557
+ * **A plain WebSocket stream.** Pass `stream: true` to get a secret URL for this run's signals that a simple
4558
+ * client, or a service that passes them on to others, can open as an ordinary WebSocket, from the sandbox stage
4559
+ * on. The URL is in the response (`streamUrl`) and in `GET /strategy/{strategyId}/live`; treat it like a
4560
+ * password. See the "Live execution" guide.
4561
+ *
4366
4562
  */
4367
- declare const startLive: <ThrowOnError extends boolean = false>(options: Options<StartLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRun, ResponseError, ThrowOnError>;
4563
+ declare const startLive: <ThrowOnError extends boolean = false>(options: Options<StartLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRunWithStream, ResponseError, ThrowOnError>;
4368
4564
  /**
4369
4565
  * List your own live runs
4370
4566
  * Every run you have started, in any `stage`, `desired` state, or `visibility` — newest
@@ -4383,6 +4579,22 @@ declare const listLive: <ThrowOnError extends boolean = false>(options?: Options
4383
4579
  *
4384
4580
  */
4385
4581
  declare const listPublicLive: <ThrowOnError extends boolean = false>(options?: Options<ListPublicLiveData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<PublicLiveListResponse, ResponseError, ThrowOnError>;
4582
+ /**
4583
+ * Read one of your runs by its id
4584
+ * Owner only, addressed by `runId` directly rather than through its strategy: the run's own
4585
+ * canonical identity, which is what `POST`/`GET`/`DELETE` `.../live`, `GET /live` and
4586
+ * `GET /live/public` all hand out. Use it to re-read one specific run — including one you
4587
+ * stopped long ago or that is no longer your strategy's most recent — without paging through
4588
+ * `GET /live`.
4589
+ *
4590
+ * Returns the same state as `GET /strategy/{strategyId}/live` (`strategyId` is the strategy's
4591
+ * id, and `stats` is there too), plus `updatedAtMs`: when the run last changed, from any cause — a
4592
+ * state change, a promotion, a parameter update, a stop. A refresh of `stats` is not a change of
4593
+ * the run and does not move `updatedAtMs`. A run that is public is reachable by others through
4594
+ * `GET /live/public`, never through this route.
4595
+ *
4596
+ */
4597
+ declare const getLiveRun: <ThrowOnError extends boolean = false>(options: Options<GetLiveRunData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveRunDetail, ResponseError, ThrowOnError>;
4386
4598
  /**
4387
4599
  * Change a run's visibility, name, or description
4388
4600
  * Owner only, addressed by `runId` directly rather than through its strategy — this is a
@@ -4428,6 +4640,27 @@ declare const updateLiveParams: <ThrowOnError extends boolean = false>(options:
4428
4640
  *
4429
4641
  */
4430
4642
  declare const sendLiveCommand: <ThrowOnError extends boolean = false>(options: Options<SendLiveCommandData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveCommandResult, ResponseError, ThrowOnError>;
4643
+ /**
4644
+ * Revoke a run's stream URL
4645
+ * Revokes a run's stream URL **for good**: connections open on it are closed within about 15 seconds and it
4646
+ * answers `404` from then on. The run itself is not touched, and a stream cannot be added to it again; start
4647
+ * the run again with `stream: true` for a new URL. Owner only, and always allowed, whatever your plan or the
4648
+ * run's state. Repeating it is not an error.
4649
+ *
4650
+ */
4651
+ declare const revokeLiveStream: <ThrowOnError extends boolean = false>(options: Options<RevokeLiveStreamData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveStreamRevoked, ResponseError, ThrowOnError>;
4652
+ /**
4653
+ * Rotate a run's stream URL
4654
+ * Gives a run a **new** stream URL and retires the old one: connections open on the old URL are closed
4655
+ * within about 15 seconds and the old URL answers `404` from then on. Use it when the URL may have leaked.
4656
+ * Owner only, and only for a run that is running and was started with `stream: true` (the URL cannot be added
4657
+ * to a run later, and a revoked one cannot be brought back). The plan is checked again: a plan that may not
4658
+ * broadcast gets `429`.
4659
+ *
4660
+ * See the "Live execution" guide, "A plain WebSocket stream of a run".
4661
+ *
4662
+ */
4663
+ declare const rotateLiveStream: <ThrowOnError extends boolean = false>(options: Options<RotateLiveStreamData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<LiveStreamUrl, ResponseError, ThrowOnError>;
4431
4664
  /**
4432
4665
  * Read a run's signals
4433
4666
  * Returns one page of the signals a run has already produced, newest-last, optionally from a
@@ -4502,4 +4735,4 @@ declare const mintLiveConnectionToken: <ThrowOnError extends boolean = false>(op
4502
4735
 
4503
4736
  declare const client: _hey_api_client_fetch.Client;
4504
4737
 
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 };
4738
+ export { type AcceptedJob, type Account, type AccountLinks, type AccountUsage, type AccountUsageLinks, type AuthTokenError, type AuthTokenResponse, type AuthenticateData, type AuthenticateError, type AuthenticateErrors, type AuthenticateResponse, type AuthenticateResponses, type BacktestJobResult, type CancelBacktestData, type CancelBacktestError, type CancelBacktestErrors, type CancelBacktestResponse, type CancelBacktestResponses, type CancelSweepData, type CancelSweepError, type CancelSweepErrors, type CancelSweepResponse, type CancelSweepResponses, type ClientOptions, type CompileStrategyData, type CompileStrategyError, type CompileStrategyErrors, type CompileStrategyResponse, type CompileStrategyResponses, type CoverageWindow, type CreateDatasetData, type CreateDatasetError, type CreateDatasetErrors, type CreateDatasetResponse, type CreateDatasetResponses, type DataSourceType, type Dataset, type DatasetCreated, type DatasetImportCreated, type DatasetImportDexRequest, type DatasetImportRequest, type DatasetImportState, type DatasetUploadSession, type DatasetUploadState, type DatasetUploadTarget, type DatasetVersion, type DatasetWithLinks, type DeclaredProperty, type DeleteDatasetData, type DeleteDatasetError, type DeleteDatasetErrors, type DeleteDatasetResponse, type DeleteDatasetResponses, type DeleteStrategyData, type DeleteStrategyError, type DeleteStrategyErrors, type DeleteStrategyResponse, type DeleteStrategyResponses, type DownloadKlinesData, type DownloadKlinesError, type DownloadKlinesErrors, type DownloadKlinesResponse, type DownloadKlinesResponses, type DownloadTickersData, type DownloadTickersError, type DownloadTickersErrors, type DownloadTickersResponse, type DownloadTickersResponses, type EquityCurveMeta, type EquityCurveOptions, type EquityCurveOutMode, type EquityCurveRequest, type EquityCurveResult, type EquityPoint, type Exchange, type ExecuteBacktestData, type ExecuteBacktestError, type ExecuteBacktestErrors, type ExecuteBacktestResponse, type ExecuteBacktestResponses, type ExecuteSweepAccepted, type ExecuteSweepData, type ExecuteSweepError, type ExecuteSweepErrors, type ExecuteSweepRequest, type ExecuteSweepResponse, type ExecuteSweepResponses, type ExecuteSweepResult, type FinalizeDatasetUploadData, type FinalizeDatasetUploadError, type FinalizeDatasetUploadErrors, type FinalizeDatasetUploadResponse, type FinalizeDatasetUploadResponses, type GetAccountData, type GetAccountResponse, type GetAccountResponses, type GetAccountUsageData, type GetAccountUsageResponse, type GetAccountUsageResponses, type GetBacktestResultData, type GetBacktestResultError, type GetBacktestResultErrors, type GetBacktestResultResponse, type GetBacktestResultResponses, type GetDatasetData, type GetDatasetError, type GetDatasetErrors, type GetDatasetImportData, type GetDatasetImportError, type GetDatasetImportErrors, type GetDatasetImportResponse, type GetDatasetImportResponses, type GetDatasetResponse, type GetDatasetResponses, type GetDatasetUploadData, type GetDatasetUploadError, type GetDatasetUploadErrors, type GetDatasetUploadResponse, type GetDatasetUploadResponses, type GetLiveData, type GetLiveError, type GetLiveErrors, type GetLiveResponse, type GetLiveResponses, type GetLiveRunData, type GetLiveRunError, type GetLiveRunErrors, type GetLiveRunPaperData, type GetLiveRunPaperEquityData, type GetLiveRunPaperEquityError, type GetLiveRunPaperEquityErrors, type GetLiveRunPaperEquityResponse, type GetLiveRunPaperEquityResponses, type GetLiveRunPaperError, type GetLiveRunPaperErrors, type GetLiveRunPaperResponse, type GetLiveRunPaperResponses, type GetLiveRunResponse, type GetLiveRunResponses, type GetLiveRunSignalsData, type GetLiveRunSignalsError, type GetLiveRunSignalsErrors, type GetLiveRunSignalsResponse, type GetLiveRunSignalsResponses, type GetPrepareStatusData, type GetPrepareStatusError, type GetPrepareStatusErrors, type GetPrepareStatusResponse, type GetPrepareStatusResponses, type GetStrategyCodeData, type GetStrategyCodeError, type GetStrategyCodeErrors, type GetStrategyCodeResponse, type GetStrategyCodeResponses, type GetStrategyData, type GetStrategyError, type GetStrategyErrors, type GetStrategyResponse, type GetStrategyResponses, type GetSweepResultData, type GetSweepResultError, type GetSweepResultErrors, type GetSweepResultResponse, type GetSweepResultResponses, type GetSweepRunEquityCurveData, type GetSweepRunEquityCurveError, type GetSweepRunEquityCurveErrors, type GetSweepRunEquityCurveResponse, type GetSweepRunEquityCurveResponses, type GetSweepSensitivityData, type GetSweepSensitivityError, type GetSweepSensitivityErrors, type GetSweepSensitivityResponse, type GetSweepSensitivityResponses, type HalLink, type ImportDatasetData, type ImportDatasetError, type ImportDatasetErrors, type ImportDatasetResponse, type ImportDatasetResponses, type Instrument, type InstrumentCoverage, type InstrumentDetail, type InstrumentLinks, type InstrumentListMeta, type InstrumentListResponse, type JobState, type ListDatasetsData, type ListDatasetsResponse, type ListDatasetsResponses, type ListExchangesData, type ListExchangesResponse, type ListExchangesResponses, type ListInstrumentsData, type ListInstrumentsError, type ListInstrumentsErrors, type ListInstrumentsResponse, type ListInstrumentsResponses, type ListLiveData, type ListLiveError, type ListLiveErrors, type ListLiveResponse, type ListLiveResponses, type ListPublicLiveData, type ListPublicLiveError, type ListPublicLiveErrors, type ListPublicLiveResponse, type ListPublicLiveResponses, type ListSegmentInstrumentsData, type ListSegmentInstrumentsError, type ListSegmentInstrumentsErrors, type ListSegmentInstrumentsResponse, type ListSegmentInstrumentsResponses, type ListStrategiesData, type ListStrategiesResponse, type ListStrategiesResponses, type LiveCommandResult, type LiveConnectionToken, type LiveListResponse, type LivePaper, type LivePaperAccount, type LivePaperConfig, type LivePaperEquityPage, type LivePaperEquityPoint, type LivePaperKpi, type LivePaperPosition, type LiveParamsUpdateResult, type LiveRun, type LiveRunCompact, type LiveRunDetail, type LiveRunStats, type LiveRunSummary, type LiveRunWithStream, type LiveSignal, type LiveSignalInstrument, type LiveSignalOrder, type LiveSignalPage, type LiveSource, type LiveStreamRevoked, type LiveStreamUrl, type MintLiveConnectionTokenData, type MintLiveConnectionTokenResponse, type MintLiveConnectionTokenResponses, type Notice, type OpenDatasetUploadData, type OpenDatasetUploadError, type OpenDatasetUploadErrors, type OpenDatasetUploadResponse, type OpenDatasetUploadResponses, type Options, type PrepareBacktestData, type PrepareBacktestError, type PrepareBacktestErrors, type PrepareBacktestResponse, type PrepareBacktestResponses, type PrepareJobState, type PrepareRequest, type PublicLiveListLinks, type PublicLiveListResponse, type PublicLiveNextLink, type PublicLiveRun, type ResponseError, type ResultMap, type RevokeLiveStreamData, type RevokeLiveStreamError, type RevokeLiveStreamErrors, type RevokeLiveStreamResponse, type RevokeLiveStreamResponses, type RotateLiveStreamData, type RotateLiveStreamError, type RotateLiveStreamErrors, type RotateLiveStreamResponse, type RotateLiveStreamResponses, type ScalarStrategyParamValue, type SendLiveCommandData, type SendLiveCommandError, type SendLiveCommandErrors, type SendLiveCommandRequest, type SendLiveCommandResponse, type SendLiveCommandResponses, type StartLiveData, type StartLiveError, type StartLiveErrors, type StartLiveRequest, type StartLiveResponse, type StartLiveResponses, type StopLiveData, type StopLiveError, type StopLiveErrors, type StopLiveResponse, type StopLiveResponses, type StrategyId, type StrategyLinks, type StrategyState, type StrategySummary, type SweepAxis, type SweepBaseConfig, type SweepHeatmap, type SweepHeatmapCell, type SweepMarginal, type SweepMarginalPoint, type SweepProgress, type SweepRunRow, type SweepSensitivity, type SweepSpecRequest, type UpdateLiveData, type UpdateLiveError, type UpdateLiveErrors, type UpdateLiveParamsData, type UpdateLiveParamsError, type UpdateLiveParamsErrors, type UpdateLiveParamsRequest, type UpdateLiveParamsResponse, type UpdateLiveParamsResponses, type UpdateLiveRequest, type UpdateLiveResponse, type UpdateLiveResponses, type ValidateStrategyData, type ValidateStrategyError, type ValidateStrategyErrors, type ValidateStrategyResponse, type ValidateStrategyResponses, type WalkForwardAccepted, type WalkForwardFold, type WalkForwardRequest, type WalkForwardResult, authenticate, cancelBacktest, cancelSweep, client, compileStrategy, createDataset, deleteDataset, deleteStrategy, downloadKlines, downloadTickers, executeBacktest, executeSweep, finalizeDatasetUpload, getAccount, getAccountUsage, getBacktestResult, getDataset, getDatasetImport, getDatasetUpload, getLive, getLiveRun, getLiveRunPaper, getLiveRunPaperEquity, getLiveRunSignals, getPrepareStatus, getStrategy, getStrategyCode, getSweepResult, getSweepRunEquityCurve, getSweepSensitivity, importDataset, listDatasets, listExchanges, listInstruments, listLive, listPublicLive, listSegmentInstruments, listStrategies, mintLiveConnectionToken, openDatasetUpload, prepareBacktest, revokeLiveStream, rotateLiveStream, sendLiveCommand, startLive, stopLive, updateLive, updateLiveParams, validateStrategy };
package/dist/index.js CHANGED
@@ -459,6 +459,18 @@ var listPublicLive = (options) => {
459
459
  ...options
460
460
  });
461
461
  };
462
+ var getLiveRun = (options) => {
463
+ return (options.client ?? client).get({
464
+ security: [
465
+ {
466
+ scheme: "bearer",
467
+ type: "http"
468
+ }
469
+ ],
470
+ url: "/live/{runId}",
471
+ ...options
472
+ });
473
+ };
462
474
  var updateLive = (options) => {
463
475
  return (options.client ?? client).patch({
464
476
  security: [
@@ -507,6 +519,30 @@ var sendLiveCommand = (options) => {
507
519
  }
508
520
  });
509
521
  };
522
+ var revokeLiveStream = (options) => {
523
+ return (options.client ?? client).delete({
524
+ security: [
525
+ {
526
+ scheme: "bearer",
527
+ type: "http"
528
+ }
529
+ ],
530
+ url: "/live/{runId}/stream",
531
+ ...options
532
+ });
533
+ };
534
+ var rotateLiveStream = (options) => {
535
+ return (options.client ?? client).post({
536
+ security: [
537
+ {
538
+ scheme: "bearer",
539
+ type: "http"
540
+ }
541
+ ],
542
+ url: "/live/{runId}/stream",
543
+ ...options
544
+ });
545
+ };
510
546
  var getLiveRunSignals = (options) => {
511
547
  return (options.client ?? client).get({
512
548
  security: [
@@ -576,6 +612,7 @@ export {
576
612
  getDatasetImport,
577
613
  getDatasetUpload,
578
614
  getLive,
615
+ getLiveRun,
579
616
  getLiveRunPaper,
580
617
  getLiveRunPaperEquity,
581
618
  getLiveRunSignals,
@@ -596,6 +633,8 @@ export {
596
633
  mintLiveConnectionToken,
597
634
  openDatasetUpload,
598
635
  prepareBacktest,
636
+ revokeLiveStream,
637
+ rotateLiveStream,
599
638
  sendLiveCommand,
600
639
  startLive,
601
640
  stopLive,