@totalis/hip4-client 0.108.0 → 0.110.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 CHANGED
@@ -3,6 +3,51 @@
3
3
  `@totalis/hip4-client` follows [semantic versioning](https://semver.org).
4
4
  The contract version the generated types come from is `sdkVersion` in `./version`.
5
5
 
6
+ ## 0.110.0
7
+
8
+ ### Changed
9
+
10
+ - Portfolio Margin accounts (TT-2868, contract
11
+ `245.0.0-portfolio-margin-funding`). `getHypercoreBalance` and
12
+ `getHypercorePortfolio` answer a Portfolio Margin account with its
13
+ `account_mode` and positions instead of failing `DEPENDENCY_STALE`; its
14
+ `funding` amounts `spot_usdc`, `perp_usdc`, `spot_usdc_total` and
15
+ `spot_usdc_hold` are `null`, since Hyperliquid signs its spot `hold` (and
16
+ `total` while borrowing) and total less hold is not its cash. They are typed
17
+ `string | null`; every other mode still gets strings. `readCoreCash`
18
+ answers `PORTFOLIO_MARGIN` with `spendable` `0n` whatever the spot read
19
+ says, and leaves all three fields `null` when the spot read is Portfolio
20
+ Margin's but the mode read is not.
21
+
22
+ ## 0.109.0
23
+
24
+ ### Added
25
+
26
+ Contract `244.0.0-rounds-live-trades` (TT-2853), additive:
27
+
28
+ - Round history. `getMarketRoundHistory`
29
+ (`GET /v1/markets/{outcome_id}/recurring-round/history`, no credential, any
30
+ market of the round) returns up to 8 earlier rounds of the same recurring
31
+ series, newest first, one per period step: `RECORDED` rounds with each
32
+ market's native `result`, `NOT_RECORDED` gaps and `CONFLICTED` withheld
33
+ rounds. Fewer than 8 means none older is recorded.
34
+ - Live taker orders on the market stream. A market subscription or
35
+ `MarketSetInterest` may set `trades` (up to 64 outcome IDs); each followed
36
+ outcome gets a `tradesSnapshot` (its latest taker orders, newest block first and
37
+ each block's in execution order, as `trades` frames carry them, and
38
+ `complete_from_height`) and then a `trades` frame per HyperCore block with
39
+ taker orders on it. A `MarketTakerOrder` is one taker order's execution on
40
+ one token in one block, summed exactly: `market_side`, `direction`,
41
+ `shares`, gross `notional` in `quote`, `avg_price`, `height`, `time`, `oid`
42
+ and `taker`. Sockets that never name `trades` are unchanged.
43
+
44
+ ### Changed
45
+
46
+ - A golden ticket's `stake` is its own, from 1 to 10 USDC, fixed when the
47
+ ticket is unlocked; golden RFQs and suggestions use it.
48
+ - `getGoldenOffer` may answer `409 QUOTE_EXPIRED` when the RFQ's stake is
49
+ not the ticket's.
50
+
6
51
  ## 0.108.0
7
52
 
8
53
  ### Added
@@ -104,6 +104,7 @@ export type paths = {
104
104
  readonly "/v1/markets/{outcome_id}/history": Pick<SharedPaths["/v1/markets/{outcome_id}/history"], "parameters" | "get">;
105
105
  readonly "/v1/markets/{outcome_id}/reference-closes": Pick<SharedPaths["/v1/markets/{outcome_id}/reference-closes"], "parameters" | "get">;
106
106
  readonly "/v1/markets/{outcome_id}/recurring-round": Pick<SharedPaths["/v1/markets/{outcome_id}/recurring-round"], "parameters" | "get">;
107
+ readonly "/v1/markets/{outcome_id}/recurring-round/history": Pick<SharedPaths["/v1/markets/{outcome_id}/recurring-round/history"], "parameters" | "get">;
107
108
  readonly "/v1/markets/{outcome_id}/score-timeline": Pick<SharedPaths["/v1/markets/{outcome_id}/score-timeline"], "parameters" | "get">;
108
109
  readonly "/v1/questions/{question_id}/score-timeline": Pick<SharedPaths["/v1/questions/{question_id}/score-timeline"], "parameters" | "get">;
109
110
  readonly "/v1/questions/{question_id}/recurring-round": Pick<SharedPaths["/v1/questions/{question_id}/recurring-round"], "parameters" | "get">;
@@ -137,4 +138,4 @@ export type paths = {
137
138
  readonly "/v1/makers/{maker_id}/exposure": Pick<SharedPaths["/v1/makers/{maker_id}/exposure"], "parameters" | "get">;
138
139
  readonly "/v1/makers/{maker_id}/performance": Pick<SharedPaths["/v1/makers/{maker_id}/performance"], "parameters" | "get">;
139
140
  };
140
- export type operations = Pick<SharedOperations, "abandonCoreExit" | "acceptQuote" | "activeCoreExits" | "admitOwnMaker" | "admitPartnerWallet" | "approveWallet" | "bindEmbeddedWallet" | "cancelRfq" | "confirmComboCopyAgent" | "confirmCoreCopyAgent" | "createCashout" | "createComment" | "createCoreExit" | "createDeposit" | "createGoldenRfq" | "createRfq" | "createRunOffClaim" | "createWalletChallenge" | "createWalletSession" | "createWithdrawal" | "deleteComment" | "editComment" | "endWalletSession" | "followTrader" | "getAcceptance" | "getAccountActivity" | "getAccountPnl" | "getAccountPosition" | "getAccountValue" | "getBalances" | "getCopyAgents" | "getCopyBudget" | "getCopySettings" | "getCopySummary" | "getCoreExit" | "getDeployment" | "getGenesis" | "getGolden" | "getGoldenMarkets" | "getGoldenOffer" | "getGoldenSuggestions" | "getHypercoreBalance" | "getHypercorePortfolio" | "getHypercoreSettlementCredits" | "getIdentity" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDataConfig" | "getMarketDefinitions" | "getMarketDisplay" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketScoreTimeline" | "getMarketStats" | "getMyGenesis" | "getMyReferralBonus" | "getOperation" | "getOutcomeMetadata" | "getOwnMaker" | "getPartnerAccountValue" | "getPartnerReport" | "getPerpMarks" | "getPicture" | "getProfitLeaderboard" | "getQuestion" | "getQuestionRecurringRound" | "getQuestionScoreTimeline" | "getRfq" | "getSeries" | "getSocialLeaderboard" | "getSocialPerson" | "getSocialPosition" | "getSuggestedCombo" | "getTaxonomy" | "getTrader" | "getTraderPnl" | "getUsernameAvailability" | "getVaultAgents" | "getVolumeLeaderboard" | "getWalletApproval" | "getWithdrawal" | "grantComboCopyAgent" | "grantVaultAgent" | "likeComment" | "listAccountActivity" | "listAccountPositions" | "listComboCopies" | "listComboFeed" | "listCommentReplies" | "listComments" | "listControlledMakers" | "listCopiedFills" | "listCopyTrades" | "listDiscovery" | "listFollowingFeed" | "listFollowingPositions" | "listFollows" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listMyNotifications" | "listOperations" | "listPartnerFills" | "listPartnerWebhookEvents" | "listQuotes" | "listSocialActivity" | "listSocialFeed" | "listSocialPositions" | "listTraderPositions" | "listTraderTrades" | "markMyNotificationsRead" | "placeGolden" | "reactComment" | "recordAcquisition" | "recordGoldenTelegramClick" | "refreshPicture" | "removeUploadedPicture" | "requestComboCopyAgent" | "requestCoreCopyAgent" | "revokeComboCopyAgent" | "searchCatalog" | "setAvatar" | "setCopyAllocation" | "setCopySettings" | "setPublicProfile" | "setUsername" | "setXHandleShown" | "setXPictureShown" | "signGoldenGift" | "stream" | "streamMarkets" | "switchOffComboCopyAgent" | "switchOffCoreCopyAgent" | "unfollowTrader" | "unlikeComment" | "unlockGolden" | "unreactComment" | "uploadPicture">;
141
+ export type operations = Pick<SharedOperations, "abandonCoreExit" | "acceptQuote" | "activeCoreExits" | "admitOwnMaker" | "admitPartnerWallet" | "approveWallet" | "bindEmbeddedWallet" | "cancelRfq" | "confirmComboCopyAgent" | "confirmCoreCopyAgent" | "createCashout" | "createComment" | "createCoreExit" | "createDeposit" | "createGoldenRfq" | "createRfq" | "createRunOffClaim" | "createWalletChallenge" | "createWalletSession" | "createWithdrawal" | "deleteComment" | "editComment" | "endWalletSession" | "followTrader" | "getAcceptance" | "getAccountActivity" | "getAccountPnl" | "getAccountPosition" | "getAccountValue" | "getBalances" | "getCopyAgents" | "getCopyBudget" | "getCopySettings" | "getCopySummary" | "getCoreExit" | "getDeployment" | "getGenesis" | "getGolden" | "getGoldenMarkets" | "getGoldenOffer" | "getGoldenSuggestions" | "getHypercoreBalance" | "getHypercorePortfolio" | "getHypercoreSettlementCredits" | "getIdentity" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDataConfig" | "getMarketDefinitions" | "getMarketDisplay" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketRoundHistory" | "getMarketScoreTimeline" | "getMarketStats" | "getMyGenesis" | "getMyReferralBonus" | "getOperation" | "getOutcomeMetadata" | "getOwnMaker" | "getPartnerAccountValue" | "getPartnerReport" | "getPerpMarks" | "getPicture" | "getProfitLeaderboard" | "getQuestion" | "getQuestionRecurringRound" | "getQuestionScoreTimeline" | "getRfq" | "getSeries" | "getSocialLeaderboard" | "getSocialPerson" | "getSocialPosition" | "getSuggestedCombo" | "getTaxonomy" | "getTrader" | "getTraderPnl" | "getUsernameAvailability" | "getVaultAgents" | "getVolumeLeaderboard" | "getWalletApproval" | "getWithdrawal" | "grantComboCopyAgent" | "grantVaultAgent" | "likeComment" | "listAccountActivity" | "listAccountPositions" | "listComboCopies" | "listComboFeed" | "listCommentReplies" | "listComments" | "listControlledMakers" | "listCopiedFills" | "listCopyTrades" | "listDiscovery" | "listFollowingFeed" | "listFollowingPositions" | "listFollows" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listMyNotifications" | "listOperations" | "listPartnerFills" | "listPartnerWebhookEvents" | "listQuotes" | "listSocialActivity" | "listSocialFeed" | "listSocialPositions" | "listTraderPositions" | "listTraderTrades" | "markMyNotificationsRead" | "placeGolden" | "reactComment" | "recordAcquisition" | "recordGoldenTelegramClick" | "refreshPicture" | "removeUploadedPicture" | "requestComboCopyAgent" | "requestCoreCopyAgent" | "revokeComboCopyAgent" | "searchCatalog" | "setAvatar" | "setCopyAllocation" | "setCopySettings" | "setPublicProfile" | "setUsername" | "setXHandleShown" | "setXPictureShown" | "signGoldenGift" | "stream" | "streamMarkets" | "switchOffComboCopyAgent" | "switchOffCoreCopyAgent" | "unfollowTrader" | "unlikeComment" | "unlockGolden" | "unreactComment" | "uploadPicture">;
@@ -473,7 +473,7 @@ export declare const operationErrors: {
473
473
  readonly getGenesis: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "INVALID_QUERY", "CONTRACT_UNAVAILABLE"];
474
474
  readonly getGolden: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY"];
475
475
  readonly getGoldenMarkets: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "CONTRACT_UNAVAILABLE", "BROWSE_UNAVAILABLE"];
476
- readonly getGoldenOffer: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "NOT_FOUND", "CONTRACT_UNAVAILABLE", "FINANCIAL_ACTIONS_DISABLED"];
476
+ readonly getGoldenOffer: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "NOT_FOUND", "QUOTE_EXPIRED", "CONTRACT_UNAVAILABLE", "FINANCIAL_ACTIONS_DISABLED"];
477
477
  readonly getGoldenSuggestions: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "CONTRACT_UNAVAILABLE", "GOLDEN_TICKET_NONE", "GOLDEN_UNLOCK_REQUIRED", "GOLDEN_TICKET_USED", "GOLDEN_TICKET_EXPIRED", "GOLDEN_PLACEMENT_IN_FLIGHT", "BROWSE_UNAVAILABLE"];
478
478
  readonly getHypercoreBalance: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "ORIGIN_REQUIRED", "INVALID_REQUEST", "IDENTITY_NOT_FOUND"];
479
479
  readonly getHypercorePortfolio: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "DEPENDENCY_STALE", "RATE_LIMITED", "INVALID_REQUEST", "IDENTITY_NOT_FOUND"];
@@ -497,6 +497,7 @@ export declare const operationErrors: {
497
497
  readonly getMarketHistory: readonly ["INVALID_REQUEST", "NOT_FOUND", "MARKET_DATA_UNAVAILABLE", "INVALID_QUERY", "INVALID_CURSOR"];
498
498
  readonly getMarketRecurringRound: readonly ["INVALID_REQUEST", "NOT_FOUND", "MARKET_DATA_UNAVAILABLE", "RECURRING_DEFINITION_CONFLICT", "INVALID_QUERY"];
499
499
  readonly getMarketReferenceCloses: readonly ["INVALID_REQUEST", "NOT_FOUND", "MARKET_DATA_UNAVAILABLE", "INVALID_QUERY", "INVALID_CURSOR", "STALE_CURSOR"];
500
+ readonly getMarketRoundHistory: readonly ["INVALID_REQUEST", "NOT_FOUND", "MARKET_DATA_UNAVAILABLE", "RECURRING_DEFINITION_CONFLICT", "INVALID_QUERY"];
500
501
  readonly getMarketScoreTimeline: readonly ["INVALID_REQUEST", "NOT_FOUND", "MARKET_DATA_UNAVAILABLE", "INVALID_QUERY"];
501
502
  readonly getMarketStats: readonly ["MARKET_DATA_UNAVAILABLE", "INVALID_QUERY"];
502
503
  readonly getMyGenesis: readonly ["UNAUTHENTICATED", "FORBIDDEN", "AUTHORIZATION_UNAVAILABLE", "RATE_LIMITED", "ORIGIN_REQUIRED", "IDENTITY_NOT_FOUND", "INVALID_QUERY", "CONTRACT_UNAVAILABLE"];
@@ -1066,6 +1066,7 @@ export const operationErrors = {
1066
1066
  "IDENTITY_NOT_FOUND",
1067
1067
  "INVALID_QUERY",
1068
1068
  "NOT_FOUND",
1069
+ "QUOTE_EXPIRED",
1069
1070
  "CONTRACT_UNAVAILABLE",
1070
1071
  "FINANCIAL_ACTIONS_DISABLED"
1071
1072
  ],
@@ -1297,6 +1298,13 @@ export const operationErrors = {
1297
1298
  "INVALID_CURSOR",
1298
1299
  "STALE_CURSOR"
1299
1300
  ],
1301
+ "getMarketRoundHistory": [
1302
+ "INVALID_REQUEST",
1303
+ "NOT_FOUND",
1304
+ "MARKET_DATA_UNAVAILABLE",
1305
+ "RECURRING_DEFINITION_CONFLICT",
1306
+ "INVALID_QUERY"
1307
+ ],
1300
1308
  "getMarketScoreTimeline": [
1301
1309
  "INVALID_REQUEST",
1302
1310
  "NOT_FOUND",
@@ -27,6 +27,7 @@ export type paths = {
27
27
  readonly "/v1/markets/{outcome_id}/history": Pick<SharedPaths["/v1/markets/{outcome_id}/history"], "parameters" | "get">;
28
28
  readonly "/v1/markets/{outcome_id}/reference-closes": Pick<SharedPaths["/v1/markets/{outcome_id}/reference-closes"], "parameters" | "get">;
29
29
  readonly "/v1/markets/{outcome_id}/recurring-round": Pick<SharedPaths["/v1/markets/{outcome_id}/recurring-round"], "parameters" | "get">;
30
+ readonly "/v1/markets/{outcome_id}/recurring-round/history": Pick<SharedPaths["/v1/markets/{outcome_id}/recurring-round/history"], "parameters" | "get">;
30
31
  readonly "/v1/questions/{question_id}/recurring-round": Pick<SharedPaths["/v1/questions/{question_id}/recurring-round"], "parameters" | "get">;
31
32
  readonly "/v1/series/{series_id}": Pick<SharedPaths["/v1/series/{series_id}"], "parameters" | "get">;
32
33
  readonly "/v1/taxonomy": Pick<SharedPaths["/v1/taxonomy"], "parameters" | "get">;
@@ -45,4 +46,4 @@ export type paths = {
45
46
  readonly "/v1/makers/{maker_id}/exposure": Pick<SharedPaths["/v1/makers/{maker_id}/exposure"], "parameters" | "get">;
46
47
  readonly "/v1/makers/{maker_id}/performance": Pick<SharedPaths["/v1/makers/{maker_id}/performance"], "parameters" | "get">;
47
48
  };
48
- export type operations = Pick<SharedOperations, "cancelQuote" | "confirmQuote" | "createCollateralReduction" | "createQuote" | "getAccountActivity" | "getAccountPosition" | "getCollateralReduction" | "getDeployment" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerTelemetryPublication" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDisplay" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getOperation" | "getQuestion" | "getQuestionRecurringRound" | "getRfq" | "getSeries" | "getTaxonomy" | "listAccountActivity" | "listAccountPositions" | "listDiscovery" | "listMakerAcceptances" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listOperations" | "listRfqs" | "publishMakerTelemetry" | "releaseQuoteLease" | "renewQuoteLease" | "searchCatalog" | "stream" | "submitMakerSelfFundedTransaction">;
49
+ export type operations = Pick<SharedOperations, "cancelQuote" | "confirmQuote" | "createCollateralReduction" | "createQuote" | "getAccountActivity" | "getAccountPosition" | "getCollateralReduction" | "getDeployment" | "getMakerActivity" | "getMakerCapital" | "getMakerExposure" | "getMakerPerformance" | "getMakerPosition" | "getMakerQuotes" | "getMakerTelemetry" | "getMakerTelemetryPublication" | "getMakerVaultFundingTransaction" | "getMakerWithdrawal" | "getMarket" | "getMarketDisplay" | "getMarketHistory" | "getMarketRecurringRound" | "getMarketReferenceCloses" | "getMarketRoundHistory" | "getOperation" | "getQuestion" | "getQuestionRecurringRound" | "getRfq" | "getSeries" | "getTaxonomy" | "listAccountActivity" | "listAccountPositions" | "listDiscovery" | "listMakerAcceptances" | "listMakerActivity" | "listMakerPositions" | "listMakerQuoteHistory" | "listMarkets" | "listOperations" | "listRfqs" | "publishMakerTelemetry" | "releaseQuoteLease" | "renewQuoteLease" | "searchCatalog" | "stream" | "submitMakerSelfFundedTransaction">;
@@ -888,7 +888,7 @@ export type paths = {
888
888
  };
889
889
  /**
890
890
  * List golden suggestions
891
- * @description Up to three ready-made golden Combos from different games, for an account whose golden ticket is available: 5 legs from golden markets at the 2 USDC golden stake, one per fair-multiplier band, biggest first. Each shows the best house-maker offer the promo account holds on it right now, live while any ticket holder reads golden Combos; a five with no such offer, or one paying under the golden value floor, is left out. Picking one only fills the slip; place it through POST /v1/me/golden/rfqs, which asks afresh, so the slip's own offer is what places.
891
+ * @description Up to three ready-made golden Combos from different games, for an account whose golden ticket is available: 5 legs from golden markets at this account's ticket's stake, one per fair-multiplier band, biggest first. Each shows the best house-maker offer the promo account holds on it at that stake right now, live while any holder of a ticket at that stake reads golden Combos; a five with no such offer, or one paying under the golden value floor, is left out. Picking one only fills the slip; place it through POST /v1/me/golden/rfqs, which asks afresh, so the slip's own offer is what places.
892
892
  */
893
893
  readonly get: operations["getGoldenSuggestions"];
894
894
  readonly put?: never;
@@ -910,7 +910,7 @@ export type paths = {
910
910
  readonly put?: never;
911
911
  /**
912
912
  * Open a golden RFQ
913
- * @description Opens the Totalis promo account's RFQ for this account's golden Combo: exactly 5 legs, each a golden market, at a 2 USDC stake Totalis pays. Makers quote it like any RFQ; read the best Totalis maker quote with GET /v1/me/golden/rfqs/{rfq_id}/offer.
913
+ * @description Opens the Totalis promo account's RFQ for this account's golden Combo: exactly 5 legs, each a golden market, at the ticket's stake, which Totalis pays. Makers quote it like any RFQ; read the best Totalis maker quote with GET /v1/me/golden/rfqs/{rfq_id}/offer.
914
914
  */
915
915
  readonly post: operations["createGoldenRfq"];
916
916
  readonly delete?: never;
@@ -928,7 +928,7 @@ export type paths = {
928
928
  };
929
929
  /**
930
930
  * Get the golden offer
931
- * @description The best live Totalis maker quote on this account's golden RFQ, what it pays on a win, and the gift Transfer this account's wallet signs to receive it. A new quote names another position and needs a new signature. `offer` is null until a Totalis maker quotes. `rfq` is where the RFQ stands, as Get RFQ says, so a client polls this alone.
931
+ * @description The best live Totalis maker quote on this account's golden RFQ, what it pays on a win, and the gift Transfer this account's wallet signs to receive it. A new quote names another position and needs a new signature. `offer` is null until a Totalis maker quotes. `rfq` is where the RFQ stands, as Get RFQ says, so a client polls this alone. QUOTE_EXPIRED when the RFQ is not at the ticket's stake, so nothing on it can place; DEPENDENCY_STALE while the ticket's stake is not recorded yet.
932
932
  */
933
933
  readonly get: operations["getGoldenOffer"];
934
934
  readonly put?: never;
@@ -2338,6 +2338,32 @@ export type paths = {
2338
2338
  readonly patch?: never;
2339
2339
  readonly trace?: never;
2340
2340
  };
2341
+ readonly "/v1/markets/{outcome_id}/recurring-round/history": {
2342
+ readonly parameters: {
2343
+ readonly query?: never;
2344
+ readonly header?: never;
2345
+ readonly path: {
2346
+ /**
2347
+ * @description HIP-4 outcome ID of the market, as a decimal string.
2348
+ * @example 1209
2349
+ */
2350
+ readonly outcome_id: components["parameters"]["OutcomeId"];
2351
+ };
2352
+ readonly cookie?: never;
2353
+ };
2354
+ /**
2355
+ * Get market round history
2356
+ * @description Earlier rounds of the recurring series the market's round belongs to, newest first, each with its markets' native results, for a past-results strip. The same series as the recurring-round route: a native series or the market's template stream, one round per period step. Results come from native result state, never from a price.
2357
+ */
2358
+ readonly get: operations["getMarketRoundHistory"];
2359
+ readonly put?: never;
2360
+ readonly post?: never;
2361
+ readonly delete?: never;
2362
+ readonly options?: never;
2363
+ readonly head?: never;
2364
+ readonly patch?: never;
2365
+ readonly trace?: never;
2366
+ };
2341
2367
  readonly "/v1/markets/{outcome_id}/score-timeline": {
2342
2368
  readonly parameters: {
2343
2369
  readonly query?: never;
@@ -3817,7 +3843,7 @@ export type components = {
3817
3843
  readonly unlocked_at: null | components["schemas"]["$defs-Timestamp"];
3818
3844
  /** @description When this account first pressed Join Telegram (POST /v1/me/golden/telegram-click); null before. A record of the press only: it proves no membership and gates nothing. */
3819
3845
  readonly telegram_clicked_at: null | components["schemas"]["$defs-Timestamp"];
3820
- /** @description The gross stake Totalis pays, in USDC base units (6 decimals). */
3846
+ /** @description The gross stake Totalis pays, in USDC base units (6 decimals), from 1 to 10 USDC. The unlock fixes it for good; until then it is what unlocking would take now from the invite code, whose value Totalis may change. */
3821
3847
  readonly stake: components["schemas"]["$defs-Amount"];
3822
3848
  /** @constant */
3823
3849
  readonly stake_asset: "USDC";
@@ -3883,6 +3909,7 @@ export type components = {
3883
3909
  readonly legs: readonly components["schemas"]["$defs-Leg"][];
3884
3910
  /** @description Browse contract 4 discovery card each leg was picked from, in leg order, as read when the five was composed. Lets a client draw a leg that is not on its own page; its prices are not current. */
3885
3911
  readonly cards: readonly components["schemas"]["Card"][];
3912
+ /** @description The reading account's ticket's stake, in USDC base units. */
3886
3913
  readonly stake: components["schemas"]["$defs-Amount"];
3887
3914
  /** @description What the best house-maker offer on this five pays on a win now, after the taker and profit fees, in USDC base units. An indication: the offer is the promo account's, so the slip asks for its own. */
3888
3915
  readonly payout: components["schemas"]["$defs-Amount"];
@@ -4445,21 +4472,21 @@ export type components = {
4445
4472
  };
4446
4473
  /** Format: date-time */
4447
4474
  readonly "$defs-Timestamp": string;
4448
- /** @description USDC available on HyperCore for funding. */
4475
+ /** @description USDC available on HyperCore for funding. Every amount is null when account_mode is PORTFOLIO_MARGIN, whose USDC is not defined as total minus hold, and only then. */
4449
4476
  readonly HypercoreFunding: {
4450
4477
  /**
4451
4478
  * @description Hyperliquid account abstraction: STANDARD keeps separate spot and perp balances, UNIFIED and PORTFOLIO_MARGIN pool them, UNKNOWN when the mode could not be read or is unrecognized.
4452
4479
  * @enum {unknown}
4453
4480
  */
4454
4481
  readonly account_mode: "STANDARD" | "UNIFIED" | "PORTFOLIO_MARGIN" | "UNKNOWN";
4455
- /** @description Spot USDC not held by open orders (spot_usdc_total minus spot_usdc_hold), as a decimal string. */
4456
- readonly spot_usdc: string;
4457
- /** @description Withdrawable perp USDC as a decimal string; "0" unless account_mode is STANDARD. */
4458
- readonly perp_usdc: string;
4459
- /** @description Total spot USDC, held or not, as a decimal string; "0" when the account holds no USDC. */
4460
- readonly spot_usdc_total: string;
4461
- /** @description Spot USDC held by open orders, as a decimal string; "0" when the account holds no USDC. */
4462
- readonly spot_usdc_hold: string;
4482
+ /** @description Spot USDC not held by open orders (spot_usdc_total minus spot_usdc_hold), as a decimal string; null in PORTFOLIO_MARGIN. */
4483
+ readonly spot_usdc: string | null;
4484
+ /** @description Withdrawable perp USDC as a decimal string; "0" when account_mode is UNIFIED or UNKNOWN, null in PORTFOLIO_MARGIN. */
4485
+ readonly perp_usdc: string | null;
4486
+ /** @description Total spot USDC, held or not, as a decimal string; "0" when the account holds no USDC, null in PORTFOLIO_MARGIN. */
4487
+ readonly spot_usdc_total: string | null;
4488
+ /** @description Spot USDC held by open orders, as a decimal string; "0" when the account holds no USDC, null in PORTFOLIO_MARGIN. */
4489
+ readonly spot_usdc_hold: string | null;
4463
4490
  };
4464
4491
  readonly HypercorePortfolioPosition: {
4465
4492
  /** @description Hyperliquid HIP-4 outcome ID the balance belongs to. */
@@ -6590,6 +6617,42 @@ export type components = {
6590
6617
  */
6591
6618
  readonly quality?: "ALL_MIDS_FALLBACK";
6592
6619
  });
6620
+ readonly PastRoundMarket: {
6621
+ /** @description Hyperliquid outcome ID of the round's market. */
6622
+ readonly outcome_id: components["schemas"]["UInt32String"];
6623
+ /**
6624
+ * @description As in RecurringRoundMarket.
6625
+ * @enum {string}
6626
+ */
6627
+ readonly role: "STANDALONE" | "NAMED" | "FALLBACK";
6628
+ /** @description Bucket position the child market states for itself; null unless the role is NAMED. */
6629
+ readonly index: number | null;
6630
+ /** @description The market's terminal native result once recorded, else its current one while listed, else UNAVAILABLE with NOT_QUERIED. NUMERIC_RECORDED with yes_factor_numerator 100000000 settled YES, 0 settled NO, anything between pays fractionally; a result without a factor names no winner. */
6631
+ readonly result: components["schemas"]["Result"];
6632
+ };
6633
+ readonly PastRound: {
6634
+ /** @description Exact deployer settlement instant in Unix seconds. */
6635
+ readonly expiry: components["schemas"]["PositiveInt64"];
6636
+ /**
6637
+ * @description RECORDED: Totalis recorded the round; only it carries a definition and markets. NOT_RECORDED: an expiry on the series' cadence with no recorded round of the series, for a stream also one whose round qualified no period (several markets sharing an expiry included); it never claims Hyperliquid published none. CONFLICTED: a native round was observed at the expiry but is withheld because its recorded definition conflicts.
6638
+ * @enum {string}
6639
+ */
6640
+ readonly state: "RECORDED" | "NOT_RECORDED" | "CONFLICTED";
6641
+ /** @description As in RecurringRound; null unless state is RECORDED. */
6642
+ readonly target_price: components["schemas"]["RecurringPrice"] | null;
6643
+ /** @description As in RecurringRound; null unless state is RECORDED. */
6644
+ readonly price_thresholds: readonly components["schemas"]["RecurringPrice"][] | null;
6645
+ /** @description Parent question of a recorded bucket round; null otherwise. */
6646
+ readonly native_question_id: components["schemas"]["RealQuestionId"] | null;
6647
+ /** @description Markets of a RECORDED round with their results, in RecurringRound order; empty for any other state. */
6648
+ readonly markets: readonly components["schemas"]["PastRoundMarket"][];
6649
+ };
6650
+ readonly RecurringRoundHistory: {
6651
+ /** @description Recurring series of the requested round, as in RecurringRoundContext. */
6652
+ readonly series: components["schemas"]["RecurringSeries"];
6653
+ /** @description The series' expiries before the requested round's, newest first, one per period step back from it: 8 of them when older rounds are recorded, else down to the oldest recorded round. */
6654
+ readonly rounds: readonly components["schemas"]["PastRound"][];
6655
+ };
6593
6656
  readonly ScoreTimelinePoint: {
6594
6657
  /** @description Wall-clock time of the scoring play. A play the feed stamps up to a minute before the one listed ahead of it takes that one's time, so times never decrease. */
6595
6658
  readonly at: components["schemas"]["$defs-Timestamp"];
@@ -9674,6 +9737,7 @@ export interface operations {
9674
9737
  readonly 401: components["responses"]["Error"];
9675
9738
  readonly 403: components["responses"]["Error"];
9676
9739
  readonly 404: components["responses"]["Error"];
9740
+ readonly 409: components["responses"]["Error"];
9677
9741
  readonly 429: components["responses"]["RateLimited"];
9678
9742
  readonly 503: components["responses"]["Unavailable"];
9679
9743
  };
@@ -12856,6 +12920,45 @@ export interface operations {
12856
12920
  readonly 503: components["responses"]["Unavailable"];
12857
12921
  };
12858
12922
  };
12923
+ readonly getMarketRoundHistory: {
12924
+ readonly parameters: {
12925
+ readonly query?: never;
12926
+ readonly header?: never;
12927
+ readonly path: {
12928
+ /**
12929
+ * @description HIP-4 outcome ID of the market, as a decimal string.
12930
+ * @example 1209
12931
+ */
12932
+ readonly outcome_id: components["parameters"]["OutcomeId"];
12933
+ };
12934
+ readonly cookie?: never;
12935
+ };
12936
+ readonly requestBody?: never;
12937
+ readonly responses: {
12938
+ /** @description Up to 8 earlier rounds of the series. Only a full answer, 8 rounds with none NOT_RECORDED and every result terminal, may be shared for a day; any other, a shorter or gapped one included, for 5 seconds */
12939
+ readonly 200: {
12940
+ headers: {
12941
+ readonly "Cache-Control"?: "public, max-age=86400" | "public, max-age=5";
12942
+ readonly ETag?: string;
12943
+ readonly [name: string]: unknown;
12944
+ };
12945
+ content: {
12946
+ readonly "application/json": components["schemas"]["RecurringRoundHistory"];
12947
+ };
12948
+ };
12949
+ /** @description Not modified: the If-None-Match ETag matches */
12950
+ readonly 304: {
12951
+ headers: {
12952
+ readonly [name: string]: unknown;
12953
+ };
12954
+ content?: never;
12955
+ };
12956
+ readonly 400: components["responses"]["Error"];
12957
+ readonly 404: components["responses"]["Error"];
12958
+ readonly 409: components["responses"]["Error"];
12959
+ readonly 503: components["responses"]["Unavailable"];
12960
+ };
12961
+ };
12859
12962
  readonly getMarketScoreTimeline: {
12860
12963
  readonly parameters: {
12861
12964
  readonly query?: never;
@@ -588,12 +588,14 @@ export type components = {
588
588
  readonly scoreboards?: boolean;
589
589
  /** @description Opt in to network frames: the HyperEVM gas price against the level Totalis accepts quotes at, after each snapshot, then on every change the app acts on. Without it the socket gets no network frame. */
590
590
  readonly network?: boolean;
591
- /** @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 or mark_ticks present, even empty, the subscriptionResponse carries live and the socket accepts setInterest and resnapshot frames; without all three it gets no live-lane frame and accepts no frame after its subscribe. */
591
+ /** @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 or trades present, even empty, the subscriptionResponse carries live and the socket accepts setInterest and resnapshot frames; without all four it gets no live-lane frame and accepts no frame after its subscribe. */
592
592
  readonly books?: readonly components["schemas"]["UInt32String"][];
593
593
  /** @description Opt in to the live lane: up to 8 perps whose mark the socket follows for a chart from the start (markSnapshot with recent recorded runs, mark per node read, markSealed). Part of interest revision 0. */
594
594
  readonly marks?: readonly components["schemas"]["MarketPerpCoin"][];
595
595
  /** @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. */
596
596
  readonly mark_ticks?: readonly components["schemas"]["MarketPerpCoin"][];
597
+ /** @description Opt in to the live lane: up to 64 outcome IDs whose taker orders the socket follows (tradesSnapshot, then trades frames), independent of outcome_ids. Part of interest revision 0. */
598
+ readonly trades?: readonly components["schemas"]["UInt32String"][];
597
599
  /** @description bookProgress cadence for revision 0; 1000 when absent. */
598
600
  readonly progress_interval_ms?: components["schemas"]["MarketProgressInterval"];
599
601
  };
@@ -644,6 +646,8 @@ export type components = {
644
646
  readonly marks: readonly components["schemas"]["MarketPerpCoin"][];
645
647
  /** @description Every perp the socket follows as markTicks from this revision on. More than max_mark_ticks closes the socket with SUBSCRIPTION_DENIED. */
646
648
  readonly mark_ticks: readonly components["schemas"]["MarketPerpCoin"][];
649
+ /** @description Every outcome whose taker orders the socket follows from this revision on; absent is none, so a client that never names trades is unchanged. More than 64 closes the socket with SUBSCRIPTION_DENIED. */
650
+ readonly trades?: readonly components["schemas"]["UInt32String"][];
647
651
  /** @description bookProgress cadence from this revision on. */
648
652
  readonly progress_interval_ms: components["schemas"]["MarketProgressInterval"];
649
653
  };
@@ -663,7 +667,7 @@ export type components = {
663
667
  * @constant
664
668
  */
665
669
  readonly channel: "interest";
666
- /** @description Every live-lane frame after this one belongs to revision rev. A book or perp of rev that was not in the previously acknowledged revision gets its bookSnapshot or markSnapshot next (ticked perps their first markTicks); one in both keeps its chain. Drop frames for anything rev does not follow. */
670
+ /** @description Every live-lane frame after this one belongs to revision rev. A book, perp or trade outcome of rev that was not in the previously acknowledged revision gets its bookSnapshot, markSnapshot or tradesSnapshot next (ticked perps their first markTicks); one in both keeps its chain. Drop frames for anything rev does not follow. */
667
671
  readonly data: {
668
672
  /** @description The revision applied from this frame on. */
669
673
  readonly rev: number;
@@ -883,6 +887,68 @@ export type components = {
883
887
  readonly missing: readonly components["schemas"]["MarketPerpCoin"][];
884
888
  };
885
889
  };
890
+ /** @description One taker order's execution on one outcome token in one HyperCore block: every fill of the order that crossed the book in that block (dir Buy or Sell, crossed), summed exactly. Makers' sides, settlements, splits, merges and negations are never orders. A Hyperliquid order executes in the block that includes it, so an order is one event; a part that rests and is hit later is a maker fill and not repeated. Two orders of one trader in one block stay two. */
891
+ readonly MarketTakerOrder: {
892
+ /** @description Unique per taker order, token and block: height, Hyperliquid order ID, coin number and side letter (B buy, A sell). Merge by it. */
893
+ readonly id: string;
894
+ /** @description The outcome traded. */
895
+ readonly outcome_id: components["schemas"]["UInt32String"];
896
+ /** @description The outcome token the taker's order traded, YES or NO, also where its fills took liquidity from the other token's book: selling YES into NO bids is a YES sale. */
897
+ readonly market_side: components["schemas"]["Side"];
898
+ /**
899
+ * @description BUY when the taker acquired market_side's token, SELL when it disposed of it. A chart of the YES price reads BUY NO as bearish.
900
+ * @enum {unknown}
901
+ */
902
+ readonly direction: "BUY" | "SELL";
903
+ /** @description Exact sum of the order's filled shares on the token in this block. */
904
+ readonly shares: string;
905
+ /** @description notional / shares rounded to 8 decimals, halves away from zero; display only, the exact numbers are notional and shares. */
906
+ readonly avg_price: string;
907
+ /** @description Gross trade size in quote: exact sum of price × shares over the order's fills, before fees, the same for buys and sells. */
908
+ readonly notional: string;
909
+ /** @description The asset notional and avg_price are in: the outcome's quote asset, as Hyperliquid names it on the fills (USDC for every outcome Totalis supports). Null when the fills do not name one. */
910
+ readonly quote: string | null;
911
+ /** @description HyperCore block height of the fills: the order executed in this block. */
912
+ readonly height: components["schemas"]["MarketHeight"];
913
+ /** @description Block time, to the millisecond. */
914
+ readonly time: components["schemas"]["Timestamp"];
915
+ /** @description Hyperliquid order ID of the taker's order. */
916
+ readonly oid: number;
917
+ /** @description The taker's HyperCore address, lowercase, as public on Hyperliquid. Nothing else about the trader is attached. */
918
+ readonly taker: string;
919
+ };
920
+ readonly MarketTradesSnapshotFrame: {
921
+ /**
922
+ * @description Frame discriminator, always tradesSnapshot.
923
+ * @constant
924
+ */
925
+ readonly channel: "tradesSnapshot";
926
+ /** @description Sent when a revision adds the outcome to trades, when the trade source changes or is lost, and in place of trades frames a slow socket could not take. Merge its orders into local state by id. */
927
+ readonly data: {
928
+ /** @description The outcome these orders traded. */
929
+ readonly outcome_id: components["schemas"]["UInt32String"];
930
+ /** @description Every taker order of the outcome at or above this height is in orders or follows in trades frames; below it, orders may be missing. It starts about five minutes before the source started and moves up past a hole in the source, past the 50 orders kept, and for an outcome with no order in about the last hour, to about an hour back. Null while Totalis has no trade source, also between moving to another source and that source's first state: then nothing is claimed complete, and a later tradesSnapshot says from where it is again. */
931
+ readonly complete_from_height: components["schemas"]["MarketHeight"] | null;
932
+ /** @description The outcome's latest taker orders the source holds, newest block first and each block's orders in execution order, as its trades frame carries them: up to 50 in whole blocks, more only when its newest block alone held more. Merge by id; never animate them as new trades. */
933
+ readonly orders: readonly components["schemas"]["MarketTakerOrder"][];
934
+ };
935
+ };
936
+ readonly MarketTradesFrame: {
937
+ /**
938
+ * @description Frame discriminator, always trades.
939
+ * @constant
940
+ */
941
+ readonly channel: "trades";
942
+ /** @description New taker orders on a followed outcome, one frame per block that had any, as soon as the block reaches Totalis; nothing is batched. A socket that cannot take one gets a tradesSnapshot of the outcome instead, never a silent gap. These are the trades to animate. */
943
+ readonly data: {
944
+ /** @description The outcome traded. */
945
+ readonly outcome_id: components["schemas"]["UInt32String"];
946
+ /** @description The block every order here executed in. */
947
+ readonly height: components["schemas"]["MarketHeight"];
948
+ /** @description The outcome's taker orders in the block, in execution order, however many it held. */
949
+ readonly orders: readonly components["schemas"]["MarketTakerOrder"][];
950
+ };
951
+ };
886
952
  readonly MarketNetworkFrame: {
887
953
  /**
888
954
  * @description Frame discriminator, always network.
@@ -1,25 +1,25 @@
1
- export declare const sdkVersion = "243.0.0-activity-occurrence-groups";
2
- export declare const openapiSha256 = "b9a7c2bc642eab857265692ae7ae41a120db0e30fa174a44692c8336359ccb52";
3
- export declare const realtimeSha256 = "bea4893352a7110f2659560f3338d9fb5eb441269652a989a7aa9d42a5394554";
1
+ export declare const sdkVersion = "245.0.0-portfolio-margin-funding";
2
+ export declare const openapiSha256 = "f19e1adddfab9856b22023f837186ffc2ade8a861d37431e1531e7bd7e4cc928";
3
+ export declare const realtimeSha256 = "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
6
6
  readonly "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4";
7
7
  readonly "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb";
8
8
  readonly "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401";
9
9
  readonly "error.schema.json": "f444f3ff2a13553f1eea5eaab0088760862691c0d02c60641065cf46022a743f";
10
- readonly "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c";
10
+ readonly "hypercore.schema.json": "521372f8980353bcdd90ca3d0292bc6b41c69dbad3164bfd501b1ca99dac4cb8";
11
11
  readonly "identity.schema.json": "896d975e5f4076cb34ae33f2dcfc41559fd3df1ed39e3d72ac9e342ca1f957fa";
12
12
  readonly "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b";
13
13
  readonly "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50";
14
14
  readonly "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c";
15
- readonly "market-data.schema.json": "229fd522825621e53baa8f85cf6ca56715419ff85df36c0902b3401d50c48a9e";
15
+ readonly "market-data.schema.json": "8fbe5fab071fb2c99328a48abaeb436d514eb7c36c7d19dde465862c04a6129e";
16
16
  readonly "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631";
17
17
  readonly "quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a";
18
- readonly "realtime.schema.json": "bea4893352a7110f2659560f3338d9fb5eb441269652a989a7aa9d42a5394554";
18
+ readonly "realtime.schema.json": "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
19
19
  readonly "social.schema.json": "de0ddadf418a41d2c2cbe714afb5c83947cd34e05b8082f0ba016e18e0b3cd51";
20
20
  };
21
21
  export declare const operations: {
22
- readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGenesis", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSocialLeaderboard", "getSocialPerson", "getSocialPosition", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollowingFeed", "listFollowingPositions", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordGoldenTelegramClick", "refreshPicture", "removeUploadedPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
23
- readonly maker: readonly ["cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "releaseQuoteLease", "renewQuoteLease", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
22
+ readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGenesis", "getGolden", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSocialLeaderboard", "getSocialPerson", "getSocialPosition", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollowingFeed", "listFollowingPositions", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordGoldenTelegramClick", "refreshPicture", "removeUploadedPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
23
+ readonly maker: readonly ["cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "releaseQuoteLease", "renewQuoteLease", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
24
24
  readonly operator: readonly ["live", "ready"];
25
25
  };
@@ -1,22 +1,22 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "243.0.0-activity-occurrence-groups";
3
- export const openapiSha256 = "b9a7c2bc642eab857265692ae7ae41a120db0e30fa174a44692c8336359ccb52";
4
- export const realtimeSha256 = "bea4893352a7110f2659560f3338d9fb5eb441269652a989a7aa9d42a5394554";
2
+ export const sdkVersion = "245.0.0-portfolio-margin-funding";
3
+ export const openapiSha256 = "f19e1adddfab9856b22023f837186ffc2ade8a861d37431e1531e7bd7e4cc928";
4
+ export const realtimeSha256 = "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
7
7
  "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4",
8
8
  "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb",
9
9
  "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401",
10
10
  "error.schema.json": "f444f3ff2a13553f1eea5eaab0088760862691c0d02c60641065cf46022a743f",
11
- "hypercore.schema.json": "5b89b2bbff7ec8cc1b8717375d12ce9cd5ab6aa5af03c4fdc6cc753ef9583a2c",
11
+ "hypercore.schema.json": "521372f8980353bcdd90ca3d0292bc6b41c69dbad3164bfd501b1ca99dac4cb8",
12
12
  "identity.schema.json": "896d975e5f4076cb34ae33f2dcfc41559fd3df1ed39e3d72ac9e342ca1f957fa",
13
13
  "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b",
14
14
  "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50",
15
15
  "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c",
16
- "market-data.schema.json": "229fd522825621e53baa8f85cf6ca56715419ff85df36c0902b3401d50c48a9e",
16
+ "market-data.schema.json": "8fbe5fab071fb2c99328a48abaeb436d514eb7c36c7d19dde465862c04a6129e",
17
17
  "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
18
18
  "quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a",
19
- "realtime.schema.json": "bea4893352a7110f2659560f3338d9fb5eb441269652a989a7aa9d42a5394554",
19
+ "realtime.schema.json": "69596dce99d3ebcd4bbac4587e711017b37ce7e7830940c76b1449d78c070da3",
20
20
  "social.schema.json": "de0ddadf418a41d2c2cbe714afb5c83947cd34e05b8082f0ba016e18e0b3cd51"
21
21
  };
22
22
  export const operations = {
@@ -82,6 +82,7 @@ export const operations = {
82
82
  "getMarketHistory",
83
83
  "getMarketRecurringRound",
84
84
  "getMarketReferenceCloses",
85
+ "getMarketRoundHistory",
85
86
  "getMarketScoreTimeline",
86
87
  "getMarketStats",
87
88
  "getMyGenesis",
@@ -194,6 +195,7 @@ export const operations = {
194
195
  "getMarketHistory",
195
196
  "getMarketRecurringRound",
196
197
  "getMarketReferenceCloses",
198
+ "getMarketRoundHistory",
197
199
  "getOperation",
198
200
  "getQuestion",
199
201
  "getQuestionRecurringRound",
@@ -122,10 +122,11 @@ export type CoreAccountMode = "STANDARD" | "UNIFIED" | "PORTFOLIO_MARGIN";
122
122
  * The account's HyperCore USDC as a Combo can bridge it, read from
123
123
  * Hyperliquid. `spendable` is spot USDC `total` less `hold`, then floored
124
124
  * to USDC base units (6 decimals); `hold` already carries order holds and
125
- * position margin. A Portfolio Margin account offers none, as in the Totalis
126
- * app. `setupFee` says whether a bridge from it also pays `coreSetupFee`; it is
127
- * read only when there is something to bridge. Each is `null` when unread or
128
- * unreadable, never 0.
125
+ * position margin. A Portfolio Margin account offers none whatever its spot
126
+ * read says, as in the Totalis app. `setupFee` says whether a bridge from it
127
+ * also pays `coreSetupFee`; it is read only when there is something to
128
+ * bridge. Each is `null` when unread or unreadable, never 0, and all three
129
+ * are `null` when the spot read is Portfolio Margin's and the mode read is not.
129
130
  */
130
131
  export type CoreCash = {
131
132
  readonly mode: CoreAccountMode | null;
package/dist/hypercore.js CHANGED
@@ -198,8 +198,13 @@ export async function readCoreCash(network, account, info = hyperliquidInfo(), s
198
198
  info(network, { type: "spotClearinghouseState", user: account }, signal),
199
199
  ]);
200
200
  const mode = coreMode(settledValue(modeRead));
201
- const spot = spotUsdc(settledValue(spotRead));
202
- const spendable = mode === null || spot === null ? null : mode === "PORTFOLIO_MARGIN" ? 0n : spot;
201
+ if (mode === "PORTFOLIO_MARGIN")
202
+ return { mode, spendable: 0n, setupFee: null };
203
+ const spotAnswer = settledValue(spotRead);
204
+ if (record(spotAnswer) && spotAnswer.portfolioMarginEnabled === true)
205
+ return { mode: null, spendable: null, setupFee: null };
206
+ const spot = spotUsdc(spotAnswer);
207
+ const spendable = mode === null || spot === null ? null : spot;
203
208
  if (spendable === null || spendable === 0n)
204
209
  return { mode, spendable, setupFee: null };
205
210
  const check = await info(network, { type: "preTransferCheck", user: hyperevmUsdcBridge, source: account }, signal).then(setupFeeCharged, () => null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalis/hip4-client",
3
- "version": "0.108.0",
3
+ "version": "0.110.0",
4
4
  "description": "Totalis HIP-4 SDK: typed HTTP clients, signer-agnostic typed data, a retrying request layer, pagination, a realtime stream and taker/maker flows",
5
5
  "type": "module",
6
6
  "files": [