---
url: /api/quickstart.md
description: From API access grant to your first response in five steps.
---

# Quickstart

::: info Availability
This feature is enabled per account by the TTMT team and is rolling out gradually. If you don't see
it in your dashboard yet, contact support to request access.
:::

This walks you from zero to a working API response. You need an active TTMT account with API access enabled (ask support if you don't have it yet).

***

## Step 1 — Enable API access

API access is available on request, not on by default. Ask TTMT support to enable it for your account. Until it's on, the **Developer API** tab on the **Connectors** page shows an invite-only message; once it's on, you can create keys there.

***

## Step 2 — Create a key

1. Open the dashboard at [app.telegramtometatrader.com](https://app.telegramtometatrader.com).
2. Go to **Connectors** and open the **Developer API** tab.
3. Type a name in **Name a new key** (optional, for example `my-bot`), then click **Create key**.
4. Copy the key shown. It looks like:

```
ttmt_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

::: warning
The raw key is shown exactly once. Copy it now — you cannot retrieve it later, only create a new one.
:::

***

## Step 3 — Make your first request

```bash
curl -s https://app.telegramtometatrader.com/api/v1/accounts \
  -H "Authorization: Bearer ttmt_live_YOUR_KEY_HERE"
```

You should get back your connected MetaAPI accounts:

```json
{
  "data": [
    {
      "account_id": "a1b2c3d4-...",
      "label": "My Live Account",
      "type": "live",
      "currency": "USD",
      "state": "deployed",
      "is_active": true
    }
  ]
}
```

Note the `account_id` UUID — you'll use it as `?account_id=` to filter results to one account.

***

## Step 4 — Fetch recent trades

```bash
curl -s "https://app.telegramtometatrader.com/api/v1/trades?status=active&limit=10" \
  -H "Authorization: Bearer ttmt_live_YOUR_KEY_HERE"
```

The response is a list envelope:

```json
{
  "data": [ /* trade objects */ ],
  "has_more": false,
  "next_cursor": null
}
```

Pass `?after=<next_cursor>` to page through history. See [Reference — /trades](/api/reference/list-trades) for all filter parameters.

***

## Step 5 — Connect the live stream

```bash
curl -N https://app.telegramtometatrader.com/api/v1/stream \
  -H "Authorization: Bearer ttmt_live_YOUR_KEY_HERE" \
  -H "Accept: text/event-stream"
```

You'll receive a continuous stream of events as they happen — position updates, order fills, TP hits, and trade lifecycle changes. The stream force-cycles every 5 minutes; reconnect and send `Last-Event-ID` to resume without gaps.

See [Streaming](/api/streaming) for the full event catalog.

***

## What's next

* [Authentication](/api/authentication) — key lifecycle, disable vs. revoke, the active-key cap
* [Errors](/api/errors) — how error responses are shaped
* [Rate Limiting](/api/rate-limiting) — limits and `429` handling
* [Streaming](/api/streaming) — every SSE event type documented with examples
* [Reference](/api/reference/) — all nine endpoints

***

## Related pages

* [Authentication](/api/authentication) — API key format, lifecycle, and header requirements
* [Errors](/api/errors) — RFC 9457 error envelope and common HTTP status codes
* [Rate Limiting](/api/rate-limiting) — request limits and backoff strategy
* [Streaming](/api/streaming) — real-time events from the `/stream` endpoint
