# 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](/routing-engine-sdk/installation-and-configuration.md) — Install, configure, and get started.
* [Get Supported Chains](/routing-engine-sdk/get-supported-chains.md) — Fetch supported chains.
* [Token Management](/routing-engine-sdk/get-available-tokens.md) — Fetch available tokens.
* [Get Trading Pairs](/routing-engine-sdk/get-trading-pairs.md) — Fetch trading pairs.
* [Request a Quote](/routing-engine-sdk/request-a-quote.md) — Request a quote for a swap.
* [Submit a Swap](/routing-engine-sdk/submit-a-swap.md) — Submit a swap.
* [Limit Orders](/routing-engine-sdk/limit-orders.md) — Create, get, cancel, and list limit orders.
* [Status](/routing-engine-sdk/sdk-overview.md) — Get transaction status.
* [Health](/routing-engine-sdk/check-service-health.md) — Check service health.
* [Error Handling](/routing-engine-sdk/error-handling-for-apis.md) — 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 global `onError` (fixed backend host; exports include `DEFAULT_API_BASE_URL` and `API_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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zert.com/routing-engine-sdk/sdk-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
