Every pool on Arc.One API call.
The same engine that runs this site, open to any wallet, bot or app: best-price quotes split across every indexed pool, and swaps handed back as calldata ready for your user to sign. Name your address as referrer and the router pays you 0.1% of every swap you send, in the same transaction.
1 · Get a key
Free and instant. The key raises your rate limit, and the referrer you set here is used on every swap built with it.
2 · Endpoints
Base URL https://c00k.exchange/api/v1. Every request is a GET with query parameters, except creating a key. Amounts are either amount in whole tokens or amountIn in base units. Send your key as the x-api-key header.
GET/tokens?curated=1&q=usdc
Every token the index can route, with symbol, decimals and address. q filters by symbol or address.
curl "https://c00k.exchange/api/v1/tokens?curated=1&q=usdc"GET/quote?tokenIn=&tokenOut=&amount=
The best split across every pool at the latest block. The answer has the fee already taken off the input, the route, the price impact and the block it was read at.
curl -H "x-api-key: YOUR_KEY" \
"https://c00k.exchange/api/v1/quote?tokenIn=0x3600000000000000000000000000000000000000&tokenOut=0x30e61a775f6Ad3275Afb654dc55e9356b333446f&amount=25"GET/swap?tokenIn=&tokenOut=&amount=&recipient=&slippageBps=&referrer=
A transaction ready to sign: to, data and value, simulated on Arc from the recipient before it is returned. referrer is optional when your key already has one.
const r = await fetch('https://c00k.exchange/api/v1/swap?' + new URLSearchParams({
tokenIn: USDC, tokenOut: TOKEN, amount: '25',
recipient: user, slippageBps: '50', referrer: YOUR_ADDRESS,
}), { headers: { 'x-api-key': KEY } }).then((r) => r.json())
// the user approves r.transaction.to for amountIn of tokenIn, then:
await wallet.sendTransaction(r.transaction)GET/stats?referrer=0x...
What a referrer address has been paid: swaps and amounts per token, counted from the router's own Referral events.
curl "https://c00k.exchange/api/v1/stats?referrer=YOUR_ADDRESS"POST/keys
Creates a key. Body: name, and optionally referrer.
curl -X POST https://c00k.exchange/api/v1/keys -H "content-type: application/json" \
-d '{"name":"my-wallet","referrer":"0xYourAddress"}'