@totalis/hip4-client 0.127.0 → 0.129.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/CHANGELOG.md +95 -0
- package/README.md +7 -1
- package/dist/book-walk.d.ts +221 -0
- package/dist/book-walk.js +336 -0
- package/dist/client.d.ts +6 -3
- package/dist/client.js +5 -2
- package/dist/generated/browse.d.ts +18 -5
- package/dist/generated/client.d.ts +4 -1
- package/dist/generated/errors.d.ts +3 -0
- package/dist/generated/errors.js +30 -0
- package/dist/generated/maker.d.ts +2 -1
- package/dist/generated/openapi.d.ts +422 -17
- package/dist/generated/realtime.d.ts +6 -6
- package/dist/generated/version.d.ts +7 -7
- package/dist/generated/version.js +9 -5
- package/dist/money.d.ts +102 -0
- package/dist/money.js +125 -0
- package/dist/outcome-fees.d.ts +56 -0
- package/dist/outcome-fees.js +70 -0
- package/dist/shown.d.ts +39 -0
- package/dist/shown.js +70 -0
- package/dist/singles.d.ts +35 -4
- package/dist/singles.js +26 -25
- package/dist/totalis.d.ts +12 -0
- package/dist/totalis.js +27 -4
- package/package.json +3 -2
|
@@ -385,6 +385,46 @@ export type paths = {
|
|
|
385
385
|
readonly patch?: never;
|
|
386
386
|
readonly trace?: never;
|
|
387
387
|
};
|
|
388
|
+
readonly "/v1/hypercore/orders/{cloid}": {
|
|
389
|
+
readonly parameters: {
|
|
390
|
+
readonly query?: never;
|
|
391
|
+
readonly header?: never;
|
|
392
|
+
readonly path?: never;
|
|
393
|
+
readonly cookie?: never;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Settle a HyperCore IOC by its cloid
|
|
397
|
+
* @description Settles one order by its client order ID from our node's block-by-block order history, never from Hyperliquid's API: FOUND with its status and fills, ABSENT once it never reached matching and no longer can, or UNPROVEN with why. Precondition: a HIP-4 limit IOC placed for the selected linked main account itself, the wallet the session's account uses, not a subaccount or vault; an agent may have signed it, but this read names the wallet. History holds only HIP-4 coins and keeps every status that ends an IOC but not a resting order cancelled with nothing filled, so for any other order ABSENT proves nothing. Pass the signed action's nonce and expires_after: Hyperliquid lands an action only in a block less than a day after its nonce and no later than its expires_after. An action it refused before matching (a bad signature, an expired action, an order under the minimum) leaves no status and is ABSENT too: nothing happened and nothing can. The deadline alone is never proof: until history passes it the answer is UNPROVEN BEHIND. The read writes nothing. Testnet and Mainnet.
|
|
398
|
+
*/
|
|
399
|
+
readonly get: operations["getHypercoreOrderProof"];
|
|
400
|
+
readonly put?: never;
|
|
401
|
+
readonly post?: never;
|
|
402
|
+
readonly delete?: never;
|
|
403
|
+
readonly options?: never;
|
|
404
|
+
readonly head?: never;
|
|
405
|
+
readonly patch?: never;
|
|
406
|
+
readonly trace?: never;
|
|
407
|
+
};
|
|
408
|
+
readonly "/v1/hypercore/order-history": {
|
|
409
|
+
readonly parameters: {
|
|
410
|
+
readonly query?: never;
|
|
411
|
+
readonly header?: never;
|
|
412
|
+
readonly path?: never;
|
|
413
|
+
readonly cookie?: never;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Get the HyperCore order history cursor
|
|
417
|
+
* @description The last block of our node order history that proves IOCs for the selected linked main account: the source of after_height for GET /v1/hypercore/orders/{cloid}. A height read here before an order is signed proves it; any older one too, as it only widens the window. Read it in the background and keep the latest; never on the way to signing. The read writes nothing. Testnet and Mainnet.
|
|
418
|
+
*/
|
|
419
|
+
readonly get: operations["getHypercoreOrderHistory"];
|
|
420
|
+
readonly put?: never;
|
|
421
|
+
readonly post?: never;
|
|
422
|
+
readonly delete?: never;
|
|
423
|
+
readonly options?: never;
|
|
424
|
+
readonly head?: never;
|
|
425
|
+
readonly patch?: never;
|
|
426
|
+
readonly trace?: never;
|
|
427
|
+
};
|
|
388
428
|
readonly "/v1/hypercore/positions": {
|
|
389
429
|
readonly parameters: {
|
|
390
430
|
readonly query?: never;
|
|
@@ -2492,7 +2532,7 @@ export type paths = {
|
|
|
2492
2532
|
*
|
|
2493
2533
|
* Deprecated: the chart read `GET /v1/charts/{series}` replaces it. It keeps working until its removal, which gets a dated notice first.
|
|
2494
2534
|
*
|
|
2495
|
-
* With `bucket=MINUTE`, the default,
|
|
2535
|
+
* It reads the same chance line as the chart read. With `bucket=MINUTE`, the default, each full minute closes at the chance the market showed at its end, whatever its `chance_basis`; a minute ending unknown is absent. With `bucket=HOUR` each UTC hour carries the close of its last known minute over a window of up to 90 days, for charts longer than a day. NO is exactly 10^18 minus YES, and nothing before 2026-10-18 18:53 UTC is served. Each run `[bucket, close, buckets]` covers `buckets` consecutive known buckets of `bucket_seconds` from `bucket` (Unix seconds) that closed at `close`; a missing bucket or a new close starts a new run. Never fill a bucket between runs.
|
|
2496
2536
|
*/
|
|
2497
2537
|
readonly get: operations["getMarketReferenceCloses"];
|
|
2498
2538
|
readonly put?: never;
|
|
@@ -2839,7 +2879,7 @@ export type paths = {
|
|
|
2839
2879
|
*
|
|
2840
2880
|
* Deprecated: the chart read `GET /v1/charts/{series}` replaces it. It keeps working until its removal, which gets a dated notice first.
|
|
2841
2881
|
*
|
|
2842
|
-
* Totalis records the mark of every perp a listed price market charts from its own Hyperliquid node about once a second
|
|
2882
|
+
* It reads the same mark line as the chart read: Totalis records the mark of every perp a listed price market charts from its own Hyperliquid node about once a second, every change for seven days and each minute's close for good. Each step closes at the mark held at its end, from those changes for 5-second steps and from minute closes for 60- and 300-second steps; steps group into runs `[step, mark, steps]` of `step_seconds` from `step` (Unix seconds). A step whose end the record cannot prove, because no read of the node came within 2.5 seconds, is absent: never fill it. `through` is the end of the last step the record reaches; everything up to it is final, so a client reads only what came after it next time and takes the newest price from its live feed. A perp no listed market has charted in the last four days is 404 NOT_FOUND.
|
|
2843
2883
|
*/
|
|
2844
2884
|
readonly get: operations["getPerpMarks"];
|
|
2845
2885
|
readonly put?: never;
|
|
@@ -2896,6 +2936,32 @@ export type paths = {
|
|
|
2896
2936
|
readonly patch?: never;
|
|
2897
2937
|
readonly trace?: never;
|
|
2898
2938
|
};
|
|
2939
|
+
readonly "/v1/polymarket/markets/{outcome_id}": {
|
|
2940
|
+
readonly parameters: {
|
|
2941
|
+
readonly query?: never;
|
|
2942
|
+
readonly header?: never;
|
|
2943
|
+
readonly path: {
|
|
2944
|
+
/**
|
|
2945
|
+
* @description HIP-4 outcome ID of the market, as a decimal string.
|
|
2946
|
+
* @example 1209
|
|
2947
|
+
*/
|
|
2948
|
+
readonly outcome_id: components["parameters"]["OutcomeId"];
|
|
2949
|
+
};
|
|
2950
|
+
readonly cookie?: never;
|
|
2951
|
+
};
|
|
2952
|
+
/**
|
|
2953
|
+
* Get Polymarket market
|
|
2954
|
+
* @description Anyone: get a listed Polymarket market by its outcome id: what it asks, its rules, its sides and their Polymarket tokens, its registry entry and what the vault sees of it now. A Polymarket market's outcome id is 2147483648 (2^31) or above; prices come on the market stream under the same id.
|
|
2955
|
+
*/
|
|
2956
|
+
readonly get: operations["getPolymarketMarket"];
|
|
2957
|
+
readonly put?: never;
|
|
2958
|
+
readonly post?: never;
|
|
2959
|
+
readonly delete?: never;
|
|
2960
|
+
readonly options?: never;
|
|
2961
|
+
readonly head?: never;
|
|
2962
|
+
readonly patch?: never;
|
|
2963
|
+
readonly trace?: never;
|
|
2964
|
+
};
|
|
2899
2965
|
readonly "/v1/rfqs/{rfq_id}": {
|
|
2900
2966
|
readonly parameters: {
|
|
2901
2967
|
readonly query?: never;
|
|
@@ -5998,8 +6064,10 @@ export type components = {
|
|
|
5998
6064
|
* @enum {string}
|
|
5999
6065
|
*/
|
|
6000
6066
|
readonly fit: "ICON" | "PHOTO";
|
|
6001
|
-
/** @description Square WebP renditions at 64, 128 and 256 pixels, in that order. Their URLs never change content. */
|
|
6067
|
+
/** @description Square WebP renditions at 64, 128 and 256 pixels, in that order. Their URLs never change content. Drawn on dark grounds, and on light ones where `light_variants` is absent. */
|
|
6002
6068
|
readonly variants: readonly components["schemas"]["PictureVariant"][];
|
|
6069
|
+
/** @description Only when asked with light=true: the same sizes drawn on light grounds, for artwork that vanishes there (a white mark); absent where `variants` read on any ground. */
|
|
6070
|
+
readonly light_variants?: readonly components["schemas"]["PictureVariant"][];
|
|
6003
6071
|
/** @description The image's chromatic colors, most used first, for team and chart line colors; absent where imagery recorded none. A line wears its side's `own` subject's palette when that subject has an image, or, when it is a chart's only line and its side's own subject has none, `market`'s; a line whose `pick` is a glyph wears none. */
|
|
6004
6072
|
readonly palette?: readonly components["schemas"]["OklchColor"][];
|
|
6005
6073
|
};
|
|
@@ -6795,9 +6863,9 @@ export type components = {
|
|
|
6795
6863
|
/** @description Inclusive UTC start of a one-minute bucket, in Unix seconds. */
|
|
6796
6864
|
readonly UnixMinute: number;
|
|
6797
6865
|
readonly ReferenceClose: {
|
|
6798
|
-
/** @description Bucket start of
|
|
6866
|
+
/** @description Bucket start of that earlier minute, in Unix seconds. */
|
|
6799
6867
|
readonly minute: components["schemas"]["UnixMinute"];
|
|
6800
|
-
/** @description
|
|
6868
|
+
/** @description The chance held at that minute's end, at the response's scale. */
|
|
6801
6869
|
readonly close: components["schemas"]["IntegerValue"];
|
|
6802
6870
|
};
|
|
6803
6871
|
/** @description [bucket, close, buckets]: buckets consecutive buckets of bucket_seconds starting at bucket, each observed and each closing at close. */
|
|
@@ -6812,36 +6880,36 @@ export type components = {
|
|
|
6812
6880
|
/** @description Market side every close describes, YES or NO. */
|
|
6813
6881
|
readonly side: components["schemas"]["Side"];
|
|
6814
6882
|
/**
|
|
6815
|
-
* @description Hyperliquid feed
|
|
6883
|
+
* @description Hyperliquid feed the chance line follows: always HYPERLIQUID_L2_BOOK.
|
|
6816
6884
|
* @enum {string}
|
|
6817
6885
|
*/
|
|
6818
6886
|
readonly source: "HYPERLIQUID_L2_BOOK" | "HYPERLIQUID_BBO" | "HYPERLIQUID_ALL_MIDS";
|
|
6819
6887
|
/**
|
|
6820
|
-
* @description BOOK_MID
|
|
6888
|
+
* @description Always BOOK_MID.
|
|
6821
6889
|
* @enum {string}
|
|
6822
6890
|
*/
|
|
6823
6891
|
readonly quality: "BOOK_MID" | "ALL_MIDS_FALLBACK";
|
|
6824
|
-
/** @description Divisor for every close and the anchor; null when there are neither.
|
|
6892
|
+
/** @description Divisor for every close and the anchor, 10^18; null when there are neither. */
|
|
6825
6893
|
readonly scale: components["schemas"]["Scale"] | null;
|
|
6826
6894
|
/** @description Authoritative window start. It repeats the request, or when from and to are both omitted the rolling default: 24 hours, or 90 days for bucket=HOUR. Reuse these bounds for later pages. */
|
|
6827
6895
|
readonly from: components["schemas"]["$defs-Timestamp"];
|
|
6828
6896
|
/** @description Authoritative exclusive window end. It repeats the request, or the request time when from and to are both omitted. Reuse these bounds for later pages. */
|
|
6829
6897
|
readonly to: components["schemas"]["$defs-Timestamp"];
|
|
6830
6898
|
/**
|
|
6831
|
-
* @description
|
|
6899
|
+
* @description The chance line is timed by Totalis receive time; only full closed minutes inside [from,to) count.
|
|
6832
6900
|
* @constant
|
|
6833
6901
|
*/
|
|
6834
6902
|
readonly bucket_time: "TOTALIS_RECEIVED_AT";
|
|
6835
6903
|
/**
|
|
6836
|
-
* @description 60 for bucket=MINUTE. 3600 for bucket=HOUR: each UTC hour inside the window carries the close of its last
|
|
6904
|
+
* @description 60 for bucket=MINUTE. 3600 for bucket=HOUR: each UTC hour inside the window carries the close of its last known minute, and the newest hour its last closed minute so far.
|
|
6837
6905
|
* @enum {integer}
|
|
6838
6906
|
*/
|
|
6839
6907
|
readonly bucket_seconds: 60 | 3600;
|
|
6840
|
-
/** @description Exclusive bucket boundary, the
|
|
6908
|
+
/** @description Exclusive bucket boundary, the earliest of to, server time and how far the chance line is recorded, rounded down to a minute. Take the current minute from the live market stream. */
|
|
6841
6909
|
readonly closed_before: components["schemas"]["$defs-Timestamp"];
|
|
6842
|
-
/** @description Close of the latest
|
|
6910
|
+
/** @description Close of the latest earlier minute that closed known, however long before from: a finished market's last known minute. It is an observed price, not proof that the value held through from. Null when there is none. */
|
|
6843
6911
|
readonly anchor: components["schemas"]["ReferenceClose"] | null;
|
|
6844
|
-
/** @description
|
|
6912
|
+
/** @description Known buckets in the window, ascending, grouped into runs of consecutive buckets with equal close. */
|
|
6845
6913
|
readonly runs: readonly components["schemas"]["CloseRun"][];
|
|
6846
6914
|
/** @description Pass as cursor with the same bucket, from and to to read the next page; null when there are no more buckets. limit counts buckets, not runs, so a run can continue on the next page. */
|
|
6847
6915
|
readonly next_cursor: components["schemas"]["NextCursor"];
|
|
@@ -7235,7 +7303,7 @@ export type components = {
|
|
|
7235
7303
|
} | null;
|
|
7236
7304
|
/** @description Where an ended line stops (the market's expiry or recorded settlement, the earlier, once passed; for a mark line, that of the market it was asked for): nothing at or after it is drawn. Between grid edges it cuts the last bucket to [its start, end). Null before. Until the settlement is recorded an end from the expiry may still move or go back to null when the expiry is revised (final false, cached as a live line); from the settlement on it is the earlier of the expiry in effect then and the settlement, and never moves. The chart read is the only source of a line's end: read again when the market stream shows the market expired, postponed or settled. */
|
|
7237
7305
|
readonly end: components["schemas"]["ChartMicros"] | null;
|
|
7238
|
-
/** @description True once end can no longer move: the market's settlement recorded it. False while end is null
|
|
7306
|
+
/** @description True once end can no longer move: the market's settlement recorded it. False while end is null or comes from the expiry alone. */
|
|
7239
7307
|
readonly final: boolean;
|
|
7240
7308
|
};
|
|
7241
7309
|
readonly LiveMark: {
|
|
@@ -7250,6 +7318,93 @@ export type components = {
|
|
|
7250
7318
|
/** @description Every perp a listed price market charts, by coin. A perp not listed is not read at all. Empty before the first read. */
|
|
7251
7319
|
readonly marks: readonly components["schemas"]["LiveMark"][];
|
|
7252
7320
|
};
|
|
7321
|
+
readonly PolymarketRegistryEntry: {
|
|
7322
|
+
/**
|
|
7323
|
+
* @description Polymarket's contract generation: 1 for the CTF, 2 for the V2 modules.
|
|
7324
|
+
* @enum {integer}
|
|
7325
|
+
*/
|
|
7326
|
+
readonly version: 1 | 2;
|
|
7327
|
+
/** @description Polymarket's condition id of the market, as Gamma gives it. */
|
|
7328
|
+
readonly ref: components["schemas"]["Bytes32"];
|
|
7329
|
+
/** @description Unix seconds from which the market takes no new tickets. It only ever moves earlier. */
|
|
7330
|
+
readonly closes_at: components["schemas"]["UInt64String"];
|
|
7331
|
+
/** @description The neg-risk group the market shares with the rest of its Polymarket event, 2147483648 or above; 4294967295 for a market in no group. A combo takes at most one leg of a group. */
|
|
7332
|
+
readonly question: components["schemas"]["UInt32String"];
|
|
7333
|
+
};
|
|
7334
|
+
readonly PolymarketResult: {
|
|
7335
|
+
/** @description YES's payout in hundred-millionths: 100000000 when YES won, 0 when NO won, and in between for a split result (50000000 for 50/50). */
|
|
7336
|
+
readonly value: components["schemas"]["UInt64String"];
|
|
7337
|
+
};
|
|
7338
|
+
readonly PolymarketSide: {
|
|
7339
|
+
/** @description YES or NO. */
|
|
7340
|
+
readonly side: components["schemas"]["Side"];
|
|
7341
|
+
/** @description Polymarket's name for the outcome. */
|
|
7342
|
+
readonly label: string;
|
|
7343
|
+
/** @description The outcome's token on Polymarket's order book. */
|
|
7344
|
+
readonly clob_token_id: components["schemas"]["Uint"];
|
|
7345
|
+
/** @description The outcome's position on Polygon, the same number as clob_token_id. */
|
|
7346
|
+
readonly position_id: components["schemas"]["Uint"];
|
|
7347
|
+
};
|
|
7348
|
+
/** @description Positive signed 64-bit decimal integer, at most 9223372036854775807. */
|
|
7349
|
+
readonly PositiveInt64String: string;
|
|
7350
|
+
readonly PolymarketSource: {
|
|
7351
|
+
/** @description Gamma's id of the market. */
|
|
7352
|
+
readonly market_id: components["schemas"]["PositiveInt64String"];
|
|
7353
|
+
/** @description Gamma's slug of the market. */
|
|
7354
|
+
readonly slug: string;
|
|
7355
|
+
/** @description Gamma's id of the market's event. */
|
|
7356
|
+
readonly event_id: components["schemas"]["PositiveInt64String"];
|
|
7357
|
+
/** @description Gamma's slug of the event. */
|
|
7358
|
+
readonly event_slug: string;
|
|
7359
|
+
/** @description Polymarket's condition id, the same as registry.ref. */
|
|
7360
|
+
readonly condition_id: components["schemas"]["Bytes32"];
|
|
7361
|
+
/** @description The question id of a version 1 market; null for version 2. */
|
|
7362
|
+
readonly question_id: components["schemas"]["Bytes32"] | null;
|
|
7363
|
+
/** @description Whether the market is one outcome of a neg-risk event. */
|
|
7364
|
+
readonly neg_risk: boolean;
|
|
7365
|
+
/** @description The neg-risk event's id on a version 1 neg-risk market; null otherwise. */
|
|
7366
|
+
readonly neg_risk_market_id: components["schemas"]["Bytes32"] | null;
|
|
7367
|
+
/** @description When the game starts, for a sports market; null otherwise. On a tournament market it is the tournament's start. */
|
|
7368
|
+
readonly game_start_time: components["schemas"]["$defs-Timestamp"] | null;
|
|
7369
|
+
/** @description Polymarket's end date for the market. */
|
|
7370
|
+
readonly end_date: components["schemas"]["$defs-Timestamp"];
|
|
7371
|
+
/** @description The market's page on Polymarket. */
|
|
7372
|
+
readonly url: string;
|
|
7373
|
+
};
|
|
7374
|
+
readonly PolymarketMarket: {
|
|
7375
|
+
/** @description The vault's id of the market, 2147483648 (2^31) or above; every id from there up is a Polymarket market. */
|
|
7376
|
+
readonly outcome_id: components["schemas"]["UInt32String"];
|
|
7377
|
+
/**
|
|
7378
|
+
* @description Where the market and its result come from.
|
|
7379
|
+
* @constant
|
|
7380
|
+
*/
|
|
7381
|
+
readonly source: "POLYMARKET";
|
|
7382
|
+
/** @description The market's entry in PolymarketResults on HyperEVM, as last read. */
|
|
7383
|
+
readonly registry: components["schemas"]["PolymarketRegistryEntry"];
|
|
7384
|
+
/**
|
|
7385
|
+
* @description What the vault sees, read from PolymarketResults at most a minute ago (every 15 seconds while reads succeed; past a minute the read is MARKET_DATA_UNAVAILABLE). ACTIVE: open for new tickets until registry.closes_at. CLOSED: past its close with no result yet, or a result was vetoed; tickets wait. RESULT_PENDING: a result arrived and waits out its challenge delay. SETTLED: final.
|
|
7386
|
+
* @enum {string}
|
|
7387
|
+
*/
|
|
7388
|
+
readonly state: "ACTIVE" | "CLOSED" | "RESULT_PENDING" | "SETTLED";
|
|
7389
|
+
/** @description The final result once state is SETTLED, otherwise null. */
|
|
7390
|
+
readonly result: components["schemas"]["PolymarketResult"] | null;
|
|
7391
|
+
/** @description Polymarket's question. */
|
|
7392
|
+
readonly title: string;
|
|
7393
|
+
/** @description Polymarket's resolution rules, as Polymarket words them. */
|
|
7394
|
+
readonly rules: string;
|
|
7395
|
+
/** @description Polymarket's image URL for the market; empty when it has none. */
|
|
7396
|
+
readonly image: string;
|
|
7397
|
+
/** @description YES then NO. YES is Polymarket's first outcome, which may be a team or a name rather than Yes. */
|
|
7398
|
+
readonly sides: readonly components["schemas"]["PolymarketSide"][];
|
|
7399
|
+
/** @description The market on Polymarket. */
|
|
7400
|
+
readonly polymarket: components["schemas"]["PolymarketSource"];
|
|
7401
|
+
/** @description When Totalis first read the market from the registry. */
|
|
7402
|
+
readonly listed_at: components["schemas"]["$defs-Timestamp"];
|
|
7403
|
+
};
|
|
7404
|
+
readonly PolymarketMarketDetails: {
|
|
7405
|
+
/** @description The listed Polymarket market. */
|
|
7406
|
+
readonly market: components["schemas"]["PolymarketMarket"];
|
|
7407
|
+
};
|
|
7253
7408
|
readonly BalanceComponent: {
|
|
7254
7409
|
/**
|
|
7255
7410
|
* @description WALLET_USDC: embedded wallet USDC on HyperEVM; VAULT_FREE: unreserved cash held for the account in the Totalis vault.
|
|
@@ -8009,7 +8164,7 @@ export type components = {
|
|
|
8009
8164
|
*/
|
|
8010
8165
|
readonly PerpMarksTo: string;
|
|
8011
8166
|
/**
|
|
8012
|
-
* @description MINUTE for one-minute closes, HOUR for each UTC hour's last
|
|
8167
|
+
* @description MINUTE for one-minute closes, HOUR for each UTC hour's last known minute.
|
|
8013
8168
|
* @example HOUR
|
|
8014
8169
|
*/
|
|
8015
8170
|
readonly CloseBucket: "MINUTE" | "HOUR";
|
|
@@ -9132,6 +9287,163 @@ export interface operations {
|
|
|
9132
9287
|
readonly 503: components["responses"]["Unavailable"];
|
|
9133
9288
|
};
|
|
9134
9289
|
};
|
|
9290
|
+
readonly getHypercoreOrderProof: {
|
|
9291
|
+
readonly parameters: {
|
|
9292
|
+
readonly query: {
|
|
9293
|
+
/** @description The HIP-4 coin the order trades, as Hyperliquid names it: # and the outcome ID times 10 plus the side, 0 for YES and 1 for NO, such as #102181. Any other coin is refused. */
|
|
9294
|
+
readonly coin: string;
|
|
9295
|
+
/** @description The signed action's nonce, epoch milliseconds. */
|
|
9296
|
+
readonly nonce: number;
|
|
9297
|
+
/** @description The signed action's expiresAfter, epoch milliseconds. */
|
|
9298
|
+
readonly expires_after: number;
|
|
9299
|
+
/** @description A height from GET /v1/hypercore/order-history (or history.height here) read before the cloid was made and the order signed, kept with the order. History is then searched from the next block instead of from a day before the nonce, which a wallet linked less than a day before signing cannot prove. Any earlier such height is valid too: an older one only widens the window, so keep the latest from background reads and never read one on the way to signing. Never a height read after signing, and never one derived from a clock. */
|
|
9300
|
+
readonly after_height?: number;
|
|
9301
|
+
};
|
|
9302
|
+
readonly header?: {
|
|
9303
|
+
/**
|
|
9304
|
+
* @description Required for browser sessions; API keys do not require an Origin.
|
|
9305
|
+
* @example https://totalis.trade
|
|
9306
|
+
*/
|
|
9307
|
+
readonly Origin?: string;
|
|
9308
|
+
};
|
|
9309
|
+
readonly path: {
|
|
9310
|
+
/** @description The order's client order ID, lowercase. A cloid names one order: never reuse one. */
|
|
9311
|
+
readonly cloid: components["schemas"]["HypercoreCloid"];
|
|
9312
|
+
};
|
|
9313
|
+
readonly cookie?: never;
|
|
9314
|
+
};
|
|
9315
|
+
readonly requestBody?: never;
|
|
9316
|
+
readonly responses: {
|
|
9317
|
+
/** @description What the history proves now. No caching. */
|
|
9318
|
+
readonly 200: {
|
|
9319
|
+
headers: {
|
|
9320
|
+
readonly [name: string]: unknown;
|
|
9321
|
+
};
|
|
9322
|
+
content: {
|
|
9323
|
+
readonly "application/json": {
|
|
9324
|
+
/** @description Hyperliquid main account read: the linked wallet of the calling session. */
|
|
9325
|
+
readonly account: components["schemas"]["Address"];
|
|
9326
|
+
/** @description The order's client order ID. */
|
|
9327
|
+
readonly cloid: components["schemas"]["HypercoreCloid"];
|
|
9328
|
+
/** @description The HIP-4 coin asked about. */
|
|
9329
|
+
readonly coin: string;
|
|
9330
|
+
/**
|
|
9331
|
+
* @description FOUND: the order reached matching; order holds its status. ABSENT: the order never reached matching and no longer can: history kept by a release that keeps every IOC ending holds every block of the account's in the window, through the first block after `through`, with no gap, and no status carries the cloid in this coin. UNPROVEN: neither yet; reason says why.
|
|
9332
|
+
* @enum {unknown}
|
|
9333
|
+
*/
|
|
9334
|
+
readonly result: "FOUND" | "ABSENT" | "UNPROVEN";
|
|
9335
|
+
/** @description Without after_height: the window's first block time, a day before the nonce. */
|
|
9336
|
+
readonly from?: components["schemas"]["$defs-Timestamp"];
|
|
9337
|
+
/** @description With after_height: the window starts at the next block. */
|
|
9338
|
+
readonly after_height?: number;
|
|
9339
|
+
/** @description The order's expires_after: the latest block time it can land in. */
|
|
9340
|
+
readonly through: components["schemas"]["$defs-Timestamp"];
|
|
9341
|
+
/** @description The last block of the history that proves IOCs; absent until that history has its first block, when every window is UNCOVERED. */
|
|
9342
|
+
readonly history?: {
|
|
9343
|
+
/** @description Its HyperCore block height. */
|
|
9344
|
+
readonly height: number;
|
|
9345
|
+
/** @description Its block time. */
|
|
9346
|
+
readonly time: components["schemas"]["$defs-Timestamp"];
|
|
9347
|
+
};
|
|
9348
|
+
/** @description With FOUND: the order's latest status in our node history. */
|
|
9349
|
+
readonly order?: {
|
|
9350
|
+
/** @description Hyperliquid order ID. */
|
|
9351
|
+
readonly oid: components["schemas"]["HypercoreOrderId"];
|
|
9352
|
+
/**
|
|
9353
|
+
* @description FILLED: filled in full. CANCELLED: what did not fill was cancelled; fills tell how much did. REJECTED: refused once it reached the book, nothing filled. An IOC is never OPEN.
|
|
9354
|
+
* @enum {unknown}
|
|
9355
|
+
*/
|
|
9356
|
+
readonly status: "OPEN" | "FILLED" | "CANCELLED" | "REJECTED";
|
|
9357
|
+
/** @description Hyperliquid's name for the status, such as filled, iocCancelRejected or insufficientSpotBalanceRejected. */
|
|
9358
|
+
readonly hyperliquid_status?: string;
|
|
9359
|
+
/** @description BUY to acquire the side token, SELL to dispose of it. */
|
|
9360
|
+
readonly direction: components["schemas"]["HypercoreTradeDirection"];
|
|
9361
|
+
/** @description Limit price in USDC per share, as a decimal string. */
|
|
9362
|
+
readonly limit_price: components["schemas"]["HypercorePositiveDecimal"];
|
|
9363
|
+
/** @description Order size in shares, as a decimal string. */
|
|
9364
|
+
readonly original_size: components["schemas"]["HypercorePositiveDecimal"];
|
|
9365
|
+
/** @description Shares not filled, as a decimal string. */
|
|
9366
|
+
readonly remaining_size?: string;
|
|
9367
|
+
/** @description Block time it reached the book. */
|
|
9368
|
+
readonly placed_at: components["schemas"]["$defs-Timestamp"];
|
|
9369
|
+
/**
|
|
9370
|
+
* @description KNOWN: fills lists every trade. INDEXING: the fills index does not yet hold every block the order traded in; read again. UNAVAILABLE: the fills index could not be read; the status still stands, read again for fills.
|
|
9371
|
+
* @enum {unknown}
|
|
9372
|
+
*/
|
|
9373
|
+
readonly fills_status: "KNOWN" | "INDEXING" | "UNAVAILABLE";
|
|
9374
|
+
/** @description With fills_status KNOWN: every trade of the order, oldest first; empty when nothing filled. */
|
|
9375
|
+
readonly fills?: readonly components["schemas"]["HypercorePortfolioFill"][];
|
|
9376
|
+
};
|
|
9377
|
+
/**
|
|
9378
|
+
* @description With UNPROVEN. BEHIND: history has not yet passed through; read again once history.time is after it, usually within a second. GAP: history missed blocks of the account's in the window, named in gap; this window can never be proven. UNCOVERED: history that proves IOCs does not reach back to the window's start, because the wallet was linked after it or a release that drops IOC cancels wrote some of its blocks; this window can never be proven, though an after_height observed before signing may narrow it.
|
|
9379
|
+
* @enum {unknown}
|
|
9380
|
+
*/
|
|
9381
|
+
readonly reason?: "BEHIND" | "GAP" | "UNCOVERED";
|
|
9382
|
+
/** @description With GAP: the earliest missed span in the window. */
|
|
9383
|
+
readonly gap?: {
|
|
9384
|
+
/** @description First missed block height. */
|
|
9385
|
+
readonly from_height: number;
|
|
9386
|
+
/** @description Last missed block height. */
|
|
9387
|
+
readonly through_height: number;
|
|
9388
|
+
/** @description Every missed block's time is within from and through. */
|
|
9389
|
+
readonly from: components["schemas"]["$defs-Timestamp"];
|
|
9390
|
+
/** @description See from. */
|
|
9391
|
+
readonly through: components["schemas"]["$defs-Timestamp"];
|
|
9392
|
+
/** @description Why the blocks were missed, such as HLFEED_GAP or UNPARSED. */
|
|
9393
|
+
readonly reason: string;
|
|
9394
|
+
};
|
|
9395
|
+
};
|
|
9396
|
+
};
|
|
9397
|
+
};
|
|
9398
|
+
readonly 400: components["responses"]["Error"];
|
|
9399
|
+
readonly 401: components["responses"]["Error"];
|
|
9400
|
+
readonly 403: components["responses"]["Error"];
|
|
9401
|
+
readonly 404: components["responses"]["Error"];
|
|
9402
|
+
readonly 429: components["responses"]["RateLimited"];
|
|
9403
|
+
readonly 500: components["responses"]["InternalError"];
|
|
9404
|
+
readonly 503: components["responses"]["Unavailable"];
|
|
9405
|
+
};
|
|
9406
|
+
};
|
|
9407
|
+
readonly getHypercoreOrderHistory: {
|
|
9408
|
+
readonly parameters: {
|
|
9409
|
+
readonly query?: never;
|
|
9410
|
+
readonly header?: {
|
|
9411
|
+
/**
|
|
9412
|
+
* @description Required for browser sessions; API keys do not require an Origin.
|
|
9413
|
+
* @example https://totalis.trade
|
|
9414
|
+
*/
|
|
9415
|
+
readonly Origin?: string;
|
|
9416
|
+
};
|
|
9417
|
+
readonly path?: never;
|
|
9418
|
+
readonly cookie?: never;
|
|
9419
|
+
};
|
|
9420
|
+
readonly requestBody?: never;
|
|
9421
|
+
readonly responses: {
|
|
9422
|
+
/** @description The cursor now. No caching. */
|
|
9423
|
+
readonly 200: {
|
|
9424
|
+
headers: {
|
|
9425
|
+
readonly [name: string]: unknown;
|
|
9426
|
+
};
|
|
9427
|
+
content: {
|
|
9428
|
+
readonly "application/json": {
|
|
9429
|
+
/** @description Hyperliquid main account read: the linked wallet of the calling session. */
|
|
9430
|
+
readonly account: components["schemas"]["Address"];
|
|
9431
|
+
/** @description The HyperCore block height, or null until the history follows this wallet (just after it is linked, or just after a release); read again. */
|
|
9432
|
+
readonly height: number | null;
|
|
9433
|
+
/** @description That block's time; null with height. */
|
|
9434
|
+
readonly time: components["schemas"]["$defs-Timestamp"] | null;
|
|
9435
|
+
};
|
|
9436
|
+
};
|
|
9437
|
+
};
|
|
9438
|
+
readonly 400: components["responses"]["Error"];
|
|
9439
|
+
readonly 401: components["responses"]["Error"];
|
|
9440
|
+
readonly 403: components["responses"]["Error"];
|
|
9441
|
+
readonly 404: components["responses"]["Error"];
|
|
9442
|
+
readonly 429: components["responses"]["RateLimited"];
|
|
9443
|
+
readonly 500: components["responses"]["InternalError"];
|
|
9444
|
+
readonly 503: components["responses"]["Unavailable"];
|
|
9445
|
+
};
|
|
9446
|
+
};
|
|
9135
9447
|
readonly listHypercorePositions: {
|
|
9136
9448
|
readonly parameters: {
|
|
9137
9449
|
readonly query?: {
|
|
@@ -13658,7 +13970,7 @@ export interface operations {
|
|
|
13658
13970
|
*/
|
|
13659
13971
|
readonly side: components["parameters"]["Side"];
|
|
13660
13972
|
/**
|
|
13661
|
-
* @description MINUTE for one-minute closes, HOUR for each UTC hour's last
|
|
13973
|
+
* @description MINUTE for one-minute closes, HOUR for each UTC hour's last known minute.
|
|
13662
13974
|
* @example HOUR
|
|
13663
13975
|
*/
|
|
13664
13976
|
readonly bucket?: components["parameters"]["CloseBucket"];
|
|
@@ -13695,7 +14007,7 @@ export interface operations {
|
|
|
13695
14007
|
};
|
|
13696
14008
|
readonly requestBody?: never;
|
|
13697
14009
|
readonly responses: {
|
|
13698
|
-
/** @description
|
|
14010
|
+
/** @description Chance closes as runs of equal consecutive buckets */
|
|
13699
14011
|
readonly 200: {
|
|
13700
14012
|
headers: {
|
|
13701
14013
|
readonly [name: string]: unknown;
|
|
@@ -14112,6 +14424,11 @@ export interface operations {
|
|
|
14112
14424
|
* @example 35280,36412
|
|
14113
14425
|
*/
|
|
14114
14426
|
readonly outcome_ids: components["parameters"]["OutcomeIds"];
|
|
14427
|
+
/**
|
|
14428
|
+
* @description Also answer each picture's `light_variants`, its rendition for light grounds, where imagery has one. Send it only as true; any other value returns 400 INVALID_QUERY.
|
|
14429
|
+
* @example true
|
|
14430
|
+
*/
|
|
14431
|
+
readonly light?: true;
|
|
14115
14432
|
};
|
|
14116
14433
|
readonly header?: never;
|
|
14117
14434
|
readonly path?: never;
|
|
@@ -14422,6 +14739,94 @@ export interface operations {
|
|
|
14422
14739
|
readonly 503: components["responses"]["Unavailable"];
|
|
14423
14740
|
};
|
|
14424
14741
|
};
|
|
14742
|
+
readonly getPolymarketMarket: {
|
|
14743
|
+
readonly parameters: {
|
|
14744
|
+
readonly query?: never;
|
|
14745
|
+
readonly header?: never;
|
|
14746
|
+
readonly path: {
|
|
14747
|
+
/**
|
|
14748
|
+
* @description HIP-4 outcome ID of the market, as a decimal string.
|
|
14749
|
+
* @example 1209
|
|
14750
|
+
*/
|
|
14751
|
+
readonly outcome_id: components["parameters"]["OutcomeId"];
|
|
14752
|
+
};
|
|
14753
|
+
readonly cookie?: never;
|
|
14754
|
+
};
|
|
14755
|
+
readonly requestBody?: never;
|
|
14756
|
+
readonly responses: {
|
|
14757
|
+
/** @description The market. Only a market whose registry entry matches Polymarket's listing is served; any other id, including every id below 2147483648, is NOT_FOUND. When market-data has not read the registry for a minute, the read is MARKET_DATA_UNAVAILABLE rather than a state that may be wrong. */
|
|
14758
|
+
readonly 200: {
|
|
14759
|
+
headers: {
|
|
14760
|
+
/** @description Five seconds: state follows a registry read every 15 seconds. */
|
|
14761
|
+
readonly "Cache-Control"?: "public, max-age=5";
|
|
14762
|
+
/** @description Strong validator of the whole answer; send it as `If-None-Match` to get 304 when unchanged. */
|
|
14763
|
+
readonly ETag?: string;
|
|
14764
|
+
readonly [name: string]: unknown;
|
|
14765
|
+
};
|
|
14766
|
+
content: {
|
|
14767
|
+
/**
|
|
14768
|
+
* @example {
|
|
14769
|
+
* "market": {
|
|
14770
|
+
* "outcome_id": "2147483650",
|
|
14771
|
+
* "source": "POLYMARKET",
|
|
14772
|
+
* "registry": {
|
|
14773
|
+
* "version": 1,
|
|
14774
|
+
* "ref": "0xdb8e90cf84e7d99aba6b997383b52b61a41abf11d55105433284771054878848",
|
|
14775
|
+
* "closes_at": "1795550100",
|
|
14776
|
+
* "question": "2147483648"
|
|
14777
|
+
* },
|
|
14778
|
+
* "state": "ACTIVE",
|
|
14779
|
+
* "result": null,
|
|
14780
|
+
* "title": "Will Palmeiras win the 2026 Copa Libertadores?",
|
|
14781
|
+
* "rules": "This market will resolve to \"Yes\" if Palmeiras wins the 2026 Copa Libertadores. Otherwise, this market will resolve to \"No\".",
|
|
14782
|
+
* "image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/copa-libertadores.png",
|
|
14783
|
+
* "sides": [
|
|
14784
|
+
* {
|
|
14785
|
+
* "side": "YES",
|
|
14786
|
+
* "label": "Yes",
|
|
14787
|
+
* "clob_token_id": "28740386853072534471032014291680134189099526112241741507320998596140192279457",
|
|
14788
|
+
* "position_id": "28740386853072534471032014291680134189099526112241741507320998596140192279457"
|
|
14789
|
+
* },
|
|
14790
|
+
* {
|
|
14791
|
+
* "side": "NO",
|
|
14792
|
+
* "label": "No",
|
|
14793
|
+
* "clob_token_id": "111093202764240704375677303817163204926230585797338411164771372392868665588303",
|
|
14794
|
+
* "position_id": "111093202764240704375677303817163204926230585797338411164771372392868665588303"
|
|
14795
|
+
* }
|
|
14796
|
+
* ],
|
|
14797
|
+
* "polymarket": {
|
|
14798
|
+
* "market_id": "1830625",
|
|
14799
|
+
* "slug": "2026-soccer-copa-libertadores-winner-palmeiras",
|
|
14800
|
+
* "event_id": "336260",
|
|
14801
|
+
* "event_slug": "2026-soccer-copa-libertadores-winner",
|
|
14802
|
+
* "condition_id": "0xdb8e90cf84e7d99aba6b997383b52b61a41abf11d55105433284771054878848",
|
|
14803
|
+
* "question_id": "0x7e1a2c3d4b5a69788796a5b4c3d2e1f00112233445566778899aabbccddeeff0",
|
|
14804
|
+
* "neg_risk": true,
|
|
14805
|
+
* "neg_risk_market_id": "0x5a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e800",
|
|
14806
|
+
* "game_start_time": "2026-02-23T12:00:00Z",
|
|
14807
|
+
* "end_date": "2026-12-12T03:59:00Z",
|
|
14808
|
+
* "url": "https://polymarket.com/event/2026-soccer-copa-libertadores-winner/2026-soccer-copa-libertadores-winner-palmeiras"
|
|
14809
|
+
* },
|
|
14810
|
+
* "listed_at": "2026-11-27T22:00:00Z"
|
|
14811
|
+
* }
|
|
14812
|
+
* }
|
|
14813
|
+
*/
|
|
14814
|
+
readonly "application/json": components["schemas"]["PolymarketMarketDetails"];
|
|
14815
|
+
};
|
|
14816
|
+
};
|
|
14817
|
+
/** @description The answer matches the `If-None-Match` ETag. */
|
|
14818
|
+
readonly 304: {
|
|
14819
|
+
headers: {
|
|
14820
|
+
readonly [name: string]: unknown;
|
|
14821
|
+
};
|
|
14822
|
+
content?: never;
|
|
14823
|
+
};
|
|
14824
|
+
readonly 400: components["responses"]["Error"];
|
|
14825
|
+
readonly 404: components["responses"]["Error"];
|
|
14826
|
+
readonly 500: components["responses"]["InternalError"];
|
|
14827
|
+
readonly 503: components["responses"]["Unavailable"];
|
|
14828
|
+
};
|
|
14829
|
+
};
|
|
14425
14830
|
readonly getRfq: {
|
|
14426
14831
|
readonly parameters: {
|
|
14427
14832
|
readonly query?: never;
|
|
@@ -614,7 +614,7 @@ export type components = {
|
|
|
614
614
|
readonly network?: boolean;
|
|
615
615
|
/** @description Opt in to the live lane: up to 8 outcome IDs whose order book the socket follows from the start, independent of outcome_ids. This is interest revision 0. With books, marks, mark_ticks, trades or charts present, even empty, the subscriptionResponse carries live and the socket accepts setInterest and resnapshot frames; without all five it gets no live-lane frame and accepts no frame after its subscribe. */
|
|
616
616
|
readonly books?: readonly components["schemas"]["UInt32String"][];
|
|
617
|
-
/** @description Opt in to the live lane: up to 8 perps whose mark the socket follows for a chart from the start (markSnapshot
|
|
617
|
+
/** @description Opt in to the live lane: up to 8 perps whose mark the socket follows for a chart from the start (markSnapshot, then mark per node read). Part of interest revision 0. */
|
|
618
618
|
readonly marks?: readonly components["schemas"]["MarketPerpCoin"][];
|
|
619
619
|
/** @description Opt in to the live lane: up to 64 perps whose live mark the socket follows for cards and rows, as markTicks frames only, without recorded history. Part of interest revision 0. */
|
|
620
620
|
readonly mark_ticks?: readonly components["schemas"]["MarketPerpCoin"][];
|
|
@@ -838,7 +838,7 @@ export type components = {
|
|
|
838
838
|
* @constant
|
|
839
839
|
*/
|
|
840
840
|
readonly channel: "markSnapshot";
|
|
841
|
-
/** @description The complete state of one followed chart perp. Replace the local one with it, then apply mark
|
|
841
|
+
/** @description The complete state of one followed chart perp. Replace the local one with it, then apply mark frames. mark windows never go back on a socket, also across a source change. */
|
|
842
842
|
readonly data: {
|
|
843
843
|
/** @description The perp. */
|
|
844
844
|
readonly coin: components["schemas"]["MarketPerpCoin"];
|
|
@@ -850,11 +850,11 @@ export type components = {
|
|
|
850
850
|
readonly from: components["schemas"]["Timestamp"] | null;
|
|
851
851
|
/** @description End of the latest read's node-time window. Null with from. */
|
|
852
852
|
readonly to: components["schemas"]["Timestamp"] | null;
|
|
853
|
-
/** @description
|
|
853
|
+
/** @description Deprecated: always null. Totalis no longer records runs on the live lane; read the chart history (`GET /v1/charts/mark:{coin}`). Was how far the perp's recorded history reaches. */
|
|
854
854
|
readonly sealed_through: components["schemas"]["Timestamp"] | null;
|
|
855
|
-
/** @description
|
|
855
|
+
/** @description Deprecated: always null, with sealed_through. */
|
|
856
856
|
readonly runs_from: components["schemas"]["Timestamp"] | null;
|
|
857
|
-
/** @description
|
|
857
|
+
/** @description Deprecated: always empty. */
|
|
858
858
|
readonly runs: readonly components["schemas"]["MarketMarkRun"][];
|
|
859
859
|
};
|
|
860
860
|
};
|
|
@@ -882,7 +882,7 @@ export type components = {
|
|
|
882
882
|
* @constant
|
|
883
883
|
*/
|
|
884
884
|
readonly channel: "markSealed";
|
|
885
|
-
/** @description
|
|
885
|
+
/** @description Deprecated: no longer sent. Totalis no longer records runs on the live lane; a chart reads its history from `GET /v1/charts/mark:{coin}`. Was: marks just recorded for good. */
|
|
886
886
|
readonly data: {
|
|
887
887
|
/** @description The perp. */
|
|
888
888
|
readonly coin: components["schemas"]["MarketPerpCoin"];
|