@totalis/hip4-client 0.125.0 → 0.126.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,15 @@
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.126.0
7
+
8
+ ### Added
9
+
10
+ - `SocialProfile.positions_won` and `positions_lost` (`getSocialPerson`, contract
11
+ `280.0.0-win-rate`): how many of the person's closed positions, singles and
12
+ Combos, ended above and below zero P&L, null while `volume` is. Win rate is
13
+ won over won plus lost.
14
+
6
15
  ## 0.125.0
7
16
 
8
17
  ### Added
@@ -1292,7 +1292,7 @@ export type paths = {
1292
1292
  };
1293
1293
  /**
1294
1294
  * Get a person's profile and totals
1295
- * @description A person's profile: who they are, their follower count, whether the reader follows them, their all-time volume and what everything they hold is worth now, both as of one ledger cut. Volume is null while the holdings ledger does not yet write their account wallet's trades: it starts within about a minute of the wallet being linked, and longer while the identity database is unreadable. Every figure is their account wallet's, the same attribution as their positions, activity and GET /v1/social/leaderboard, so they add up. Their P&L is GET /v1/traders/{username}/pnl, Portfolio's. Anyone reads it, signed out or with any credential, from any origin; a supplied credential must still authenticate. A signed-out answer is the same for everyone and is cached for 30 seconds. A username with no public profile, whether private, unknown or held by an account that is not ACTIVE, is 404 NOT_FOUND, signed in or not. 503 SOURCE_UNAVAILABLE while the holdings ledger is behind (not yet caught up, or stopped for over five minutes).
1295
+ * @description A person's profile: who they are, their follower count, whether the reader follows them, their all-time volume, what everything they hold is worth now and how many of their closed positions they won and lost, all as of one ledger cut. Volume is null while the holdings ledger does not yet write their account wallet's trades: it starts within about a minute of the wallet being linked, and longer while the identity database is unreadable. Every figure is their account wallet's, the same attribution as their positions, activity and GET /v1/social/leaderboard, so they add up. Their P&L is GET /v1/traders/{username}/pnl, Portfolio's. Anyone reads it, signed out or with any credential, from any origin; a supplied credential must still authenticate. A signed-out answer is the same for everyone and is cached for 30 seconds. A username with no public profile, whether private, unknown or held by an account that is not ACTIVE, is 404 NOT_FOUND, signed in or not. 503 SOURCE_UNAVAILABLE while the holdings ledger is behind (not yet caught up, or stopped for over five minutes).
1296
1296
  */
1297
1297
  readonly get: operations["getSocialPerson"];
1298
1298
  readonly put?: never;
@@ -6074,6 +6074,10 @@ export type components = {
6074
6074
  readonly following?: boolean;
6075
6075
  /** @description How many trades others placed by copying them into a position: each one copied from their profile and credited with POST /v1/me/copied-trades, and each entry automatic copying filled for a follower. Copied exits are not counted. Servers before contract 259 omit it. */
6076
6076
  readonly trades_copied: number;
6077
+ /** @description How many of their positions closed with a P&L above zero, as of the ledger cut: each HyperCore position their account wallet sold or held to settlement, by what it received less what it paid, and each Combo position it cashed out or held to settlement, by what it received after the profit fee less its cost. Open positions, one that broke even, one whose P&L is unknown and a Combo passed on or acquired for nothing count in neither this nor positions_lost. Win rate is positions_won over positions_won plus positions_lost. Null while volume is: the ledger does not hold their wallet's trades whole yet, or is replaying a repaired range of them. Servers before contract 280 omit it. */
6078
+ readonly positions_won: number | null;
6079
+ /** @description How many of their positions closed with a P&L below zero, counted as positions_won, and null with it. Servers before contract 280 omit it. */
6080
+ readonly positions_lost: number | null;
6077
6081
  /** @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 position it opened and what that position 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. */
6078
6082
  readonly volume: components["schemas"]["$defs-Amount"] | null;
6079
6083
  /** @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. */
@@ -1,5 +1,5 @@
1
- export declare const sdkVersion = "279.0.0-no-market-history";
2
- export declare const openapiSha256 = "25e0b136071e6d72f52eb5f7fb4144921fad38680ce1751c989e1e06a6c0c80c";
1
+ export declare const sdkVersion = "280.0.0-win-rate";
2
+ export declare const openapiSha256 = "da880ecc0cae0a5414a3c4191ba2d30840c06ec1b703cb0f5b34129ebb883770";
3
3
  export declare const realtimeSha256 = "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42";
4
4
  export declare const jsonSchemaSha256: {
5
5
  readonly "account.schema.json": "3120357249f55f8481d5afb7a99112f803c22c6a1cbe3adadca478bb313f8160";
@@ -16,7 +16,7 @@ export declare const jsonSchemaSha256: {
16
16
  readonly "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631";
17
17
  readonly "quote.schema.json": "5c16a54c428656a4e8c1042b2057ce8290e6eebcc02b237f5dce7e4c13b7ded0";
18
18
  readonly "realtime.schema.json": "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42";
19
- readonly "social.schema.json": "33f48967f8a147809b466717de057c4bf6519eb1067d75ed49fd4c21c93104d4";
19
+ readonly "social.schema.json": "98e5c2a3159e5833e9af5e776231875bc42133144476e771e73575cec3f36380";
20
20
  };
21
21
  export declare const operations: {
22
22
  readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "claimGoldenLink", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getChart", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGenesis", "getGolden", "getGoldenLinkSuggestions", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercoreOrders", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getLiveMarks", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketResults", "getMarketRoundHistory", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getMyTradingRewards", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getPublicGoldenMarkets", "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", "listFollowers", "listFollowingFeed", "listFollowingPositions", "listFollows", "listHypercorePositions", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarketTrades", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialFollowers", "listSocialFollowing", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordCopiedTrade", "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,6 +1,6 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "279.0.0-no-market-history";
3
- export const openapiSha256 = "25e0b136071e6d72f52eb5f7fb4144921fad38680ce1751c989e1e06a6c0c80c";
2
+ export const sdkVersion = "280.0.0-win-rate";
3
+ export const openapiSha256 = "da880ecc0cae0a5414a3c4191ba2d30840c06ec1b703cb0f5b34129ebb883770";
4
4
  export const realtimeSha256 = "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42";
5
5
  export const jsonSchemaSha256 = {
6
6
  "account.schema.json": "3120357249f55f8481d5afb7a99112f803c22c6a1cbe3adadca478bb313f8160",
@@ -17,7 +17,7 @@ export const jsonSchemaSha256 = {
17
17
  "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
18
18
  "quote.schema.json": "5c16a54c428656a4e8c1042b2057ce8290e6eebcc02b237f5dce7e4c13b7ded0",
19
19
  "realtime.schema.json": "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42",
20
- "social.schema.json": "33f48967f8a147809b466717de057c4bf6519eb1067d75ed49fd4c21c93104d4"
20
+ "social.schema.json": "98e5c2a3159e5833e9af5e776231875bc42133144476e771e73575cec3f36380"
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.125.0",
3
+ "version": "0.126.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": [