API Overview
The Kroko DEX provides a REST API for swap routing, price quotes, pool data, and token information. The API handles complex routing logic off-chain and returns ready-to-use transaction calldata.Base URL
- Mainnet
- Testnet
Authentication
No authentication is required. The API is currently publicly accessible.Authentication may be introduced in the future. If you are building a long-lived integration, check back here periodically for updates.
Common Patterns
Request Format
GETendpoints use query parametersPOSTendpoints accept JSON body withContent-Type: application/json
Response Format
Successful responses return JSON directly. Error responses follow this format:Token Amounts
All token amounts are in raw units (wei). For a token with 18 decimals:
Convert with:
rawAmount = humanAmount × 10^decimals