# Get started

> An API key (optional), your first request, and the three calls that take you from nothing to a signed swap on Arc.

Source: https://getchord.xyz/docs/get-started/

Chord's API is REST over HTTPS, JSON in and out. The base URL is `https://api.getchord.xyz` and every path starts with `/v1`. Nothing below needs an account.

## 1. Make a request

The chain overview is the cheapest useful call: the last 24 hours on Arc, venue share, hourly buckets and daily rows, with the coverage flags every read carries.

```bash
curl https://api.getchord.xyz/v1/arc/overview
```

```json
{
  "chain": 5042,
  "last24h": { "volUsd": 70377594.23, "swaps": 788926, "tokens": 6288, "sinceHour": 1789808400 },
  "venues24h": [ { "dex": "uniswap_v4", "volUsd": 55014882.20, "trades": 683313, "tokens": 4059, "sharePct": 78.17 } ],
  "hourly24": [ { "hour": 1789808400, "volUsd": 3234644.52, "swaps": 50225 } ],
  "daily": [ { "day": 1787356800, "swaps": 5712, "volUsd": 609934.64, "tokens": 292, "wallets": 768, "venues": 4 } ],
  "coverage": { "recentAt": 1789891429, "stale": false, "backfillComplete": true },
  "updatedAt": 1789891764243
}
```

Read `coverage` before you trust a quiet number. `stale: true` means the most recent rolled-up hour is older than the lane's freshness bar; `backfillComplete: false` means long windows undercount. See [Data freshness](/docs/concepts/data-freshness/).

## 2. Get a key (optional)

Anonymous reads answer at 60 requests a minute per IP. A key raises that to your plan and meters usage per key; it is required for the [Ask agent API](/docs/agents/ask-api/) and for the `only=` debug lever on quotes.

1. Open [getchord.xyz/developer](https://getchord.xyz/developer) and sign in with Google.
2. Create a key. It is shown once; store it.
3. Send it as a header on every request.

```bash
curl -H "X-API-Key: YOUR_KEY" https://api.getchord.xyz/v1/me
```

```json
{ "email": "you@example.com", "tier": "free", "limits": { "rpm": 60, "monthly": 100000, "priceUsd": 0, "label": "Free" }, "usage": { "today": 41, "month": 1209 } }
```

Plans are on [getchord.xyz/pricing](https://getchord.xyz/pricing): Free (60 a minute, 300 calls in any 30 days), Build (100 a minute, 16,000 calls) and Grow (150 a minute, 144,000 calls). A plan covers all keys on an account together. See [Rate limits](/docs/concepts/rate-limits/).

## 3. Swap in three calls

This buys cirBTC with 5 USDC on Arc. Amounts are strings in the token's smallest unit: the USDC predeploy has 6 decimals, so 5 USDC is `5000000`.

### Quote

```bash
curl "https://api.getchord.xyz/v1/quote?chain=5042\
&inputMint=0x3600000000000000000000000000000000000000\
&outputMint=0x171a4217b86a807a64eb94757db6849fb4bdbaa0\
&amount=5000000&slippageBps=100"
```

The answer is the best route: `outputAmount`, `otherAmountThreshold` (the minimum the transaction enforces), `priceImpactPct`, the `routePlan` with one leg per venue, the protocol `feeBps` on the output token, and a gas estimate. An empty `routePlan` with `outputAmount: "0"` means no route at this size, and `noRouteReason` says why.

### Build

Send the quote body back unmodified with the wallet that signs.

```bash
curl -X POST https://api.getchord.xyz/v1/swap \
  -H "Content-Type: application/json" \
  -d '{ "quoteResponse": <the quote body>, "userPublicKey": "0xYourWallet", "chain": 5042 }'
```

```json
{ "transaction": { "to": "0x1b1fee89a381e595fe6536b99ba91f3e16e9601a", "data": "0xdc72a437…", "value": "0", "gasLimit": "1500000", "chainId": 5042 } }
```

For an ERC-20 input, approve `transaction.to` (the Chord router) for at least the input amount first. On Arc the gas token's ERC-20 face is the USDC predeploy, so even a "native" input is pulled by `transferFrom` and `value` is always `0`.

### Sign and send

```ts
const { transaction } = await res.json();
await wallet.sendTransaction({
  to: transaction.to,
  data: transaction.data,
  value: BigInt(transaction.value),
  gas: BigInt(transaction.gasLimit),
  chainId: 5042,
});
```

Before the wallet opens you can `POST /v1/swap/simulate` with the same fields: it `eth_call`s the calldata from your address, decodes a revert if there is one, and estimates gas. The full flow, with approvals and simulation, is in the [Swap recipe](/docs/recipes/swap/).

## Next

- [Add Chord to your app](/docs/build/) — the conventions that hold on every endpoint.
- [Clients and codegen](/docs/clients/) — generate a typed client from the OpenAPI document.
- [Recipes](/docs/recipes/token-page/) — a token page, a markets board, an LP dashboard, a launch feed.
- [API reference](/docs/api-reference/) — every endpoint, with real examples.
