API v2 overview
API v2 is the order API that came before v3: GET /v2/quote, POST /v2/build, and order tracking under /v2/orders. Its orders settle through the same contracts as v3’s, and v3 reads them too.
Deprecated, still supported
Section titled “Deprecated, still supported”v2 is maintained but gets no new features. Existing integrations keep working: every endpoint on these pages is live, alongside v3 on the same host, with the same API key. New integrations should use the Khalani API (v3), starting with its Quickstart.
Migrate to v3 maps every v2 endpoint and field to v3.
What v2 does that v3 does not
Section titled “What v2 does that v3 does not”- Public order reads.
GET /v2/orders/{orderId}needs no key, so a browser can poll it directly. Every v3 route needs your key. - A health route.
GET /v2/healthreports the order pipeline. v3 has none. UseGET /v3/catalogas your readiness check.
Everything else v2 does, v3 does too, on the same chains and tokens.
The v2 pages
Section titled “The v2 pages”- Quickstart and API access
- Guides: Conventions, Order lifecycle, Quotes and pricing, Build and deposit, Track orders, Cancel and refunds, Fees and commission, Errors and retries, Rate limits and reliability, Supported chains and tokens
- API reference, generated from
/openapi/v2.json
For Solana-source builds, use the returned depositToken.token mint and
expectedAmount to fund the deposit wallet’s associated token account. Select
assets from /v2/params; sending a different mint does not fund the order. See
Build and deposit for exact funding rules.