x-api-key header works for both. Your API key requires the INDICATOR:ALL:READ scope. Enable it alongside MARKETDATA:ALL:READ when creating your token so a single key serves both market data and indicators.
https://public-api.takeprofit.com/api/v1/indicators for REST and wss://public-api.takeprofit.com/api/v1/indicators for the stream. Securities and candles remain on the market data endpoints; the indicator endpoints handle only indicator computation.
Endpoints
Paths are relative to the base URLs above. Each endpoint page in the sidebar lists its parameters and response fields and has a Try it playground. Every endpoint answers
GET only, and unknown query parameters are rejected with 400.
How a request is put together
- Identify a security using
exchangeandsymbol— the same pair returned by the market data Securities endpoints. Internal IDs are not accepted. - The indicator is its
uid, such assma,emaorrsifor built-in indicators. The longerslug,simple_moving_averagefor SMA, works in its place. Both come from the catalog,GET /. - Pin
versionin production. Without it the latest published version runs, and a new version can change the outputs. A client that pins a version is never affected by a release. - Parameters go in
param.<id>, for exampleparam.length=20. The IDs, accepted types, ranges and options are listed byGET /{uid}. Omitted parameters take the indicator’s defaults, and the response echoes the resolved values inmeta.params. - Outputs are keyed by ID. Every bar carries a
valuesobject keyed by the output IDs from the indicator details. Pass theoutputsparameter to filter the response down to specific IDs.
Your own and purchased indicators
The same endpoints run indicators you wrote in TakeProfit and indicators you bought in the Marketplace, computed under the account that owns the API key.- Use the indicator’s
uidfrom TakeProfit. The catalog,GET /, lists only built-in indicators, and these indicators have no slug. versionis required. Without it the request is rejected with400and codeinvalid_argument.- Another account’s indicator, one you have not bought, and one that does not exist all return the same
404. - Prices are the same as for built-in indicators.
- The first request after publishing a version can take a few seconds while the script is compiled.
- Strategies and indicators that use external data are not served and return
404.
The computed window
A bar is one computed point of the indicator, one per candle of the chosen timeframe.GET /{uid}/values needs only exchange, symbol, and timeframe. Left alone, it computes the indicator over the last 1,000 bars using default parameters.
Window parameters work just like they do on the candles endpoint: combining
from and to defines a complete window, so neither period nor limit can be added.
A time window holds at most 10,000 bars; a wider one is rejected with 400 and code too_much_data. The count is estimated as if the security traded around the clock, so for a long stretch of a security with trading sessions use limit instead. The indicator is computed over the 10,000 most recent bars: a window that starts before them is answered from what was computed, with "historyComplete": false, and hasMoreBefore tells whether the security has bars before the window. Tick timeframes such as 1t or 50t take only limit: tick bars have no fixed duration, so from, to and period are rejected with 400.
Reading the bars
- The last bar is usually still forming. Every bar carries
closed; the forming bar has"closed": falseand its values change until the bar closes. Use bars with"closed": truefor signals. - Missing values are absent, not null. During an indicator’s warm-up, or on a bar where an output has no value, the output ID is simply missing from
values. - Shifted values stay on their bar. An indicator that draws a value on another bar, as Alligator does with its lines, keeps it on the bar it was computed for and reports the shift in the bar’s
offsets. - Values are JSON numbers, unlike the decimal strings of the market data endpoints.
Credits
The indicator endpoints draw from the same quotas as the market data endpoints: 100,000 REST credits per 60 seconds and 1,000 stream credits per 300 seconds, shared across all API keys on your account. The windows, headers and the429 behavior are described in Credits and limits.
Only a successful response is billed: rejected requests, script failures (
422), timeouts (504) and an unavailable upstream (503) cost nothing.
Errors
Every failure returns an HTTP status code and a JSON body:{"error": {"code": "...", "message": "..."}}. Branch on code — it is stable, whereas message is intended for human readability.
New here? Quickstart walks through the catalog, a computed window and the live stream, and Authentication covers creating a key.