Skip to Content
Symmio Frontier — the SDK surface for builders on HyperEVM
CoreSolversOverview

Solvers

The solver APIs are off-chain REST endpoints configured per chain in createConfig. @symmio/trading-core exposes them as framework-agnostic actions plus TanStack Query option factories.

Use these APIs when you need solver metadata before building a trade flow: market lists, leverage limits, and locked percentages for a market/leverage pair.

Protocol model — intent-based, no orderbook

SYMMIO is intent-based. The current lowcap version has no orderbook. Positions are opened peer-to-peer between two roles:

  • partyA — the user. Sends an intent to open a position.
  • partyB — a solver. Watches partyA intents and takes the opposite side, becoming the direct counterparty.

Every lowcap position is one partyA ↔ one partyB agreement. There is no shared book, no matching engine, no other users on the other side. The solver is the counterparty.

Implications when building on the SDK:

  • No bid/ask depth to render. Prices come from off-chain feeds (see Price Service), not an on-chain book.
  • Trade lifecycle is intent → solver acceptance → on-chain settlement. Surface intent state, not order-fill progress.
  • partyA / partyB in ABIs, events, and notifications always mean user / solver respectively.

Markets

getMarkets

Fetch tradable markets from the chain solver’s /contract-symbols endpoint.

import { getMarkets } from "@symmio/trading-core"; const markets = await getMarkets(config); const btc = markets.find((market) => market.name === "BTCUSDT");

Parameters

NameTypeDefaultNotes
chainIdnumber?config defaultOptional chain override.

ReturnsSymbolContractSymbol[].

Important market fields:

FieldTypeNotes
symbol_idnumber?Contract symbol id.
namestring?Solver market name, often the value to pass as symbol.
symbolstring?Display symbol.
statenumber?0 disabled, 1 close only, 2 open only, 3 enabled.
max_leveragestring?Maximum leverage accepted for this market.

getMarketsQueryOptions

Build TanStack Query options for getMarkets.

import { getMarketsQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; const query = useQuery(getMarketsQueryOptions(config, { query: { staleTime: 30_000 } }));

Locked Params

getLockedParams

Fetch locked params from the chain solver’s /get_locked_params/{symbol} endpoint.

The symbol parameter is the solver path value. In trade UIs, use the selected market’s name when available, with symbol as a fallback.

import { getLockedParams } from "@symmio/trading-core"; const locked = await getLockedParams(config, { symbol: "BTCUSDT", leverage: 5, }); console.log(locked.cva, locked.lf, locked.partyAmm, locked.partyBmm);

Parameters

NameTypeDefaultNotes
symbolstringrequiredSolver market path value.
leveragenumberrequiredLeverage used to calculate locked params.
chainIdnumber?config defaultOptional chain override.

ReturnsSolverLockedParams.

interface SolverLockedParams { cva?: string; lf?: string; partyAmm?: string; partyBmm?: string; leverage?: string; }

getLockedParamsQueryOptions

Build TanStack Query options for getLockedParams.

import { getLockedParamsQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; const options = getLockedParamsQueryOptions(config, { symbol: "BTCUSDT", leverage: 5, query: { staleTime: 10_000 }, }); const query = useQuery(options);

GetLockedParamsOptions requires symbol and leverage. The query factory does not make required action inputs optional and does not validate missing inputs inside queryFn.

For form UIs where values may be incomplete, gate the query outside the factory:

const ready = Boolean(symbol) && leverage > 0; const options = getLockedParamsQueryOptions(config, { symbol: symbol ?? "", leverage: leverage ?? 0, query: { enabled: ready }, });

getLockedParamsQueryKey

Build a cache key for a locked-params query.

import { getLockedParamsQueryKey } from "@symmio/trading-core"; const key = getLockedParamsQueryKey({ symbol: "BTCUSDT", leverage: 5, });

symbol and leverage are part of the key, so each market/leverage pair caches independently.

Notional Cap (available liquidity)

Per-market caps on how much notional the solver still permits — the frontline “can I open this size?” gate.

getNotionalCapBySymbolId

Cap for one market.

import { getNotionalCapBySymbolId } from "@symmio/trading-core"; const cap = await getNotionalCapBySymbolId(config, { symbolId: 1n }); // { used: bigint, cap: bigint, availability: bigint }

getNotionalCapAll

Batch — every market’s cap in one call. Cheaper than looping getNotionalCapBySymbolId.

import { getNotionalCapAll } from "@symmio/trading-core"; const caps = await getNotionalCapAll(config, {});

getOpenInterestBySymbolId

Used vs capped notional per market.

import { getOpenInterestBySymbolId } from "@symmio/trading-core"; const oi = await getOpenInterestBySymbolId(config, { symbolId: 1n });

Instant Open / Instant Close

The lowcap trading flows live on their own pages:

  • Instant OpeninstantOpen, instantOpenAuto, prepareInstantOpenParams, getInstantOpens, getInstantOpenQuoteId.
  • Instant CloseinstantClose, instantCloseAuto, instantCloseBulk, prepareInstantCloseParams, getInstantCloses.
  • SYMMIO Contract — on-chain reads. getOnchainContractMarkets is the contract-side analog to getMarkets.
  • Unified QuotesPendingInstantOpen / PendingInstantClose from getInstantOpens / getInstantCloses feed reconcileQuotes.
  • Errors — solver failures surface as SymmApiError.
Last updated on