Working with prices
How the client resolves a live USD price and 24h change for any supported symbol.
Resolution order
- Query the on-chain token index for the symbol.
- Filter to same-symbol candidates and pick the highest-liquidity one.
- Read
usdPriceandstats24h.priceChange. - If unavailable, fall back to the best Robinhood Chain pair on DexScreener.
- 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 neededPick 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.