STONKTRADERDEVELOPER

Stock Token trading

Discover, price, quote, sign, and submit Stock Token swaps through StonkTrader.

The trading API exposes a wallet-validated RFQ flow on Robinhood Chain. Platform login is not required for these routes; executable operations bind the request to the supplied wallet address and validate the signed quote before submission.

List tradable assets

curl https://api.stonktrader.finance/trading/stocks

Each item includes:

  • Stock Token and wrapped-token contract addresses
  • token decimals and current multiplier
  • normalized bid, ask, and mid prices
  • tradable, trading-halt, and market timestamps

Only continue to execution when tradable is true.

Get an executable price

This example prices a purchase using 1 USDG. USDG has 6 decimals, so the base-unit amount is 1000000.

curl "https://api.stonktrader.finance/trading/swap/price?amount=1000000&side=BUY&symbol=NVDA"
{
  "code": 0,
  "message": "ok",
  "data": {
    "generatedAt": "2026-08-31T15:25:44.152Z",
    "quoteAsset": "USDG",
    "quotes": [
      {
        "buyAmount": "4542150035613386",
        "sellAmount": "1000000",
        "venue": "arcus"
      }
    ],
    "recommended": "arcus",
    "side": "BUY"
  }
}

For BUY, amount is the USDG input in 6-decimal base units. For SELL, it is the Stock Token input in 18-decimal base units.

Execute a swap

The execution sequence is:

  1. Call POST /trading/swap/check-approval.
  2. If data.approval is not null, ask the wallet to broadcast that approval.
  3. Call POST /trading/swap/quote with the wallet, amount, side, symbol, and slippage.
  4. Ask the wallet to sign the returned data.quote.typedData payload.
  5. Call POST /trading/swap/submit with the original quote and signature.

Check approval

curl https://api.stonktrader.finance/trading/swap/check-approval \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{
    "amount": "1000000",
    "quoteAsset": "USDG",
    "side": "BUY",
    "swapper": "0x1111111111111111111111111111111111111111",
    "symbol": "NVDA"
  }'

Request a quote

curl https://api.stonktrader.finance/trading/swap/quote \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{
    "amount": "1000000",
    "quoteAsset": "USDG",
    "side": "BUY",
    "slippageTolerance": 0.5,
    "swapper": "0x1111111111111111111111111111111111111111",
    "symbol": "NVDA"
  }'

Quotes are short-lived. Do not alter the typed data, token addresses, amounts, chain ID, or wallet before signing and submitting it.

Safety rules

  • Treat every amount as an integer base-unit string.
  • Verify the returned chain ID and token addresses before requesting a signature.
  • Never reuse an expired quote or a signature from another wallet.
  • Keep private keys in the user's wallet; the API accepts signatures, not keys.

On this page