Orkid Swap API
REST API for routing, quoting, and token discovery. Optimized for programmatic access by AI agents and integrations.
Endpoints
{
`BASE URL: https://orkidlabs.xyz/api/v1
ENDPOINTS:
POST /v1/route — Find the best route for a token swap
POST /v1/quote — Get a quote for a specific swap
GET /v1/tokens — List all supported tokens
RATE LIMITS:
HTTP: 50 requests/second
WebSocket: 2 concurrent connections
AUTHENTICATION:
Currently no API key required for public endpoints.
Future: Bearer token in Authorization header.
SUPPORTED CHAINS:
Base (chainId: 8453)
Ethereum (chainId: 1)`
} POST /v1/route
Find the best route for a swap. Returns the optimal path across all 11 liquidity venues on Base.
{
`REQUEST:
POST /api/v1/route
Content-Type: application/json
{
"chainId": 8453,
"tokenIn": "0x833589fCD6e6D0896C1dE0c1d4a3BCc6c5c8e3D2",
"tokenOut": "0x4200000000000000000000000000000000000006",
"amountIn": "1000000000",
"recipient": "0x...",
"slippageTolerance": "auto"
}
RESPONSE (200):
{
"route": {
"hops": [
{
"pool": "0x...",
"venue": "tycho",
"tokenIn": "0x8335...",
"tokenOut": "0x4200...",
"amountIn": "1000000000",
"amountOut": "399812345",
"feeBps": 9
}
],
"totalAmountOut": "399812345",
"priceImpact": "0.02%",
"estimatedGas": "120000",
"gasless": true
},
"intent": "0x...", // EIP-712 typed data to sign
"deadline": 1722816000
}`
} POST /v1/quote
Get a quote without requesting a route. Faster, but does not return a signable intent.
{
`REQUEST:
POST /api/v1/quote
Content-Type: application/json
{
"chainId": 8453,
"tokenIn": "0x833589fCD6e6D0896C1dE0c1d4a3BCc6c5c8e3D2",
"tokenOut": "0x4200000000000000000000000000000000000006",
"amountIn": "1000000000"
}
RESPONSE (200):
{
"amountOut": "399812345",
"priceImpact": "0.02%",
"feeBps": 9,
"venue": "tycho",
"expiresAt": 1722816000
}`
} GET /v1/tokens
List all supported tokens on a given chain.
{
`REQUEST:
GET /api/v1/tokens?chainId=8453
RESPONSE (200):
{
"tokens": [
{
"address": "0x833589fCD6e6D0896C1dE0c1d4a3BCc6c5c8e3D2",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"chainId": 8453,
"isConnector": true
},
...
]
}`
} FAQ
Is the Orkid API free?
The routing and quoting endpoints are free to query. The 9 bps fee is charged per executed swap, not per API call.
Do I need an API key?
Currently no API key is required for public endpoints. Rate limits apply: 50 requests/second for HTTP, 2 concurrent WebSocket connections.
What chains are supported?
Base (Chain ID 8453) and Ethereum mainnet (Chain ID 1). Pass chainId in the request body.
Can I use the API without the Orkid UI?
Yes. The solver API is designed for programmatic access. Build your own frontend or integrate Orkid routing into your application.