DevelopersDraft
Swap API
One HTTP call returns the best route and ready-to-sign calldata. No SDK needed.
What it is
One HTTP call returns the best route for a swap on Robinhood Chain and ready-to-sign calldata. No SDK is needed: any language that can make an HTTP request can integrate.
Draft request
GET <host>/v1/swap
?chainId=4663
&tokenIn=<address>
&tokenOut=<address>
&amountIn=<integer, token base units>
&slippageBps=<integer>
&recipient=<address>
&integrator=<partner fee address, optional>
&integratorFeeBps=<integer, max 50, optional>| Parameter | Meaning |
|---|---|
chainId | Robinhood Chain, 4663 |
tokenIn / tokenOut | Token addresses |
amountIn | Amount to sell, in base units |
slippageBps | Requested slippage; capped by Hard limits |
recipient | Address that receives the output |
integrator | Your address for the integrator fee |
integratorFeeBps | Integrator fee in basis points, up to 50 (0.5%) |
Draft response
{
"chainId": 4663,
"block": "<block number the quote was built at>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"priceImpactBps": "<integer>",
"route": [
{ "venue": "<uniswap-v3 | uniswap-v4 | aggregator-hook>", "pool": "<address>", "shareBps": "<integer>" }
],
"simulation": { "ok": true },
"integratorFee": { "recipient": "<address>", "bps": "<integer>" },
"tx": { "to": "<address>", "data": "<0x…>", "value": "<string>" }
}Values in angle brackets are placeholders, not real data.
What the engine does before answering
The same checks as the app: pinned contracts before quoting, and route simulation against the live chain before calldata is returned.