Trading 212 API POST /api/v0/equity/orders/stop
Place a stop order, which becomes a market order once the last traded price reaches the stop price. The sign of quantity sets the direction.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Read on 12 Oct 2026 in Trading 212's own API reference at docs.trading212.com/api and the OpenAPI description that page offers for download (docs.trading212.com/_bundle/api.json). The reference calls the API a beta and says it works only for Invest and Stocks ISA accounts. The reference does not flag any body field as required, so none is marked required here. The reference warns that this call is not idempotent in the beta: sending the same request twice may place two orders. Orders execute only in the account's main currency. Documented rate limit: 1 request every 2 seconds.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| Content-Typerequired | header | string | Send application/json on a request with a body. |
| tickernot marked by the vendor | body | string | Instrument ticker as Trading 212 writes it, for example AAPL_US_EQ. Read it from the instruments call. |
| quantitynot marked by the vendor | body | number | Number of shares. Positive to buy, negative to sell. |
| stopPricenot marked by the vendor | body | number | The price that triggers the order, compared with the instrument's last traded price. |
| timeValiditynot marked by the vendor | body | string | DAY or GOOD_TILL_CANCEL. |
4 fields are tagged not marked by the vendor: ticker, quantity, stopPrice, timeValidity. The vendor's page lists them and marks them neither required nor optional. That describes the page, not a test of what the host accepts, so the samples send them with a placeholder.
Authentication headers
| Name | Type | Description |
|---|---|---|
| Authorizationrequired | string | Send Basic followed by the Base64 encoding of your API key, a colon and your API secret. Placeholder only: never paste real credentials into this site. |
Request
Written from the method, path and parameters recorded on this page, against the demo host. Not executed against a live or demo account. Credentials are read from environment variables on your own machine and are never entered on this site. The request builder writes these same snippets, from the same record.
This call takes a request body. The samples send it as JSON with a Content-Type of application/json (in Python, passing json= sets that header) and a placeholder for each of the 4 body fields the vendor's page marks neither required nor optional, named in the sample's own comment. Each placeholder has to be replaced with a real value before the request can succeed.
Python
# Set T212_API_KEY, T212_API_SECRET as environment variables first. Never paste real values into code.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Not marked required or optional on the vendor's page, so sent here with a placeholder: ticker, quantity, stopPrice, timeValidity. Leave out any the call does not need.
import base64
import os
import requests
BASE_URL = "https://demo.trading212.com" # the demo host
headers = {
"Authorization": "Basic " + base64.b64encode((os.environ["T212_API_KEY"] + ":" + os.environ["T212_API_SECRET"]).encode()).decode(),
"Content-Type": "application/json",
}
body = {"ticker": "...", "quantity": 0, "stopPrice": 0, "timeValidity": "..."}
resp = requests.post(BASE_URL + "/api/v0/equity/orders/stop", headers=headers, json=body, timeout=10)
resp.raise_for_status()
print(resp.json())JavaScript
// Set T212_API_KEY, T212_API_SECRET as environment variables first. Never paste real values into code.
// Replace each {placeholder}, "..." and 0 with a real value before running.
// Not marked required or optional on the vendor's page, so sent here with a placeholder: ticker, quantity, stopPrice, timeValidity. Leave out any the call does not need.
// Run as a module, for example a .mjs file, on a Node version that has fetch built in.
const BASE_URL = "https://demo.trading212.com"; // the demo host
const res = await fetch(BASE_URL + "/api/v0/equity/orders/stop", {
method: "POST",
headers: {
"Authorization": "Basic " + Buffer.from(process.env.T212_API_KEY + ":" + process.env.T212_API_SECRET).toString("base64"),
"Content-Type": "application/json",
},
body: JSON.stringify({"ticker": "...", "quantity": 0, "stopPrice": 0, "timeValidity": "..."}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());curl
# Set T212_API_KEY, T212_API_SECRET as environment variables first. Never paste real values into code.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Not marked required or optional on the vendor's page, so sent here with a placeholder: ticker, quantity, stopPrice, timeValidity. Leave out any the call does not need.
curl -X POST "https://demo.trading212.com/api/v0/equity/orders/stop" \
-u "$T212_API_KEY:$T212_API_SECRET" \
-H "Content-Type: application/json" \
-d '{"ticker": "...", "quantity": 0, "stopPrice": 0, "timeValidity": "..."}'Response
A mock response. The values are invented, so check field names against the official reference.
{
"_mock": true,
"id": 900001,
"ticker": "MOCK_US_EQ",
"instrument": {
"ticker": "MOCK_US_EQ",
"name": "Mock instrument",
"isin": "US0000000000",
"currency": "USD"
},
"type": "STOP",
"side": "BUY",
"status": "NEW",
"strategy": "QUANTITY",
"quantity": 0.1,
"filledQuantity": 0,
"timeInForce": "DAY",
"extendedHours": false,
"initiatedFrom": "API",
"currency": "GBP",
"createdAt": "2026-09-18T08:00:00Z",
"stopPrice": 100.23
}Limits that apply at Trading 212
| Limit | Value | Scope | Source |
|---|---|---|---|
| Headline limit | 1 req/5s, account summary (example) | account | docs.trading212.comchecked |
Trading 212 API errors you may meet
- Bad filtering argumentsHTTP 400. The filtering arguments of a history request are not valid.
- Failed validationHTTP 400. The order request failed validation.
- HTTP 401HTTP 401. Trading 212 did not accept the credentials on the request.
- Missing PermissionsHTTP 403. The API key lacks the permission the endpoint needs.
- HTTP 403HTTP 403. The request was refused.
- Order not foundHTTP 404. No order exists with the id given.
All Trading 212 API error codes, including 2 more not listed here.