pipsocketDOCS
API reference / Account data

Symbols and prices

The broker's symbols, their specifications and prices.

List symbols

GET/v1/accounts/{account}/symbols

Every symbol the broker offers the account, in Market Watch or not, read from the terminal. Large brokers list thousands; read a symbol for its full specification.

Path

accountstringrequired

The account's id, acc_ and 26 characters, as the dashboard shows it.

Response

A list of these
namestring
MT5 · SYMBOL_NAME
descriptionstring
MT5 · SYMBOL_DESCRIPTION
pathstring
MT5 · SYMBOL_PATH

Where it sits in the broker's symbol tree.

availableboolean

Whether the terminal could read its properties.

digitsinteger
MT5 · SYMBOL_DIGITS
contract_sizenumber
MT5 · SYMBOL_TRADE_CONTRACT_SIZE
currency_basestring
MT5 · SYMBOL_CURRENCY_BASE
currency_profitstring
MT5 · SYMBOL_CURRENCY_PROFIT
currency_marginstring
MT5 · SYMBOL_CURRENCY_MARGIN
tradingenumor null

MT5's SYMBOL_TRADE_MODE: whether and which way the symbol can be traded.

disabledlong_onlyshort_onlyclose_onlyfull
volume_minnumber
MT5 · SYMBOL_VOLUME_MIN
volume_maxnumber
MT5 · SYMBOL_VOLUME_MAX
volume_stepnumber
MT5 · SYMBOL_VOLUME_STEP
in_market_watchboolean
MT5 · SYMBOL_SELECT

Whether it is in the terminal's Market Watch.

Errors

401invalid_api_key

The key is not a workspace's current key (a rolled key stops working within about a minute).

401missing_api_key

No API key: send it as Authorization: Bearer <key>.

404no_such_account

No such account, or one the key's workspace doesn't have: the two look the same.

503account_not_connected

The account's terminal is not connected to the engine (stopped, starting, or restarting). Nothing was sent, except by the kill switch: engaging it still engages it, and may already have deleted pending orders.

503engine_busy

The account's engine host has too many calls in flight (256). Nothing was done; try again.

503engine_unavailable

The account's engine host is not connected to Pipsocket, or disconnected while the call waited. A trade it already had is still settled: look it up.

503symbol_too_large

One symbol's entry is too large for the terminal to list.

503terminal_error

The terminal did not give the answer asked for.

504engine_timeout

The account's engine did not answer within 30 seconds.

504terminal_timeout

The account's terminal did not answer within 5 seconds.

Get a symbol

GET/v1/accounts/{account}/symbols/{symbol}

A symbol's specification from the terminal: digits, contract size, volume limits, stops and freeze levels, and the filling modes, execution, order types and expirations it allows.

Path

accountstringrequired

The account's id, acc_ and 26 characters, as the dashboard shows it.

symbolstringrequired

The symbol exactly as the broker names it, such as EURUSD.

Response

namestring
MT5 · SYMBOL_NAME
availableboolean

Whether the terminal could read its properties; when false the rest are empty values.

descriptionstring
MT5 · SYMBOL_DESCRIPTION
digitsinteger
MT5 · SYMBOL_DIGITS
pointnumber
MT5 · SYMBOL_POINT
tick_sizenumber
MT5 · SYMBOL_TRADE_TICK_SIZE
tick_valuenumber
MT5 · SYMBOL_TRADE_TICK_VALUE
contract_sizenumber
MT5 · SYMBOL_TRADE_CONTRACT_SIZE
volume_minnumber
MT5 · SYMBOL_VOLUME_MIN
volume_maxnumber
MT5 · SYMBOL_VOLUME_MAX
volume_stepnumber
MT5 · SYMBOL_VOLUME_STEP
stops_levelinteger
MT5 · SYMBOL_TRADE_STOPS_LEVEL

The closest stops may be to the price, in points.

freeze_levelinteger
MT5 · SYMBOL_TRADE_FREEZE_LEVEL

How close to the price an order or stop is frozen, in points.

filling_modeinteger
MT5 · SYMBOL_FILLING_MODE

MT5's flags, as filling_modes spells them out.

trade_modeinteger
MT5 · SYMBOL_TRADE_MODE

MT5's value, as trading spells it out.

execution_modeinteger
MT5 · SYMBOL_TRADE_EXEMODE

MT5's value, as execution spells it out.

order_modeinteger
MT5 · SYMBOL_ORDER_MODE

MT5's flags, as order_types spells them out.

expiration_modeinteger
MT5 · SYMBOL_EXPIRATION_MODE

MT5's flags, as expirations spells them out.

currency_basestring
MT5 · SYMBOL_CURRENCY_BASE
currency_profitstring
MT5 · SYMBOL_CURRENCY_PROFIT
currency_marginstring
MT5 · SYMBOL_CURRENCY_MARGIN
filling_modesenum[]

The type_filling modes MT5's SYMBOL_FILLING_MODE flags allow. return has no flag: whether it is accepted depends on the symbol's execution and the broker.

executionenumor null

MT5's SYMBOL_TRADE_EXEMODE. Instant and request execution need price (and use deviation).

requestinstantmarketexchange
order_typesenum[]

The orders the symbol allows (MT5's SYMBOL_ORDER_MODE).

expirationsenum[]

The type_time values the symbol allows (MT5's SYMBOL_EXPIRATION_MODE).

tradingenumor null

MT5's SYMBOL_TRADE_MODE: whether and which way the symbol can be traded.

disabledlong_onlyshort_onlyclose_onlyfull

Errors

401invalid_api_key

The key is not a workspace's current key (a rolled key stops working within about a minute).

401missing_api_key

No API key: send it as Authorization: Bearer <key>.

404no_such_account

No such account, or one the key's workspace doesn't have: the two look the same.

404no_such_symbol

The broker has no symbol by that name.

503account_not_connected

The account's terminal is not connected to the engine (stopped, starting, or restarting). Nothing was sent, except by the kill switch: engaging it still engages it, and may already have deleted pending orders.

503engine_busy

The account's engine host has too many calls in flight (256). Nothing was done; try again.

503engine_unavailable

The account's engine host is not connected to Pipsocket, or disconnected while the call waited. A trade it already had is still settled: look it up.

503terminal_error

The terminal did not give the answer asked for.

504engine_timeout

The account's engine did not answer within 30 seconds.

504terminal_timeout

The account's terminal did not answer within 5 seconds.

Get a symbol's price

GET/v1/accounts/{account}/symbols/{symbol}/tick

The symbol's latest tick (MT5's MqlTick) from the terminal. A symbol the terminal has just added to Market Watch can take up to 2 seconds to have a price.

Path

accountstringrequired

The account's id, acc_ and 26 characters, as the dashboard shows it.

symbolstringrequired

The symbol exactly as the broker names it, such as EURUSD.

Response

symbolstring
bidnumber
MT5 · bid
asknumber
MT5 · ask
time_mscintegeror null
MT5 · time_msc

Broker server time, milliseconds since 1970.

lastnumberor null
MT5 · last
volumenumberor null
MT5 · volume_real
flagsintegeror null
MT5 · flags

MT5's TICK_FLAG_* bits: what changed.

Errors

401invalid_api_key

The key is not a workspace's current key (a rolled key stops working within about a minute).

401missing_api_key

No API key: send it as Authorization: Bearer <key>.

404no_such_account

No such account, or one the key's workspace doesn't have: the two look the same.

404no_such_symbol

The broker has no symbol by that name.

503account_not_connected

The account's terminal is not connected to the engine (stopped, starting, or restarting). Nothing was sent, except by the kill switch: engaging it still engages it, and may already have deleted pending orders.

503engine_busy

The account's engine host has too many calls in flight (256). Nothing was done; try again.

503engine_unavailable

The account's engine host is not connected to Pipsocket, or disconnected while the call waited. A trade it already had is still settled: look it up.

503no_price

The terminal has no price for the symbol yet (it waited 2 seconds).

503terminal_error

The terminal did not give the answer asked for.

504engine_timeout

The account's engine did not answer within 30 seconds.

504terminal_timeout

The account's terminal did not answer within 5 seconds.