MonexStock
Buy tokenized stocks on Robinhood Chain gasless over x402: pay USDG with a signature, Monex Protocol pays gas, swaps the verified pool, and delivers to your wallet.
MonexStock is an agentic stock market on Robinhood Chain. Agents (and humans, at
stock.monexprotocol.org) buy official Robinhood
tokenized stocks without ever holding gas: you pay USDG through an x402
exact payment (a Permit2 signature — no transaction from your side),
Monex Protocol settles it, swaps through the on-chain-verified Uniswap v3 pool,
and the router delivers the stock straight to your address, all in one request.
If anything fails after your payment settles, you are refunded automatically.
https://www.monexprotocol.org/api/stockEndpoints
| Endpoint | Price | Purpose |
|---|---|---|
GET /api/stock/list | free | Catalog: 14 verified tokenized stocks with live prices, fees, limits |
GET /api/stock/quote?symbol=NVDA&usdg=25 | free | On-chain estimate + the exact total the buy will charge |
POST /api/stock/buy?symbol=NVDA&usdg=25 | x402 (dynamic) | The gasless buy; optional &recipient=0x… delivers elsewhere |
GET /api/stock/order/{id} | free | Order status, settlement / swap / refund tx hashes |
GET /api/stock/orders?payer=0x…&limit=20 | free | Transaction history, newest first (omit payer for the global feed) |
Orders are 1–1000 USDG. Fees are currently zero — the challenge demands
exactly the usdg you request. usdg is the amount you spend; the shares you
receive float with the pool price, floored by a per-token slippage bound
(re-quoted on-chain immediately before execution).
Buy flow for agents
- Discover —
GET /api/stock/list, pick a symbol. - Quote (optional) —
GET /api/stock/quote?symbol=NVDA&usdg=5. - Challenge —
POST /api/stock/buy?symbol=NVDA&usdg=5with no payment header returns402with the terms in the body and thepayment-requiredheader.accepts[0]carriesasset(USDG),amount(atomic, 6 decimals),payTo, andextra.spender(the canonicalx402ExactPermit2Proxy). - Sign — a Permit2
PermitWitnessTransferFromEIP-712 signature (domain{name: "Permit2", chainId: 4663}), withpermitted = {token: asset, amount},spender = extra.spender, a random 256-bitnonce, adeadlinewithin 300s, andwitness = {to: payTo, validAfter: 0}. No gas is spent. - Pay — retry the same POST with the
payment-signatureheader: base64 of{"x402Version": 2, "payload": {"permit2Authorization": {…, "from": "0xYOU"}, "signature": "0x…"}}. - Receive — the 200 body reports the order id, the settlement tx, the swap tx, and the exact amount delivered to your address.
The response also carries the standard payment-response header. A 502
after settlement means delivery failed — the body then includes the refund tx.
One-time setup: Permit2 approval
Your wallet needs a one-time USDG approval to Permit2
(0x000000000022D473030F116dDEE9F6B43aC78BA3). If it holds USDG but no ETH
for that single approve, request sponsored gas:
curl -X POST https://www.monexprotocol.org/api/gas/sponsor \
-H 'content-type: application/json' \
-d '{"address": "0xYOUR_WALLET"}'Then send approve(0x000000000022D473030F116dDEE9F6B43aC78BA3, max) on the
USDG contract. Every payment after that is pure signatures.
Guarantees
- Verified assets only. Each listed token is the official "• Robinhood Token" contract, and swaps route only through the factory-derived USDG pool pinned in config — the pool's token pair and fee are re-verified on-chain before any funds move, so counterfeit tokens and spoofed pools can never be selected.
- Slippage-floored. The swap re-quotes via QuoterV2 at execution and reverts (→ refund) below the per-token floor.
- Refund on failure. USDG settles to the relayer before the swap; any
failure after settlement triggers an automatic USDG refund to the payer,
and every order is queryable at
/api/stock/order/{id}.
Selling back to USDG is coming next.