getListingConfig
Fetch the listing service’s public client configuration — the initial-deposit guidance, listing fee, supported deposit chains, per-day rate limits, and protocol reward share a create-pool flow needs. It is the public twin of getListingMarkets: no auth, resolved from the config, safe to read before sign-in.
Read this before building a create-pool UI. A create-pool form must show the user the recommended and minimum
initial deposits (this is what they seed the pool with) and must offer only the deposit chains
supportedDepositChains returns — do not hardcode a chain list. The addMarket write is
the end of this flow, and it is additionally capped by getWeeklyListingLimit; wire both
in before you let a user submit.
import { getListingConfig, LISTING_VALUE_DECIMALS } from "@symmio/trading-core";
import { formatUnits } from "@symmio/utils/decimal";
const cfg = await getListingConfig(config);
const recommended = formatUnits(cfg.recommendedInitialDepositUsdc, LISTING_VALUE_DECIMALS); // USD
const chains = cfg.supportedDepositChains; // the source of truth for a deposit-chain pickerThis is a REST read against the listing backend, not a contract call, and it is public — no accessToken. The
backend is resolved from the config before the request, so a target without Pools fails immediately and without any
network traffic — see resolveListingService. Pools is Enigma-only today.
Parameters
Both fields are optional — with neither, the config’s default chain and that chain’s default solver resolve the listing backend.
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId. Selects which chain’s listing backend is used, and is
folded into the query key.
Returns
Promise<ListingConfig>recommendedInitialDepositUsdcbigintRecommended initial deposit to seed a new pool, in USD as a bigint at LISTING_VALUE_DECIMALS (18). This is the
headline figure a create-pool form should surface.
minimumInitialDepositUsdcbigintMinimum accepted initial deposit (after slippage), USD as a bigint at LISTING_VALUE_DECIMALS (18).
listingFeeUsdcbigintThe listing fee, USD as a bigint at LISTING_VALUE_DECIMALS (18).
supportedDepositChainsListingDepositChain[]The deposit chains new listings may use — the source of truth for a create-pool chain picker. Each entry is a
{ chainId: ListingDepositChainId; chainName: string }. Render chainName (chainId) and use chainId as the
depositChain you pass to addMarket.
rateLimitsListingRateLimitsThe rolling-24h client mutation limits: { marketConfigUpdatesPerDay: number; profitClaimsPerDay: number } — max
successful market-config updates and profit claims per user+market per day.
protocolRewardSharePercentnumberWhole-percent of market revenue routed to the protocol before buyback/LP (e.g. 10 means 10%).
The three *Usdc figures are 18-decimal bigints (USD), independent of the collateral token’s own decimals — descale
with formatUnits(value, LISTING_VALUE_DECIMALS) before formatting as USD. protocolRewardSharePercent and the two
rateLimits counters are plain numbers: render them directly, no descaling.
Query options
import { getListingConfigQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getListingConfigQueryOptions(config));GetListingConfigOptions is the action’s parameters plus a query bag of TanStack overrides. The factory folds config.getChainConfigKey(chainId) into the key; getListingConfigQueryKey builds the same key for cache matching and invalidation. GetListingConfigData is what the query resolves to (the same ListingConfig), GetListingConfigReturnType is the action’s return alias, and GetListingConfigQueryOptions is the options bag it produces. toListingConfig maps the raw service response into the normalized ListingConfig for callers driving the request themselves.
Throws
LISTING_NOT_CONFIGURED— aSymmError(kind: "config") when the chain has nolistingbackend configured. Gate withsupportsListingServiceto hide Pools instead of erroring. Only chains with a listing backend have Pools.FETCH_LISTING_CONFIG_FAILED— the request itself failed. Any axios failure becomes aSymmApiErrorcarryingstatus,statusText,responseData,urlandmethod; a non-axios throw becomes a plainSymmError(kind: "api") with the original error as itscause.
Related
addMarket— the create-pool write this config feeds: the recommended deposit and the deposit-chain picker come from here.getWeeklyListingLimit— the protocol-wide cap (public) that also gatesaddMarket; block creation whenremainingis0.getListingMarkets— the public catalog, and the definition of the 18-decimal value contract these USDC figures share.useListingConfig— the React hook.- Pools — the slice overview.