Retry listing
Re-attempt a rejected market’s listing instead of refunding it — read the retry allowance with getRetryListingInfo, then re-submit with retryListing. Retries are capped per market and rate-limited by a cooldown.
Both endpoints are REST calls against the listing backend, not contract calls, and both are authed: the
accessToken from authenticateListing is sent as an Authorization: Bearer <token>
header. The backend is resolved from the config before the request, so a target without Pools fails immediately — see
resolveListingService. Pool listing is chain-level, so both take only an
optional chainId and no solverId.
getRetryListingInfo
Read the signed-in user’s retry allowance for one rejected market: how many retries remain and the cooldown before the next.
import { getRetryListingInfo } from "@symmio/trading-core";
const info = await getRetryListingInfo(config, {
accessToken: token.accessToken,
tokenContractAddress: rejectedMarket.contractAddress,
depositChain: rejectedMarket.chainId,
});Read this before offering retryListing: gate the retry on remainingRetries > 0 and on remainingCooldownSeconds being null or 0.
Parameters
accessTokenstringrequiredBearer token from authenticateListing. A bad or expired token yields a 401.
tokenContractAddressstringrequiredThe rejected market’s token contract address.
depositChainListingDepositChainIdrequiredThe chain the token/deposit lives on — the market’s chainId.
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId. No solverId — listing is resolved at chain level.
Returns
Promise<RetryListingInfo>retryLimit (max retries per market), remainingRetries (retries left), and remainingCooldownSeconds (seconds
until the next retry, or null when no cooldown is in effect).
Throws
LISTING_NOT_CONFIGURED— aSymmError(kind: "config") when the chain has nolistingbackend. Gate withsupportsListingService.FETCH_RETRY_LISTING_INFO_FAILED— the request failed. Axios failures become aSymmApiError; a401means the token was missing/expired.
retryListing
Re-submit a rejected market’s listing. On success the market re-enters the listing pipeline (its marketStatus moves off REJECTED) and the response reports the retry allowance left.
import { retryListing } from "@symmio/trading-core";
const left = await retryListing(config, {
accessToken: token.accessToken,
tokenContractAddress: rejectedMarket.contractAddress,
depositChain: rejectedMarket.chainId,
});Only offer this when getRetryListingInfo reports remainingRetries > 0 and the cooldown has elapsed.
Parameters
Same shape as getRetryListingInfo — accessToken, tokenContractAddress, depositChain, and an optional chainId.
Returns
Promise<RetryListingResult>retryLimit, remainingRetries (left after this retry), and cooldownSeconds (before the next retry is allowed).
Mutation options
import { retryListingMutationOptions } from "@symmio/trading-core";
import { useMutation } from "@tanstack/react-query";
const { mutateAsync } = useMutation(retryListingMutationOptions(config));
await mutateAsync({ accessToken, tokenContractAddress, depositChain });Throws
LISTING_NOT_CONFIGURED— as above.RETRY_LISTING_FAILED— the request failed. A401means a bad/expired token; the service also rejects a retry when no retries remain or the cooldown has not elapsed, surfaced with its message and status as-is.
Related
refundMarket— the alternative to retrying: refund the deposit instead.getUserListingMarkets— surfaces the user’s markets and theirmarketStatus, includingREJECTED.useRetryListingInfo/useRetryListing— the React hooks.- Pools — the slice overview.