Trading212 Public API (v0)

Download OpenAPI specification:Download

Instruments Metadata

Tradeable instruments metadata

Exchange List

Fetch all exchanges and their corresponding working schedules that your account has access to

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( metadata ) missing for API key

408

Timed-out

429

Limited: 1 / 30s

get/api/v0/equity/metadata/exchanges
Request samples
Response samples
application/json
[
  • {
    }
]

Instrument List

Fetch all instruments that your account has access to

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( metadata ) missing for API key

408

Timed-out

429

Limited: 1 / 50s

get/api/v0/equity/metadata/instruments
Request samples
Response samples
application/json
[
  • {
    }
]

Pies

Endpoints for managing pies

Fetch all pies

Fetches all pies for the account

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( pies:read ) missing for API key

408

Timed-out

429

Limited: 1 / 30s

get/api/v0/equity/pies
Request samples
Response samples
application/json
[
  • {
    }
]

Create pie

Creates a pie for the account by given params

SecurityapiKeyHeader
Request
Request Body schema: application/json
dividendCashAction
string
Enum: "REINVEST" "TO_ACCOUNT_CASH"
endDate
string <date-time>
goal
number
icon
string
Enum: "Home" "PiggyBank" "Iceberg" "Airplane" "RV" "Unicorn" "Whale" "Convertable" "Family" "Coins" "Education" "BillsAndCoins" "Bills" "Water" "Wind" "Car" "Briefcase" "Medical" "Landscape" "Child" "Vault" "Travel" "Cabin" "Apartments" "Burger" "Bus" "Energy" "Factory" "Global" "Leaf" "Materials" "Pill" "Ring" "Shipping" "Storefront" "Tech" "Umbrella"
object
name
string
Responses
200

OK

400

Bad create request

401

Bad API key

403

Scope( pies:write ) missing for API key

408

Timed-out

429

Limited: 1 / 5s

post/api/v0/equity/pies
Request samples
application/json
{
  • "dividendCashAction": "REINVEST",
  • "endDate": "2019-08-24T14:15:22Z",
  • "goal": 0,
  • "icon": "Home",
  • "instrumentShares": {
    },
  • "name": "string"
}
Response samples
application/json
{
  • "instruments": [
    ],
  • "settings": {
    }
}

Delete pie

Deletes a pie by given id

SecurityapiKeyHeader
Request
path Parameters
id
required
integer <int64>
Responses
200

OK

401

Bad API key

403

Scope( pies:write ) missing for API key

404

Pie not found

408

Timed-out

429

Limited: 1 / 5s

delete/api/v0/equity/pies/{id}
Request samples
Response samples
application/json
{ }

Fetch a pie

Fetches a pies for the account with detailed information

SecurityapiKeyHeader
Request
path Parameters
id
required
integer <int64>
Responses
200

OK

401

Bad API key

403

Scope( pies:read ) missing for API key

408

Timed-out

429

Limited: 1 / 5s

get/api/v0/equity/pies/{id}
Request samples
Response samples
application/json
{
  • "instruments": [
    ],
  • "settings": {
    }
}

Update pie

Updates a pie for the account by given params

SecurityapiKeyHeader
Request
path Parameters
id
required
integer <int64>
Request Body schema: application/json
dividendCashAction
string
Enum: "REINVEST" "TO_ACCOUNT_CASH"
endDate
string <date-time>
goal
number
icon
string
Enum: "Home" "PiggyBank" "Iceberg" "Airplane" "RV" "Unicorn" "Whale" "Convertable" "Family" "Coins" "Education" "BillsAndCoins" "Bills" "Water" "Wind" "Car" "Briefcase" "Medical" "Landscape" "Child" "Vault" "Travel" "Cabin" "Apartments" "Burger" "Bus" "Energy" "Factory" "Global" "Leaf" "Materials" "Pill" "Ring" "Shipping" "Storefront" "Tech" "Umbrella"
object
name
string
Responses
200

OK

400

Bad update request

401

Bad API key

403

Scope( pies:write ) missing for API key

408

Timed-out

429

Limited: 1 / 5s

post/api/v0/equity/pies/{id}
Request samples
application/json
{
  • "dividendCashAction": "REINVEST",
  • "endDate": "2019-08-24T14:15:22Z",
  • "goal": 0,
  • "icon": "Home",
  • "instrumentShares": {
    },
  • "name": "string"
}
Response samples
application/json
{
  • "instruments": [
    ],
  • "settings": {
    }
}

Equity Orders

Order information and dispatcher

Fetch all

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( orders:read ) missing for API key

408

Timed-out

429

Limited: 1 / 5s

get/api/v0/equity/orders
Request samples
Response samples
application/json
[
  • {
    }
]

Place Limit order

SecurityapiKeyHeader
Request
Request Body schema: application/json
limitPrice
number
quantity
number
ticker
string
timeValidity
string

Expiration

Enum: "DAY" "GTC"
Responses
200

OK

400

Failed validation

401

Bad API key

403

Scope( orders:execute ) missing for API key

408

Timed-out

429

Limited: 1 / 2s

post/api/v0/equity/orders/limit
Request samples
application/json
{
  • "limitPrice": 100.23,
  • "quantity": 0.1,
  • "ticker": "AAPL_US_EQ",
  • "timeValidity": "DAY"
}
Response samples
application/json
{
  • "creationTime": "2019-08-24T14:15:22Z",
  • "filledQuantity": 0,
  • "filledValue": 0,
  • "id": 0,
  • "limitPrice": 0,
  • "quantity": 0,
  • "status": "LOCAL",
  • "stopPrice": 0,
  • "strategy": "QUANTITY",
  • "ticker": "AAPL_US_EQ",
  • "type": "LIMIT",
  • "value": 0
}

Place Market order

SecurityapiKeyHeader
Request
Request Body schema: application/json
quantity
number
ticker
string
Responses
200

OK

400

Failed validation

401

Bad API key

403

Scope( orders:execute ) missing for API key

408

Timed-out

429

Limited: 1 / 1s

post/api/v0/equity/orders/market
Request samples
application/json
{
  • "quantity": 0.1,
  • "ticker": "AAPL_US_EQ"
}
Response samples
application/json
{
  • "creationTime": "2019-08-24T14:15:22Z",
  • "filledQuantity": 0,
  • "filledValue": 0,
  • "id": 0,
  • "limitPrice": 0,
  • "quantity": 0,
  • "status": "LOCAL",
  • "stopPrice": 0,
  • "strategy": "QUANTITY",
  • "ticker": "AAPL_US_EQ",
  • "type": "LIMIT",
  • "value": 0
}

Place Stop order

SecurityapiKeyHeader
Request
Request Body schema: application/json
quantity
number
stopPrice
number
ticker
string
timeValidity
string

Expiration

Enum: "DAY" "GTC"
Responses
200

OK

400

Failed validation

401

Bad API key

403

Scope( orders:execute ) missing for API key

408

Timed-out

429

Limited: 1 / 2s

post/api/v0/equity/orders/stop
Request samples
application/json
{
  • "quantity": 0.1,
  • "stopPrice": 100.23,
  • "ticker": "AAPL_US_EQ",
  • "timeValidity": "DAY"
}
Response samples
application/json
{
  • "creationTime": "2019-08-24T14:15:22Z",
  • "filledQuantity": 0,
  • "filledValue": 0,
  • "id": 0,
  • "limitPrice": 0,
  • "quantity": 0,
  • "status": "LOCAL",
  • "stopPrice": 0,
  • "strategy": "QUANTITY",
  • "ticker": "AAPL_US_EQ",
  • "type": "LIMIT",
  • "value": 0
}

Place StopLimit order

SecurityapiKeyHeader
Request
Request Body schema: application/json
limitPrice
number
quantity
number
stopPrice
number
ticker
string
timeValidity
string

Expiration

Enum: "DAY" "GTC"
Responses
200

OK

400

Failed validation

401

Bad API key

403

Scope( orders:execute ) missing for API key

408

Timed-out

429

Limited: 1 / 2s

post/api/v0/equity/orders/stop_limit
Request samples
application/json
{
  • "limitPrice": 100.23,
  • "quantity": 0.1,
  • "stopPrice": 100.23,
  • "ticker": "AAPL_US_EQ",
  • "timeValidity": "DAY"
}
Response samples
application/json
{
  • "creationTime": "2019-08-24T14:15:22Z",
  • "filledQuantity": 0,
  • "filledValue": 0,
  • "id": 0,
  • "limitPrice": 0,
  • "quantity": 0,
  • "status": "LOCAL",
  • "stopPrice": 0,
  • "strategy": "QUANTITY",
  • "ticker": "AAPL_US_EQ",
  • "type": "LIMIT",
  • "value": 0
}

Cancel by ID

SecurityapiKeyHeader
Request
path Parameters
id
required
integer <int64>
Responses
200

OK

400

Not available for real money accounts

401

Bad API key

403

Scope( orders:execute ) missing for API key

404

Order not found

408

Timed-out

429

Limited: 1 / 1s

delete/api/v0/equity/orders/{id}
Request samples

Fetch by ID

SecurityapiKeyHeader
Request
path Parameters
id
required
integer <int64>
Responses
200

Order found

401

Bad API key

403

Scope( orders:read ) missing for API key

404

Order not found

408

Timed-out

429

Limited: 1 / 1s

get/api/v0/equity/orders/{id}
Request samples
Response samples
application/json
{
  • "creationTime": "2019-08-24T14:15:22Z",
  • "filledQuantity": 0,
  • "filledValue": 0,
  • "id": 0,
  • "limitPrice": 0,
  • "quantity": 0,
  • "status": "LOCAL",
  • "stopPrice": 0,
  • "strategy": "QUANTITY",
  • "ticker": "AAPL_US_EQ",
  • "type": "LIMIT",
  • "value": 0
}

Account Data

Relevant information about your account

Fetch account cash

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( account ) missing for API key

408

Timed-out

429

Limited: 1 / 2s

get/api/v0/equity/account/cash
Request samples
Response samples
application/json
{
  • "blocked": 0,
  • "free": 0,
  • "invested": 0,
  • "pieCash": 0,
  • "ppl": 0,
  • "result": 0,
  • "total": 0
}

Fetch account metadata

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( account ) missing for API key

408

Timed-out

429

Limited: 1 / 30s

get/api/v0/equity/account/info
Request samples
Response samples
application/json
{
  • "currencyCode": "USD",
  • "id": 0
}

Personal Portfolio

State of your trading portfolio

Fetch all open positions

Fetch an open positions for your account

SecurityapiKeyHeader
Responses
200

OK

401

Bad API key

403

Scope( portfolio ) missing for API key

408

Timed-out

429

Limited: 1 / 5s

get/api/v0/equity/portfolio
Request samples
Response samples
application/json
[
  • {
    }
]

Fetch a specific position

Fetch an open position by ticker

SecurityapiKeyHeader
Request
path Parameters
ticker
required
string
Example: AAPL_US_EQ
Responses
200

OK

400

Invalid ticker supplied

401

Bad API key

403

Scope( portfolio ) missing for API key

404

No open position with that ticker

408

Timed-out

429

Limited: 1 / 1s

get/api/v0/equity/portfolio/{ticker}
Request samples
Response samples
application/json
{
  • "averagePrice": 0,
  • "currentPrice": 0,
  • "frontend": "API",
  • "fxPpl": 0,
  • "initialFillDate": "2019-08-24T14:15:22Z",
  • "maxBuy": 0,
  • "maxSell": 0,
  • "pieQuantity": 0,
  • "ppl": 0,
  • "quantity": 0,
  • "ticker": "AAPL_US_EQ"
}

Historical items

Reports about past events

Historical order data

SecurityapiKeyHeader
Request
query Parameters
cursor
integer <int64>

Pagination cursor

ticker
string

Ticker filter

limit
integer <int32>
Default: 20

Max items: 50

Example: limit=21
Responses
200

OK

400

Bad filtering arguments

401

Bad API key

403

Scope( history:orders ) missing for API key

408

Timed-out

429

Limited: 6 / 1m0s

get/api/v0/equity/history/orders
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "nextPagePath": "string"
}

Paid out dividends

SecurityapiKeyHeader
Request
query Parameters
cursor
integer <int64>

Pagination cursor

ticker
string

Ticker filter

limit
integer <int32>
Default: 20

Max items: 50

Example: limit=21
Responses
200

OK

400

Bad filtering arguments

401

Bad API key

403

Scope( history:dividends ) missing for API key

408

Timed-out

429

Limited: 6 / 1m0s

get/api/v0/history/dividends
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "nextPagePath": "string"
}

Exports List

Lists detailed information about all csv account exports

SecurityapiKeyHeader
Responses
200

OK

400

Bad filtering arguments

401

Bad API key

403

Missing Permissions

408

Timed-out

429

Limited: 1 / 1m0s

get/api/v0/history/exports
Request samples
Response samples
application/json
[
  • {
    }
]

Export csv

Request a csv export of the account's orders, dividends and transactions history

SecurityapiKeyHeader
Request
Request Body schema: application/json
object (ReportDataIncluded)
timeFrom
string <date-time>
timeTo
string <date-time>
Responses
200

OK

400

Bad filtering arguments

401

Bad API key

403

Missing Permissions

408

Timed-out

429

Limited: 1 / 30s

post/api/v0/history/exports
Request samples
application/json
{
  • "dataIncluded": {
    },
  • "timeFrom": "2019-08-24T14:15:22Z",
  • "timeTo": "2019-08-24T14:15:22Z"
}
Response samples
application/json
{
  • "reportId": 0
}

Transaction list

Fetch superficial information about movements to and from your account

SecurityapiKeyHeader
Request
query Parameters
cursor
string

Pagination cursor

limit
integer <int32>
Default: 20

Max items: 50

Example: limit=21
Responses
200

OK

400

Bad filtering arguments

401

Bad API key

403

Scope( history:transactions ) missing for API key

408

Timed-out

429

Limited: 6 / 1m0s

get/api/v0/history/transactions
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "nextPagePath": "string"
}