Description
Context
NautilusTrader has an official Hyperliquid integration (spot/perps), but it does not currently support Hyperliquid predicted markets (HIP-4 outcome markets).
Hyperliquid exposes outcome market metadata via POST /info with { "type": "outcomeMeta" }.
Hyperliquid also documents the outcome asset encoding:
encoding = 10 * outcome + side
- outcome market coin:
#<encoding>
- outcome action asset id:
100_000_000 + encoding
This RFC proposes adding official adapter support for outcome markets:
- instrument discovery + model mapping
- market data subscriptions (quotes/trades/order book where available)
- order entry/cancel for outcome assets
- recurring market refresh / rotation support
Why?
- Outcome markets are a new instrument class not covered by spot/perps.
- The metadata endpoint + asset encoding are documented and appear stable enough to integrate behind an opt-in flag.
- Recurring markets (daily / 15m / etc.) are a good fit for systematic strategies, but require correct rotation handling.
Proposed Scope
Instruments
-
Add HyperliquidProductType.OUTCOME as an opt-in product type for Hyperliquid data/execution clients.
-
Load outcome instrument definitions from outcomeMeta.
-
Map outcomes to BinaryOption instruments with a stable InstrumentId scheme:
OUTCOME-{outcome_id}-{YES|NO}-OUTCOME.HYPERLIQUID
-
Persist the raw-symbol and action-asset mapping per docs:
raw_symbol = #<encoding> where encoding = outcome_id * 10 + side
asset_id = 100_000_000 + encoding
-
Parse the description strings into structured metadata, and attach it to BinaryOption.info (e.g. class, underlying, period, expiry, targetPrice, priceThresholds, etc.).
Market data
- Enable WS subscriptions for outcomes (BBO/trades/book where supported for
#<encoding> coins).
Execution
- Enable order submit/cancel/modify for outcome assets using the documented action-asset encoding.
Rotation / refresh
Recurring predicted markets can rotate in two ways:
- Recycled parameters: the tradable
InstrumentId remains stable, but the expiry/threshold metadata changes after expiry.
- Active outcome id changes: for categorical questions (e.g.
priceBucket with 3 named outcomes) the active tradable outcomes may change to new outcome IDs each period.
Propose:
- An adapter-level configuration option to refresh outcome instrument definitions aligned to the next known expiry (rather than fixed-interval polling).
- A documented strategy pattern (and/or helper) to “select active instrument by key” and re-subscribe when the active
InstrumentId changes.
Non-goals (initially)
- Historical quotes/trades for outcomes (if the venue doesn’t provide it).
- Guaranteeing deep liquidity / continuous quotes for outcomes.
Considerations
- Hyperliquid docs have historically labeled
outcomeMeta as testnet-only; the integration should be opt-in and degrade gracefully if unavailable.
- Examples/tests should not assume outcome quotes always stream continuously.
References
Description
Context
NautilusTrader has an official Hyperliquid integration (spot/perps), but it does not currently support Hyperliquid predicted markets (HIP-4 outcome markets).
Hyperliquid exposes outcome market metadata via
POST /infowith{ "type": "outcomeMeta" }.Hyperliquid also documents the outcome asset encoding:
encoding = 10 * outcome + side#<encoding>100_000_000 + encodingThis RFC proposes adding official adapter support for outcome markets:
Why?
Proposed Scope
Instruments
Add
HyperliquidProductType.OUTCOMEas an opt-in product type for Hyperliquid data/execution clients.Load outcome instrument definitions from
outcomeMeta.Map outcomes to
BinaryOptioninstruments with a stableInstrumentIdscheme:OUTCOME-{outcome_id}-{YES|NO}-OUTCOME.HYPERLIQUIDPersist the raw-symbol and action-asset mapping per docs:
raw_symbol = #<encoding>whereencoding = outcome_id * 10 + sideasset_id = 100_000_000 + encodingParse the
descriptionstrings into structured metadata, and attach it toBinaryOption.info(e.g.class,underlying,period,expiry,targetPrice,priceThresholds, etc.).Market data
#<encoding>coins).Execution
Rotation / refresh
Recurring predicted markets can rotate in two ways:
InstrumentIdremains stable, but theexpiry/threshold metadata changes after expiry.priceBucketwith 3 named outcomes) the active tradable outcomes may change to new outcome IDs each period.Propose:
InstrumentIdchanges.Non-goals (initially)
Considerations
outcomeMetaas testnet-only; the integration should be opt-in and degrade gracefully if unavailable.References
outcomeMeta: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spotoutcomeMetareference (response includesoutcomes[]andquestions[]): https://www.quicknode.com/docs/hyperliquid/info-endpoints/outcomeMeta