# Overview

## Base URL

| Environment | URL                                    |
| ----------- | -------------------------------------- |
| Production  | `https://rest-api.tokenbot.com/v1`     |
| Development | `https://rest-api-dev.tokenbot.com/v1` |

## Authentication

All endpoints require authentication via `X-API-Key` header or `Authorization: Bearer <jwt>` header. See [Authentication](https://docs.tokenbot.com/home/api-docs/authentication).

## Pagination

List endpoints support pagination:

| Parameter | Type    | Default | Description              |
| --------- | ------- | ------- | ------------------------ |
| `limit`   | integer | 20      | Items per page (max 100) |
| `offset`  | integer | 0       | Number of items to skip  |

## Sorting

| Parameter | Type   | Description      |
| --------- | ------ | ---------------- |
| `sort`    | string | Field to sort by |
| `order`   | string | `asc` or `desc`  |

## Endpoints

| Resource            | Path                      | Documentation                                                                                  |
| ------------------- | ------------------------- | ---------------------------------------------------------------------------------------------- |
| Health              | `/v1/health`              | [health](#health)                                                                              |
| Me                  | `/v1/me`                  | [me](#me)                                                                                      |
| Exchanges           | `/v1/exchanges`           | [exchanges.md](https://docs.tokenbot.com/home/api-docs/rest-api/exchanges)                     |
| Strategies          | `/v1/strategies`          | [strategies.md](https://docs.tokenbot.com/home/api-docs/rest-api/strategies)                   |
| Copiers             | `/v1/copiers`             | [copiers.md](https://docs.tokenbot.com/home/api-docs/rest-api/copiers)                         |
| Trades              | `/v1/trades`              | [trades.md](https://docs.tokenbot.com/home/api-docs/rest-api/trades)                           |
| Trade Pairs         | `/v1/trade-pairs`         | [trade-pairs.md](https://docs.tokenbot.com/home/api-docs/rest-api/trade-pairs)                 |
| Notifications       | `/v1/notifications`       | [notifications.md](https://docs.tokenbot.com/home/api-docs/rest-api/notifications)             |
| Settings            | `/v1/settings`            | [settings.md](https://docs.tokenbot.com/home/api-docs/rest-api/settings)                       |
| Rewards             | `/v1/rewards`             | [rewards.md](https://docs.tokenbot.com/home/api-docs/rest-api/rewards)                         |
| Withdrawals         | `/v1/withdrawals`         | [withdrawals.md](https://docs.tokenbot.com/home/api-docs/rest-api/withdrawals)                 |
| API Keys            | `/v1/api-keys`            | [api-keys.md](https://docs.tokenbot.com/home/api-docs/rest-api/api-keys)                       |
| Supported Exchanges | `/v1/supported-exchanges` | [supported-exchanges.md](https://docs.tokenbot.com/home/api-docs/rest-api/supported-exchanges) |

## Health

### `GET /v1/health`

Basic health check.

### `GET /v1/health/detailed`

Detailed health check with service status.

## Me

### `GET /v1/me`

Returns the authenticated user's profile.

```bash
curl https://rest-api.tokenbot.com/v1/me \
  -H "X-API-Key: tb_live_your_key"
```
