@totalis/hip4-client 0.111.0 → 0.113.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,28 @@
|
|
|
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.113.0
|
|
7
|
+
|
|
8
|
+
### Deprecated
|
|
9
|
+
|
|
10
|
+
- `getMarketHistory`, `getMarketReferenceCloses` and `getPerpMarks`: the chart
|
|
11
|
+
read `GET /v1/charts/{series}` will replace them. They keep working until
|
|
12
|
+
then; their removal gets a dated notice first.
|
|
13
|
+
|
|
14
|
+
## 0.112.0
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
Contract `247.0.0-result-notifications`, additive:
|
|
19
|
+
|
|
20
|
+
- Result notifications (TT-2875). `listMyNotifications` can answer kind
|
|
21
|
+
`COMBO_RESULT`, whose `subject` is the settled Combo's `position_id`, and
|
|
22
|
+
`SINGLE_RESULT`, whose `subject` is the HyperCore settlement credit's
|
|
23
|
+
`settlement_id`. `subject` now also matches those ids.
|
|
24
|
+
- The account stream sends `NOTIFICATION_CREATED` when a notification is
|
|
25
|
+
recorded for the account, with its `notification_id` and `kind`; reread
|
|
26
|
+
`listMyNotifications`.
|
|
27
|
+
|
|
6
28
|
## 0.111.0
|
|
7
29
|
|
|
8
30
|
### Added
|
|
@@ -1328,7 +1328,7 @@ export type paths = {
|
|
|
1328
1328
|
};
|
|
1329
1329
|
/**
|
|
1330
1330
|
* Get one page of the leaderboard
|
|
1331
|
-
* @description One page of 25 ranks of people with a public profile, by volume or P&L over the range, and the reader's own rank wherever it falls. Volume is GET /v1/social/people/{username}'s over the range: their account wallet
|
|
1331
|
+
* @description One page of 25 ranks of people with a public profile, by volume or P&L over the range, and the reader's own rank wherever it falls. Volume is GET /v1/social/people/{username}'s over the range, from the start of its hour: every dollar their account wallet moved in or out of a trade, before fees, its buys and sells, what its results paid and the Combos it opened, each stake and what it paid back when sold back or settled; only people who traded rank, and a person whose volume is unknown (null on the profile) is left out. P&L is GET /v1/traders/{username}/pnl's change over the range (ALL: since it began), losses included; only people whose P&L over the range is not zero, or who traded in it (a HyperCore fill or Settlement credit, or a Combo paid for, sold, cashed out or settled; a Combo given or received free is not a trade), rank, so nobody ranks at 0 for doing nothing. Left out: the leaderboard's known roles (house market maker, makers, API operators, promotion accounts) and anyone whose profile is not public at the time of the read, even in a ranking read while it was; the ranks below close up. Ties rank by username. A ranking is read every five minutes and kept for an hour; as_of says which one a page comes from. Pass it back as as_of for the later pages, so every page and the reader's rank come from that ranking; without it the answer is the newest. An as_of no longer kept is 409 CURSOR_EXPIRED: read the first page again. Until the first read, once the newest is an hour old, and for VOLUME while the holdings ledger is behind (not yet caught up, or stopped for over five minutes), whatever as_of, the answer is 503 DEPENDENCY_STALE; a deployment with the leaderboard off, or P&L not ranked, answers 503 CONTRACT_UNAVAILABLE. Only a signed-in participant session reads it: anonymous calls and API keys are refused.
|
|
1332
1332
|
*/
|
|
1333
1333
|
readonly get: operations["getSocialLeaderboard"];
|
|
1334
1334
|
readonly put?: never;
|
|
@@ -2293,7 +2293,8 @@ export type paths = {
|
|
|
2293
2293
|
};
|
|
2294
2294
|
/**
|
|
2295
2295
|
* Get market history
|
|
2296
|
-
* @
|
|
2296
|
+
* @deprecated
|
|
2297
|
+
* @description Get up to 24 hours of one-minute price history for one side of a market; deprecated, as the chart read `GET /v1/charts/{series}` will replace it.
|
|
2297
2298
|
*/
|
|
2298
2299
|
readonly get: operations["getMarketHistory"];
|
|
2299
2300
|
readonly put?: never;
|
|
@@ -2319,8 +2320,11 @@ export type paths = {
|
|
|
2319
2320
|
};
|
|
2320
2321
|
/**
|
|
2321
2322
|
* Get market reference closes
|
|
2323
|
+
* @deprecated
|
|
2322
2324
|
* @description Anyone: get the one-minute or one-hour closes of a market side's reference price history, compressed for a line chart.
|
|
2323
2325
|
*
|
|
2326
|
+
* Deprecated: the chart read `GET /v1/charts/{series}` will replace it. It keeps working until then; its removal gets a dated notice first.
|
|
2327
|
+
*
|
|
2324
2328
|
* With `bucket=MINUTE`, the default, this is `series=REFERENCE_PRICE_OHLC` history with only each minute's close: the same source, window, anchor, scale, `closed_before`, `limit` and cursor. With `bucket=HOUR` each UTC hour carries the close of its last observed minute over a window of up to 90 days, for charts longer than a day. Each run `[bucket, close, buckets]` covers `buckets` consecutive observed buckets of `bucket_seconds` from `bucket` (Unix seconds) that closed at `close`; a missing bucket or a new close starts a new run. Expanding minute runs gives exactly the minutes and closes of the matching history page. Reference minutes record the chance the market showed, whatever its `chance_basis`, so a minute without a known chance is absent; minutes before TT-2366 hold only midpoint chances. Never fill a bucket between runs.
|
|
2325
2329
|
*/
|
|
2326
2330
|
readonly get: operations["getMarketReferenceCloses"];
|
|
@@ -2617,8 +2621,11 @@ export type paths = {
|
|
|
2617
2621
|
};
|
|
2618
2622
|
/**
|
|
2619
2623
|
* Get perp marks
|
|
2624
|
+
* @deprecated
|
|
2620
2625
|
* @description Anyone: get a perp's mark price on a fixed step, for a price chart.
|
|
2621
2626
|
*
|
|
2627
|
+
* Deprecated: the chart read `GET /v1/charts/{series}` will replace it. It keeps working until then; its removal gets a dated notice first.
|
|
2628
|
+
*
|
|
2622
2629
|
* Totalis records the mark of every perp a listed price market charts from its own Hyperliquid node about once a second and keeps four days of it. Each step closes at the mark at its end; steps group into runs `[step, mark, steps]` of `step_seconds` from `step` (Unix seconds). A step the record cannot prove, because no read of the node came within 2.5 seconds around its end, 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.
|
|
2623
2630
|
*/
|
|
2624
2631
|
readonly get: operations["getPerpMarks"];
|
|
@@ -5681,7 +5688,7 @@ export type components = {
|
|
|
5681
5688
|
readonly followers: number;
|
|
5682
5689
|
/** @description Whether the reading account follows them. Absent without a participant session. */
|
|
5683
5690
|
readonly following?: boolean;
|
|
5684
|
-
/** @description All-time volume in 10^-8 USDC:
|
|
5691
|
+
/** @description All-time volume in 10^-8 USDC: every dollar their account wallet moved in or out of a trade, before fees. On HIP-4 outcomes quoted in USDC, price times size of every buy and sell and of its side of every result (a loss adds nothing, a refund half; converting shares adds nothing); on Combos, the stake of every ticket it opened and what that ticket paid it back when sold back or settled. What GET /v1/social/leaderboard ranks; an outcome quoted in another asset (USDH, mainnet outcomes 0 to 83) adds nothing. Null, unknown, while the holdings ledger does not yet write their account wallet's trades, or while a Combo log it counts has no block time read yet. */
|
|
5685
5692
|
readonly volume: components["schemas"]["$defs-Amount"] | null;
|
|
5686
5693
|
/** @description What everything they hold is worth now in 10^-8 USDC, the sum of the values GET /v1/social/people/{username}/positions lists, as Portfolio values its own. Null when any one is unknown, never short. */
|
|
5687
5694
|
readonly positions_value: components["schemas"]["$defs-Amount"] | null;
|
|
@@ -11038,11 +11045,11 @@ export interface operations {
|
|
|
11038
11045
|
*/
|
|
11039
11046
|
readonly id: string;
|
|
11040
11047
|
/**
|
|
11041
|
-
* @description What happened. FEATURE_UNLOCKED: the account unlocked the feature named by subject. ANNOUNCEMENT: Totalis sent a message, in title, body and link. BADGE_EARNED: the account earned the badge named by subject. A client shows only kinds it knows.
|
|
11048
|
+
* @description What happened. FEATURE_UNLOCKED: the account unlocked the feature named by subject. ANNOUNCEMENT: Totalis sent a message, in title, body and link. BADGE_EARNED: the account earned the badge named by subject. COMBO_RESULT: a Combo the account held settled. SINGLE_RESULT: a HyperCore position the account held settled. A client shows only kinds it knows.
|
|
11042
11049
|
* @enum {string}
|
|
11043
11050
|
*/
|
|
11044
|
-
readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT" | "BADGE_EARNED";
|
|
11045
|
-
/** @description What the notification is about. For FEATURE_UNLOCKED, the feature: REFERRALS, the account's own invite link, which admits people once the account has traded $5. For ANNOUNCEMENT, an opaque id of the message. For BADGE_EARNED, the badge: GENESIS, the Genesis Account badge (GET /v1/me/genesis). A client shows only subjects it knows. */
|
|
11051
|
+
readonly kind: "FEATURE_UNLOCKED" | "ANNOUNCEMENT" | "BADGE_EARNED" | "COMBO_RESULT" | "SINGLE_RESULT";
|
|
11052
|
+
/** @description What the notification is about. For FEATURE_UNLOCKED, the feature: REFERRALS, the account's own invite link, which admits people once the account has traded $5. For ANNOUNCEMENT, an opaque id of the message. For BADGE_EARNED, the badge: GENESIS, the Genesis Account badge (GET /v1/me/genesis). For COMBO_RESULT, the position_id of the Combo, as GET /v1/me/positions names it. For SINGLE_RESULT, the settlement_id of the credit, as GET /v1/hypercore/settlement-credits names it. A client shows only subjects it knows. */
|
|
11046
11053
|
readonly subject: string;
|
|
11047
11054
|
/** Format: date-time */
|
|
11048
11055
|
readonly created_at: string;
|
|
@@ -191,6 +191,16 @@ export type components = {
|
|
|
191
191
|
/** @description Log index of the change within its block. */
|
|
192
192
|
readonly log_index: number;
|
|
193
193
|
};
|
|
194
|
+
/** @description A notification was recorded for the account. */
|
|
195
|
+
readonly NotificationCreatedPayload: {
|
|
196
|
+
/**
|
|
197
|
+
* Format: uuid
|
|
198
|
+
* @description The notification, as GET /v1/me/notifications lists it.
|
|
199
|
+
*/
|
|
200
|
+
readonly notification_id: string;
|
|
201
|
+
/** @description The notification's kind. A client acts only on kinds it knows. */
|
|
202
|
+
readonly kind: string;
|
|
203
|
+
};
|
|
194
204
|
readonly EventBase: {
|
|
195
205
|
/** @description Cursor of this event. Persist it after applying the event and resume after it. */
|
|
196
206
|
readonly cursor: components["schemas"]["Cursor"];
|
|
@@ -203,7 +213,7 @@ export type components = {
|
|
|
203
213
|
* @description What changed. The value selects the payload shape.
|
|
204
214
|
* @enum {unknown}
|
|
205
215
|
*/
|
|
206
|
-
readonly event_type: "QUOTE_CREATED" | "QUOTE_REMOVED" | "QUOTE_ACCEPTED" | "RFQ_CREATED" | "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED" | "RFQ_DECLINED" | "OPERATION_UPDATED" | "VAULT_BALANCE_CHANGED" | "WALLET_FUNDING_UPDATED" | "WITHDRAWAL_UPDATED" | "CORE_EXIT_UPDATED" | "WALLET_BALANCE_CHANGED" | "COLLATERAL_REDUCTION_UPDATED" | "POSITION_OPENED" | "POSITION_TRANSFERRED" | "POSITION_SETTLED" | "POSITION_CLOSED" | "POSITION_UPDATED" | "MAKER_CAPITAL_UPDATED";
|
|
216
|
+
readonly event_type: "QUOTE_CREATED" | "QUOTE_REMOVED" | "QUOTE_ACCEPTED" | "RFQ_CREATED" | "RFQ_ACCEPTED" | "RFQ_CANCELLED" | "RFQ_FAILED" | "RFQ_DECLINED" | "OPERATION_UPDATED" | "VAULT_BALANCE_CHANGED" | "WALLET_FUNDING_UPDATED" | "WITHDRAWAL_UPDATED" | "CORE_EXIT_UPDATED" | "WALLET_BALANCE_CHANGED" | "COLLATERAL_REDUCTION_UPDATED" | "POSITION_OPENED" | "POSITION_TRANSFERRED" | "POSITION_SETTLED" | "POSITION_CLOSED" | "POSITION_UPDATED" | "MAKER_CAPITAL_UPDATED" | "NOTIFICATION_CREATED";
|
|
207
217
|
/**
|
|
208
218
|
* Format: date-time
|
|
209
219
|
* @description When the authoritative state transition happened, RFC3339 UTC. Measure receipt time locally.
|
|
@@ -361,6 +371,14 @@ export type components = {
|
|
|
361
371
|
readonly event_type: "MAKER_CAPITAL_UPDATED";
|
|
362
372
|
/** @description The maker and where the change happened on chain; reread its capital. */
|
|
363
373
|
readonly payload: components["schemas"]["MakerCapitalPayload"];
|
|
374
|
+
}) | (components["schemas"]["EventBase"] & {
|
|
375
|
+
/**
|
|
376
|
+
* @description NOTIFICATION_CREATED: a notification was recorded for you. Account stream only.
|
|
377
|
+
* @constant
|
|
378
|
+
*/
|
|
379
|
+
readonly event_type: "NOTIFICATION_CREATED";
|
|
380
|
+
/** @description The notification and its kind; reread GET /v1/me/notifications. */
|
|
381
|
+
readonly payload: components["schemas"]["NotificationCreatedPayload"];
|
|
364
382
|
});
|
|
365
383
|
readonly PublicationCheckpoint: {
|
|
366
384
|
/** @description Every authorized event up to this cursor was published and delivered on this socket before this frame. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const sdkVersion = "
|
|
2
|
-
export declare const openapiSha256 = "
|
|
3
|
-
export declare const realtimeSha256 = "
|
|
1
|
+
export declare const sdkVersion = "247.0.0-result-notifications";
|
|
2
|
+
export declare const openapiSha256 = "ead4c5ea9d3de5a6dd887e2cd342e08d3aac2c42d7931d7d854725daaa327854";
|
|
3
|
+
export declare const realtimeSha256 = "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
|
|
4
4
|
export declare const jsonSchemaSha256: {
|
|
5
5
|
readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
|
|
6
6
|
readonly "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4";
|
|
@@ -15,8 +15,8 @@ export declare const jsonSchemaSha256: {
|
|
|
15
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": "
|
|
19
|
-
readonly "social.schema.json": "
|
|
18
|
+
readonly "realtime.schema.json": "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
|
|
19
|
+
readonly "social.schema.json": "42afe3d8efbc483a761596538606ec3f83689881a1af7f52edcff389c92537be";
|
|
20
20
|
};
|
|
21
21
|
export declare const operations: {
|
|
22
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", "searchTraders", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by scripts/generate.mjs; do not edit.
|
|
2
|
-
export const sdkVersion = "
|
|
3
|
-
export const openapiSha256 = "
|
|
4
|
-
export const realtimeSha256 = "
|
|
2
|
+
export const sdkVersion = "247.0.0-result-notifications";
|
|
3
|
+
export const openapiSha256 = "ead4c5ea9d3de5a6dd887e2cd342e08d3aac2c42d7931d7d854725daaa327854";
|
|
4
|
+
export const realtimeSha256 = "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef";
|
|
5
5
|
export const jsonSchemaSha256 = {
|
|
6
6
|
"account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
|
|
7
7
|
"comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4",
|
|
@@ -16,8 +16,8 @@ export const jsonSchemaSha256 = {
|
|
|
16
16
|
"market-data.schema.json": "8fbe5fab071fb2c99328a48abaeb436d514eb7c36c7d19dde465862c04a6129e",
|
|
17
17
|
"product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
|
|
18
18
|
"quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a",
|
|
19
|
-
"realtime.schema.json": "
|
|
20
|
-
"social.schema.json": "
|
|
19
|
+
"realtime.schema.json": "cf0bafff0b355ea9fb642d4a3402dcc2a4e5fc7569a2b448184beb4043d154ef",
|
|
20
|
+
"social.schema.json": "42afe3d8efbc483a761596538606ec3f83689881a1af7f52edcff389c92537be"
|
|
21
21
|
};
|
|
22
22
|
export const operations = {
|
|
23
23
|
"client": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totalis/hip4-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.113.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": [
|