> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ambichain.org/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> The indexer's HTTP API: the live book, any order's full history, activity, stats and routes.

![Everything on the Offers page comes from this API](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/offers-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=4dcd2c94768cbb5bdec3f7481d0e5796)

The indexer reads every Ambi event on Ethereum and on each destination chain and serves them over HTTP. The app is built entirely on it.

## Base URL

The API is served with the app at `https://ambichain.org/api`. Every response is JSON with `cache-control: no-store`.

## Endpoints

| Method | Path | Returns |
| - | - | - |
| `GET` | `/deployment` | Mode, market, registry, owner, fee recipient, `minWindow`, `feeBps`, chains, routes and tokens |
| `GET` | `/offers` | Every order, filterable and sortable |
| `GET` | `/offers/{id}` | One order with its full lifecycle |
| `GET` | `/activity` | Raw events, optionally for one address |
| `GET` | `/stats` | Fill count, volume and fees, in total and by day, per token |
| `GET` | `/chains` | Approved routes with their verifier state |
| `GET` | `/tokens` | The token catalog the app shows by default |
| `GET` | `/events` | Server-sent events: `ready`, then `update` with new events |
| `POST` | `/chains/applications` | Submit a chain application |

## The order object

`GET /offers` and `GET /offers/{id}` return orders shaped like this:

```json theme={null}
{
  "id": "24",
  "maker": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
  "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
  "amount": "50000000000000000000000",
  "bond": "10000000000000000",
  "route": "base",
  "chain": 8453,
  "state": "listed",
  "interests": ["0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"],
  "filler": null,
  "statement": null,
  "destinationOutcome": null,
  "cancelProposedBy": null,
  "request": { "chain": "eip155:8453", "asset": "erc20:0xbaa5…0842", "recipient": "0xf39f…2266", "routeData": "0x…", "amount": "854570000000000000000", "verifier": "0x…", "payBy": "1796003240", "proveBy": "0" },
  "lifecycle": [{ "type": "Listed", "chain": "ethereum", "block": 21948190, "hash": "0x…", "timestamp": 1795999880, "args": {} }]
}
```

`state` is `listed`, `matched`, `filled`, `refunded` or `canceled`. Once the destination decides, `destinationOutcome` holds `{ outcome: "Paid" | "ExpiredUnpaid", hash, timestamp }`.

## Filters on /offers

| Parameter | Matches |
| - | - |
| `chain` | Route name (`base`) or chain ID (`8453`) |
| `asset` | Escrow token address, request asset string, or catalog symbol |
| `state` | Order state |
| `maker` | Maker address |
| `q` | Substring of token, maker, route or ID |
| `sort` | `deadline`, `amount` (within one token), `oldest`; newest first by default |

## Errors

Errors return `{ "error": "message" }` with a 4xx status. POST bodies must be JSON under 8 KB, from a local origin.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.