getOnchainContractMarkets
Read the contract’s getSymbols view — the authoritative on-chain market list, without solver-added metadata like precision or tick bounds.
import { getOnchainContractMarkets } from "@symmio/trading-core";
const markets = await getOnchainContractMarkets(config, {
start: 0n,
size: 100n,
});Use this when you need on-chain truth (e.g. verifying the solver’s catalog is in sync). For UI catalogs, prefer the solver’s getMarkets — it adds precision / tick metadata the contract doesn’t carry.
Parameters
startbigint | numberrequiredStart offset passed to SYMMIO core getSymbols.
sizebigint | numberrequiredPage size passed to SYMMIO core getSymbols.
chainIdnumberoptionalOptional chain override.
Returns
readonly OnchainContractMarket[]symbolIdbigintSYMMIO symbol id.
namestringContract-level market name, such as BTCUSDT.
isValidbooleanWhether the market is currently valid for trading.
minAcceptableQuoteValuebigintMinimum acceptable quote value in raw 18-decimal units.
minAcceptablePortionLFbigintMinimum acceptable liquidation-fee portion in raw 18-decimal units.
tradingFeebigintTrading fee rate in raw 18-decimal fixed point units.
maxLeveragebigintMaximum leverage in raw 18-decimal fixed point units.
fundingRateEpochDurationbigintFunding-rate epoch duration in seconds.
fundingRateWindowTimebigintFunding-rate window time in seconds.
Query options
import { getOnchainContractMarketsQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getOnchainContractMarketsQueryOptions(config, { start: 0n, size: 100n }));