quote

$0.01 per call

The fill for a buy or sell of an xStock against the live Uniswap v3 pool on X Layer mainnet, compared with the OKX spot book.

Data on mainnet, payment on testnet.

Prices come from X Layer mainnet (eip155:196); the $0.01 is paid in testnet USD₮0 (eip155:1952). Not investment advice.

Parameters#

NameTypeDescription
symbolstring, requiredNVDA, SPY or TSLA (NVDAx and wNVDAx forms accepted)
sidebuy or sell, requiredbuy pays stablecoin for the xStock; sell is the reverse
sizedecimal, requiredTrade size, in the unit given by sizeUnit
sizeUnitusd or shares, default usdusd is stablecoin notional; shares are xStock tokens, one per underlying share

Request#

The first call answers 402 with the price; pay it and repeat the same request. See How x402 payments work.

curl -i "https://api.roundlot.0xo.in/v1/quote?symbol=NVDA&side=buy&size=250"

Response#

Buying $250 of NVDA, read on 25 Sep 2026 at 03:42 UTC:

JSON
{
  "symbol": "NVDA", "side": "buy",
  "size": { "amount": "250", "unit": "usd" },
  "fill": {
    "venue": "Uniswap v3", "pool": "0x2a2B11730C2b6d99a58034A869dd810D7300a7b2", "feeBps": 5,
    "pay": { "token": "USDG", "amount": "250" },
    "receive": { "token": "wNVDAx", "amount": "1.111385027823429801", "shares": 1.11327571 },
    "avgPricePerShare": 224.5625,
    "poolMidPerShare": 224.4462,
    "priceImpactBps": 5.2,
    "gasEstimate": "122488"
  },
  "reference": {
    "venue": "OKX spot", "instId": "XNVDA-USDT", "available": true,
    "bid": 224.69, "ask": 224.74, "mid": 224.715, "spreadBps": 2.2,
    "onchainEdgeBps": 7.9
  },
  "units": { "sharesPerWrappedToken": 1.001701196801074 },
  "data": { "network": "eip155:196", "blockNumber": "71538728" }
}
  • receive.shares is the wrapped amount converted to shares; see xStocks explained.
  • onchainEdgeBps is positive when the on-chain fill beats crossing the OKX book; see How prices are made.
Refused calls are never charged.

Payment settles only after the tool returns a result.

Errors#

CodeHTTPWhen
invalid_input400A parameter is missing or malformed; no payment is asked for
unknown_symbol400The symbol isn't NVDA, SPY or TSLA
insufficient_liquidity422The pool can't fill this size
token_paused422The issuer has paused transfers
rate_limited429More than 60 requests a minute from your IP
payments_unavailable503The facilitator isn't reachable; the free catalog still works
upstream_error502X Layer RPC or OKX market data failed; try again

None of these are charged.

Last updated 25 Sep 2026

Roundlot

Pay-per-call market data and trade plans for tokenized equities on X Layer. Built for OKX Dev Day 2026.

Payments settle on X Layer testnet. Data and trade plans are X Layer mainnet. Not investment advice.