@outcome.xyz/hip4 on npm. Tags and full diffs live on GitHub.
October 5, 2026
Changes compared with 1.2.0-beta.2. Every field that existed there returns what it did there, and the new values are in new fields beside them.
Added
- Readable names in
parsed*fields.parsedName,sides[].parsedName, andparsedQuestionNameon markets,parsedTitle,parsedQuestion, andoutcomes[].parsedNameon events,outcomes[].parsedNameon prices, andparsedEventTitle,parsedMarketQuestion, andparsedOutcomeNameon positions carry the names rendered from Hyperliquid’s template registry (outcomeTemplates), for example"BTC touches 90000 by Nov 1, 00:00 UTC"instead of"template:priceTouch". A template question’s fallback leg is rendered as"Other". If the registry can’t be fetched, thetemplate:prefix is still removed from plain names such as"template:Yes".getParsedSideNameResolver()returns the rendered side names, andgetSideNameResolver()keeps returning the wire names. See Fetch markets. rawon order results. Hyperliquid’s own message when it rejects the wholeplaceOrderorplaceOrdersrequest, for exampleUser or API Wallet 0x... does not exist..errorstaysExchange returned non-ok status.formatOutcomePrice(price)formats a HIP-4 outcome price (number or string) for the order wire. See Utilities.HIP4Client.fetchSpotAssetCtxs()returns the asset contexts (24h volume and prices) for every spot asset, outcome side coins included.classifyOutcomeandclassifyAllOutcomestake the template registry as an optional last argument.readDeployedOutcome(outcome, question, declared)andparseInstanceDescription(description, declared)take an optional set of declared keyword names to drop the segments of ametadata=tag body.
Changed
fetchMarketshonorssortBy. It was ignored before."newest"puts the highest outcome ID first,"expiry"puts the soonest event time first (markets without one go last), and"volume"puts the highest 24h volume first (one extraspotMetaAndAssetCtxsrequest). When you omitsortBy, results stay in catalog order. See Events.- Limit prices round to the outcome tick.
placeOrderandplaceOrdersround limit-order prices to at most 5 significant figures and at most 5 decimals (a 0.00001 tick) before signing. Previously a price below 0.1 could keep 6 decimals, which the exchange rejects. parseInstanceDescription,readDeployedOutcome, andreadDeployedOutcomescut themetadata=routing tag that deployers glue onto a value, sothreshold:65000 metadata=category:economicsreads as65000.- Template-name cache. Refreshing the market or event cache makes one extra
outcomeTemplatesrequest, cached for 30 seconds.
Fixed
fetchPositionsprices.currentPriceandunrealizedPnlnow use the live mid. Spot balances name side coins+<coin>while mids use#<coin>, so the lookup always returned"0".- The
fetchApprovedBuildersdocumentation now states that an address can approve up to 10 builders, not 3.
Coming from 1.3.0-beta.0
1.3.0-beta.0 was published to npm under thelatest tag. Compared with it, 1.3.0 changes two things:- Names. The existing name fields are the names Hyperliquid sends again:
name,sides[].name, andquestionNameon markets,title,question, and outcomenameon events, side names on prices, andeventTitle,marketQuestion, andoutcomeNameon positions. Read the rendered names from theparsed*fields above. - Order errors. When Hyperliquid rejects a whole
placeOrderorplaceOrdersrequest,errorisExchange returned non-ok statusagain. Read Hyperliquid’s message fromraw.
fetchPositions price fix, the metadata= tag cut, and sortBy stay as in 1.3.0-beta.0.Pull request #20 | Pull request #23 | Full diffOctober 5, 2026
Changed
- Hyperliquid’s own rejection message. When Hyperliquid rejects a whole
placeOrderorplaceOrdersrequest,result.errornow carries Hyperliquid’s message (for exampleUser or API Wallet 0x... does not exist.) instead of the genericExchange returned non-ok status. - Limit prices round to 5 decimals. Before signing, limit-order prices are rounded to at most 5 significant figures and at most 5 decimals (a 0.00001 tick). Previously a price below 0.1 could keep 6 decimals, which the exchange rejects.
fetchMarketshonorssortBy. It was ignored before."newest"puts the highest outcome ID first,"expiry"puts the soonest event time first (markets without one go last), and"volume"puts the highest 24h volume first (one extraspotMetaAndAssetCtxsrequest). When you omitsortBy, results stay in catalog order. See Events.- Readable names for template markets.
fetchMarkets,fetchEvents,fetchEvent, the side names onfetchPositions, andoutcomeCreatedupdates render template markets from Hyperliquid’s template registry (outcomeTemplates), for example"BTC touches 90000 by Nov 1, 00:00 UTC"instead of"template:priceTouch". A template question’s fallback leg is named"Other". If the registry can’t be fetched, thetemplate:prefix is still removed from plain names such as"template:Yes". Refreshing the market or event cache makes one extraoutcomeTemplatesrequest, cached for 30 seconds. classifyOutcomeandclassifyAllOutcomestake the template registry as an optional last argument. See Utilities.parseInstanceDescriptioncuts themetadata=routing tag that deployers glue onto a value, and takes an optional set of declared keyword names to drop the tag’s body segments.
Added
formatOutcomePrice(price)formats a HIP-4 outcome price (number or string) for the order wire.formatPriceis unchanged. See Utilities.HIP4Client.fetchSpotAssetCtxs()returns the asset contexts (24h volume and prices) for every spot asset, outcome side coins included.
Fixed
fetchPositionsprices.currentPriceandunrealizedPnlnow use the live mid. Spot balances name side coins+<coin>while mids use#<coin>, so the lookup always returned"0".- The
fetchApprovedBuildersdocumentation now states that an address can approve up to 10 builders, not 3.
parsed* fields, and error is the generic Exchange returned non-ok status again, with Hyperliquid’s message in raw.Pull request #20 | Full diffSeptember 29, 2026
Fixed
- Unsubscribing before the WebSocket opens. Calling an unsubscribe function before the socket has opened now removes the queued subscribe message. Previously the cancelled subscription was still sent when the socket opened, so its frames kept arriving on the shared channel (for example, a coarse
l2Bookoverwriting a full-precision book subscribed right after it). - No duplicate queued subscriptions. Identical subscribe messages are queued once, so a socket that drops before opening and reconnects sends each subscription once.
September 22, 2026
Added
minOrderNotionaloption.createHIP4Adapter({ minOrderNotional })raises the client-side order-notional floor above the protocolMIN_NOTIONAL($1). A value belowMIN_NOTIONALthrows when you create the adapter.getMinShares(markPx, minNotional?)takes an optional second parameter for the same purpose.MIN_NOTIONALitself is unchanged.
September 16, 2026
Changed
MIN_NOTIONALlowered from 10 to 1. The Hyperliquid network upgrade lowered the minimum order notional for HIP-4 outcome orders to $1. The SDK’s client-side check follows, andgetMinShares(markPx)now returns about a tenth of its previous value.- Release versions. Versions now use the
X.Y.Z-beta.Nformat, and each release carries a signed npm provenance attestation.
September 2, 2026
Removed
liquidityRewardsmodule (breaking). The World Cup 2026 campaign it queried is permanently retired - Monarch’s campaign API now returns410 Goneon every route, for any date. Seasons1was the only registered season, so the whole module is gone:liquidityRewards,LIQUIDITY_REWARDS_CONFIG,LiquidityRewardsError, and everyLiquidityRewards*type. See Liquidity Rewards (retired).
Added
outcomeRewardsmodule. Programme-wide totals, one wallet’s earnings, finalized reward periods, and a leaderboard, from the public Outcome liquidity-rewards payouts API. See Outcome Rewards.outcomeRewards.programme()- paid/pending/awarded USDC totalsoutcomeRewards.wallet(address)- one wallet’s totals and reward rowsoutcomeRewards.periods({ limit })- every finalized reward periodoutcomeRewards.leaderboard({ limit })- wallets ranked by USDC paidOUTCOME_REWARDS_CONFIG,OutcomeRewardsError, and typed results exported from the main entry point
July 6, 2026
Fixed
- Shared WebSocket subscriptions are now reference-counted. When several consumers subscribe with the same payload (e.g. multiple
createPriceFeedinstances on theallMidsfeed), they share one underlying wire subscription. Previously the first consumer to unsubscribe tore down the stream for every remaining subscriber - and the reconnect path never restored it. The wire unsubscribe now fires only when the last subscriber leaves. See Real-time data. - The returned unsubscribe function is idempotent. Calling it more than once is safe - a second call is a no-op and does not affect other subscribers (React Strict Mode invokes effect cleanups twice).
June 25, 2026
Added
wallet.sellHype(amount)- sell HYPE on the HYPE/USDC spot market. Size is floored to HYPE’s 2 decimals (ROUND_DOWN) so a sell never exceeds your balance. See Wallet.wallet.agentSetAbstraction("u" | "p" | "i")- switch the master account’s abstraction mode ("u"unified account,"p"portfolio margin,"i"disabled) via the approved agent key. See Wallet.client.fetchUserNonFundingLedgerUpdates(user)- REST counterpart of theuserNonFundingLedgerUpdateschannel (deposits, withdrawals, transfers), returned newest-first.participantsCountoncheckRewardsresults - total distinct participants for the epoch, independent of thewalletfilter. See Liquidity Rewards.- Exported
HYPE_USDC_SPOT_INDEX_MAINNET/HYPE_USDC_SPOT_INDEX_TESTNETconstants andHLLedgerUpdate,HLLedgerDelta,HLWebData3,HLClearinghouseState,HLFrontendOrdertypes from the root entry point.
June 11, 2026
Added
liquidityRewardsmodule - season-scoped liquidity-reward checks, starting withs1(World Cup 2026). See Liquidity Rewards.checkEligibility({ subject })- eligible team and match books per scoring daycheckRewards({ wallet, date })- per-wallet reward scoresLIQUIDITY_REWARDS_CONFIG,LiquidityRewardsError, and typed results exported from the main entry point
quoteTokenon outcomes -HLOutcomeandHLWsOutcomeSpeccarry an optionalquoteTokensymbol. The field is optional on the wire; SDK fetch helpers (outcomeMeta, settled-outcome lookups, and WebSocketoutcomeCreatedupdates) default it to"USDH"when absent.
May 20, 2026
Initial public beta release
Added
createHIP4Adapter()- single entry point for HIP-4 prediction market access on Hyperliquid (events, market data, account state, trading, wallet, auth)- Typed sub-modules:
events,marketData,account,trading,wallet,auth,ramp - WebSocket subscriptions for prices, order books, fills, and positions (return an unsubscribe function)
- Internal L1 agent + EIP-712 signing - no external crypto dependencies
- Decimal-precision math helpers under
lib/precisionfor safe price/size arithmetic - Stream helpers:
createPriceFeed,createPerpPriceFeed - Type-only entry point:
import type { ... } from "@outcome.xyz/hip4/types"
Notes
- Zero runtime dependencies
- Node 18+ required