Contractsoon
Developers

Working with prices

How the client resolves a live USD price and 24h change for any supported symbol.

Resolution order

  1. Query the on-chain token index for the symbol.
  2. Filter to same-symbol candidates and pick the highest-liquidity one.
  3. Read usdPrice and stats24h.priceChange.
  4. If unavailable, fall back to the best Robinhood Chain pair on DexScreener.
  5. Cache the result; serve a simulated value only until the first real number arrives.

ETH settlement

// ETH is a USD stablecoin — pack amounts map 1:1
// coin prices: on-chain index  ·  fallback: DexScreener  ·  cached ~60s
usdgAmount = usdTotal; // 1 ETH = $1, no FX conversion needed
Pick by liquidity, not by nameMany memecoins share a ticker. Always choose the deepest-liquidity match for a symbol, or you'll price a copycat token.