Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreMuon OracleOverview

Muon oracle

Muon is a decentralized oracle network. SYMMIO uses it to attest to prices, unrealized-PnL (uPnL) values, and account overviews that the contract will only accept when signed by a trusted quorum (removeMargin / deallocate, settlement, force-close, liquidation).

@symmio/trading-core exposes each documented Muon endpoint as its own typed read. Every method resolves the oracle gateway URLs and the SYMMIO diamond address (the symmio request param) from config, tries the configured gateways in order until one succeeds, and returns a normalized attestation — typed bigint / Address fields plus the shared signature envelope. The raw envelope fields common to every return are documented once on MuonAttestationBase.

Each method has its own page with the full signature, parameters, return shape, examples, and query options.

Prices

uPnL attestations

Contract signatures

Types

Query options

Each read ships a matching …QueryOptions factory and a …QueryKey builder for TanStack Query. See each method’s page for the exact call, and Query options for the shared pattern. Attestations are timestamped and short-lived — cache them with a low staleTime, and for a signature you intend to submit on-chain fetch a fresh one on demand rather than serving a cached one.

Errors

  • MUON_URLS_NOT_CONFIGURED — the chain has no Muon gateway URLs in its config. Surfaces as a SymmError with kind: "config".
  • MUON_REQUEST_UNSUCCESSFUL — a gateway responded but the attestation was unsuccessful (quorum failure, invalid request). Surfaces as a SymmError with kind: "api".
  • FETCH_MUON_REQUEST_FAILED — every configured gateway failed at the transport / HTTP layer. Surfaces as a SymmApiError (kind: "api") carrying the last transport error.
  • SYMMIO Contract — writes that consume Muon attestations (removeMargin, settle, force-close).
  • AccountLayerremoveMargin / deallocate, which need getDeallocateUpnlSig.
  • Errors — the full SymmError catalogue.
Last updated on