TradingPal Keys API
Key management for the signed-in site user, authenticated by the site session cookie rather than an API key.
Key management for the signed-in site user, authenticated by the site session cookie rather than an API key.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tradingpal-io:tradingpal-io-keys-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: TradingPal pattern Keys API
version: v1
summary: Breakout patterns on stocks & crypto, with the historical win rate and a suggested entry, stop and target.
description: 'TradingPal helps you find better breakout patterns on stocks & crypto, faster. It looks at the entire market for wedges, pennants and triangles that form right before a large run. Based on research and backtesting, we sift out poorly formed patterns and ones with poor historical results. Each pattern comes with its historical win rate and a suggested entry, stop and target. This API serves what the nightly scan found across the whole market, ranked as the screener ranks it, and the current setups on the tickers an account tracks, with the two lines to draw as dated endpoints (straight on a log-scale price axis), the trigger, stop and target, the track record behind each setup, the last occurrences with outcomes, and a chart image. Nothing is computed per request: every answer is the stored artifact of the last nightly run, and every response says which session it describes in as_of_session, so say that session when presenting the data and do not cache setups across days. Rules for agents: never present a win rate alone. Every track record carries a summary sentence with the sample size, the win rate, the average win and the average loss; quote it whole. This is educational chart analysis, not investment advice; repeat the disclaimer when the user may act on it. Keyed routes send Authorization: Bearer tp_live_… and work only on the tickers the account tracks; the families, universe, demo and docs routes need no key. Reference: https://api.tradingpal.io/api/v1/llms.txt. MCP server: https://api.tradingpal.io/mcp.'
termsOfService: https://tradingpal.io/terms
contact:
url: https://tradingpal.io/developers
servers:
- url: https://api.tradingpal.io/api/v1
security:
- ApiKey: []
- OAuth2:
- patterns
tags:
- name: Keys
description: Key management for the signed-in site user, authenticated by the site session cookie rather than an API key.
paths:
/keys:
get:
operationId: listKeys
summary: The signed-in site user's keys (session cookie, not a key)
description: Lists the signed-in site user's active keys, newest first, without their secrets. This route is authenticated by the site's session cookie, not by an API key; it serves the developers page. Revoked keys are not listed.
tags:
- Keys
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Keys'
'403':
description: not signed in to the site
content:
application/json:
schema:
type: object
description: The default Django REST framework error body.
properties:
detail:
type: string
description: What went wrong, in one sentence.
examples:
- detail: Authentication credentials were not provided.
security:
- SessionCookie: []
post:
operationId: createKey
summary: Create a key; the full key is returned once
description: Creates an API key for the signed-in site user and returns it once, in key; only its hash is stored, so it cannot be shown again. name is optional and defaults to "default". Session cookie auth, not an API key.
tags:
- Keys
responses:
'201':
description: Created; key holds the full secret
content:
application/json:
schema:
$ref: '#/components/schemas/Key'
'403':
description: not signed in to the site
content:
application/json:
schema:
type: object
description: The default Django REST framework error body.
properties:
detail:
type: string
description: What went wrong, in one sentence.
examples:
- detail: Authentication credentials were not provided.
requestBody:
description: An optional label for the key.
content:
application/json:
schema:
type: object
description: An optional label for the key.
properties:
name:
type: string
description: A label for the key, for example the agent or script that will use it, at most 64 characters. Defaults to "default".
maxLength: 64
examples:
- name: my-agent
security:
- SessionCookie: []
/keys/{key_id}:
delete:
operationId: revokeKey
summary: Revoke a key
description: Revokes one of the signed-in user's keys; requests that carry it answer 401 invalid_api_key from then on. Cannot be undone. Answers 404 when the id is not one of the user's active keys. Session cookie auth, not an API key.
tags:
- Keys
responses:
'200':
description: Revoked
content:
application/json:
schema:
$ref: '#/components/schemas/KeyRevoked'
'403':
description: not signed in to the site
content:
application/json:
schema:
type: object
description: The default Django REST framework error body.
properties:
detail:
type: string
description: What went wrong, in one sentence.
examples:
- detail: Authentication credentials were not provided.
'404':
description: 'no such key: not one of the user''s active keys'
content:
application/json:
schema:
type: object
description: The default Django REST framework error body.
properties:
detail:
type: string
description: What went wrong, in one sentence.
examples:
- detail: Authentication credentials were not provided.
parameters:
- name: key_id
in: path
required: true
schema:
type: integer
description: The numeric id of the key, from GET /keys.
security:
- SessionCookie: []
components:
schemas:
KeyRevoked:
type: object
title: KeyRevoked
description: Confirmation that a key was revoked.
properties:
id:
type: integer
description: The id of the revoked key.
revoked_at:
type: string
description: When it was revoked, ISO 8601 date-time.
format: date-time
examples:
- id: 12
revoked_at: '2026-09-25T10:00:00+00:00'
Key:
type: object
title: Key
description: One API key as the developers page lists it. The full secret appears only in the POST /keys response.
properties:
id:
type: integer
description: Numeric id of the key; the key_id of DELETE /keys/{key_id}.
prefix:
type: string
description: The first 16 characters of the key (tp_live_ plus eight), enough to tell keys apart. The rest is never shown again.
name:
type: string
description: The label given at creation (default "default"), at most 64 characters.
created_at:
type: string
description: When the key was created, ISO 8601 date-time.
format: date-time
last_used_at:
type:
- string
- 'null'
description: When the key last authenticated a request, refreshed at most every five minutes. Null until first use.
format: date-time
key:
type: string
description: 'The full secret key, present only in the POST /keys response. Store it: only its hash is kept, so it cannot be shown again.'
examples:
- id: 12
prefix: tp_live_a1b2c3d4
name: my-agent
created_at: '2026-09-01T14:03:11+00:00'
last_used_at: '2026-09-25T09:12:40+00:00'
key: tp_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Keys:
type: object
title: Keys
description: The signed-in site user's active keys.
properties:
keys:
type: array
description: The user's active (unrevoked) keys, newest first, without secrets.
items:
$ref: '#/components/schemas/Key'
description: One key, without the secret.
examples:
- keys:
- id: 12
prefix: tp_live_a1b2c3d4
name: my-agent
created_at: '2026-09-01T14:03:11+00:00'
last_used_at: '2026-09-25T09:12:40+00:00'
securitySchemes:
ApiKey:
type: http
scheme: bearer
bearerFormat: tp_live_…
description: 'An API key in the Authorization header: "Authorization: Bearer tp_live_…". Create one at https://tradingpal.io/developers. Limits are 60 requests a minute and 10,000 a day per account (all its keys together), and 1,000 different current setups a day from the scan and per-ticker patterns. Keyed routes answer only for accounts on Premium+ (which includes Premium); the fix on a 403 says where to get it (https://tradingpal.io/developers/quickstart).'
OAuth2:
type: oauth2
description: 'The sign-in flow MCP hosts run (OAuth 2.1 with PKCE and dynamic client registration): the host opens the browser, the user approves, and the grant is a key named after the host on the keys page. The access token goes in the same Authorization header. Metadata at https://api.tradingpal.io/.well-known/oauth-authorization-server.'
flows:
authorizationCode:
authorizationUrl: https://api.tradingpal.io/oauth/authorize
tokenUrl: https://api.tradingpal.io/oauth/token
refreshUrl: https://api.tradingpal.io/oauth/token
scopes:
patterns: 'Everything the account''s key can do: read setups, history, records and charts, and change tracked tickers.'
SessionCookie:
type: apiKey
in: cookie
name: tp_sessionid
description: The TradingPal site session cookie, for the key-management routes only; they are used by the developers page, not by API clients.
externalDocs:
url: https://api.tradingpal.io/api/v1/llms.txt
description: The reference for agents