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

# Platform API

> The TakeProfit Platform API: trade on your connected exchange accounts, request historical candles, footprint and TPO profiles and the security catalog over REST, and subscribe to live streams over WebSocket.

Platform API

The data behind our charts

Request historical candles, volume footprint and TPO profiles and the security catalog over REST, and subscribe to live candles, footprint profiles and order books over WebSocket. One key in one header works for both.

[Make your first request](https://takeprofit.com/docs/platform-api/quickstart.md)

[Get an API key](https://takeprofit.com/docs/platform-api/authentication.md)

## What you can do

> [card] [Trading](https://takeprofit.com/docs/platform-api/trading/overview)
>
> Place, amend and cancel orders, close positions and add take-profit/stop-loss on the exchange accounts you connected, and follow every order and fill live. Signed with a key of its own.

> [card] [Candles](https://takeprofit.com/docs/platform-api/rest/overview)
>
> Historical candles for any supported timeframe, plus the list of timeframes. Over WebSocket, the latest candle and then live updates of the forming one.

> [card] [Volume footprint](https://takeprofit.com/docs/platform-api/websocket/footprint.md)
>
> Buy and sell volume per price row, with the row size scale a settings UI can offer. Live profiles arrive as complete replacements.

> [card] [TPO profiles](https://takeprofit.com/docs/platform-api/rest/overview)
>
> Market Profile data for day, week and month timeframes, with point of control, initial balance and time blocks.

> [card] [Order book](https://takeprofit.com/docs/platform-api/websocket/orderbook.md)
>
> One snapshot of the top levels per side, then incremental updates. Available over WebSocket.

> [card] [Indicators](https://takeprofit.com/docs/platform-api/indicators/overview)
>
> Built-in indicators computed on our data: moving averages, RSI, volume profiles and more, as history over REST and live values over WebSocket.

> [card] [Securities](https://takeprofit.com/docs/platform-api/rest/overview)
>
> Search by name or ticker, list exchanges and their securities, and read a security specification with tick size and precision.

> [card] [One key for both](https://takeprofit.com/docs/platform-api/authentication.md)
>
> A personal API token from your TakeProfit settings, sent in the `x-api-key` header on every request and on the WebSocket handshake.

The steps below cover market data. To trade, start with the [Trading API](https://takeprofit.com/docs/platform-api/trading/overview).

## Three APIs, one account

> [card] [Trading API](https://takeprofit.com/docs/platform-api/trading/overview)
>
> `https://public-api.charting.com/api/v1/trading`
>
> Orders and positions over REST, your account's orders, fills and balances live over WebSocket. Every request is signed.

> [card] [Market Data API](https://takeprofit.com/docs/platform-api/rest/overview)
>
> `https://public-api.takeprofit.com/api/v1/marketdata`
>
> Candles, footprint, TPO and securities over REST, live candles, footprint and order books over [WebSocket](https://takeprofit.com/docs/platform-api/websocket/overview).

> [card] [Indicators API](https://takeprofit.com/docs/platform-api/indicators/overview)
>
> `https://public-api.takeprofit.com/api/v1/indicators`
>
> Built-in and your own indicators computed on our data, as history over REST and live values over WebSocket.

Each API opens with an overview and a quickstart, and its endpoint and stream pages are generated from our OpenAPI and AsyncAPI specifications, so every parameter and response field matches the running API. All three share your account's [credits](https://takeprofit.com/docs/platform-api/limits.md).

## From key to live market data

<ol>
  <li>
    Step 1 of 4
    Create an API key
    In Settings, create a personal API token on a paid plan and copy it once: the full key is shown a single time.

    <ul>
      <li>[Authentication](https://takeprofit.com/docs/platform-api/authentication.md)</li>
    </ul>
  </li>

  <li>
    Step 2 of 4
    Find the security
    Search by name or ticker and take the exchange and symbol pair from the hit. Every other endpoint speaks that pair.

    <ul>
      <li>[Find a security](https://takeprofit.com/docs/platform-api/quickstart.md#1-find-a-security)</li>
    </ul>
  </li>

  <li>
    Step 3 of 4
    Load history
    Ask for candles, footprint or TPO profiles over a range. Prices and volumes come as decimal strings, so nothing is rounded on the way.

    <ul>
      <li>[Load historical candles](https://takeprofit.com/docs/platform-api/quickstart.md#2-load-historical-candles)</li>
      <li>[REST API overview](https://takeprofit.com/docs/platform-api/rest/overview)</li>
    </ul>
  </li>

  <li>
    Step 4 of 4
    Go live
    Open a WebSocket connection with the same key in the handshake header and keep the picture up to date as the market moves.

    <ul>
      <li>[Subscribe to live candles](https://takeprofit.com/docs/platform-api/quickstart.md#3-subscribe-to-live-candles)</li>
      <li>[WebSocket API overview](https://takeprofit.com/docs/platform-api/websocket/overview)</li>
    </ul>
  </li>
</ol>

## Good to know

* **One header, both protocols.** `x-api-key` authenticates REST requests and the WebSocket upgrade alike. Exactly one value is accepted.
* **Securities are identified by exchange and symbol.** Take them from the Securities endpoints.
* **Unknown query parameters are rejected** with `400`, so a typo fails loudly instead of being ignored.
* **Personal, non-commercial use only.** Redistribution or resale of the data is not permitted, and commercial licensing is not available at this time. See [Usage terms](https://takeprofit.com/docs/platform-api/limits.md#usage-terms).
* **Usage is metered in credits, per account.** REST gets 100,000 credits per 60 seconds, shared by all your keys, and every request costs at least 1,000, so up to 100 requests a minute. Streams draw on a separate 1,000 credits per 300 seconds. Prices and limits are in [Credits and limits](https://takeprofit.com/docs/platform-api/limits.md).

## Request a feature

> [card] [Post a feature request](https://takeprofit.featureos.app/)
>
> Tell us where to take the API next. An MCP server for it? More market data sources? Share the idea or vote for one.

> [card] [Discuss on Discord](https://discord.gg/takeprofit)
>
> Talk it through with the team and other developers before or after you post.

Need help?

A question about the API, a bug or unsure about the setup? Our team and other developers answer you directly on Discord.

[Join our Discord](https://discord.gg/takeprofit)

[https://discord.gg/takeprofit](https://discord.gg/takeprofit)

`discord.gg/takeprofit`


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