SDK Overview
Routing Engine SDK is a TypeScript/JavaScript client for Zert's routing API. Use it in front-end or back-end apps to discover chains/tokens/pairs, request quotes, run the swap signing flow, manage limit orders, and check transaction/system status.
The SDK talks only to Zert's backend at a fixed URL (DEFAULT_API_BASE_URL from the package; no runtime baseURL override). Pass api.apiKey so every request includes the x-api-key header. You can also set timeout, baseHeaders, and onError. It exposes a layer-based API (sdk.swap.build()) and flat methods (sdk.buildSwap()).
Documentation
SDK Overview & Configuration — Install, configure, and get started.
Get Supported Chains — Fetch supported chains.
Token Management — Fetch available tokens.
Get Trading Pairs — Fetch trading pairs.
Request a Quote — Request a quote for a swap.
Submit a Swap — Submit a swap.
Limit Orders — Create, get, cancel, and list limit orders.
Status — Get transaction status.
Health — Check service health.
Error Handling — Handle API and SDK errors.
Routing Engine SDK features include
Discovery endpoints - Fetch supported tokens, chains, and tradeable pairs.
Quote and swap flow -
POST /quote, then build/sign/submit via 3 swap endpoints.Limit orders - Create, get, cancel, replace, and list limit orders.
Status and health - Check transaction status and service health.
Optional configuration -
timeout,baseHeaders, and globalonError(fixed backend host; exports includeDEFAULT_API_BASE_URLandAPI_KEY_HEADER).Two API styles - Layer-based methods (
sdk.swap.build()) or flat methods (sdk.buildSwap()).Typed and promise-based — Full TypeScript types and consistent Promise-based async API.
Last updated

