Skip to content

Positions

Retrieve all open positions, optionally filtered by symbol. Position data is served from cache with real-time push updates, so responses reflect the latest state without delay.

GET /v1/positions

ParameterTypeRequiredDescription
symbolstringNoFilter positions by symbol (e.g., ?symbol=EURUSD)
Terminal window
curl -X GET "https://interface.xbtfx.com/v1/positions?symbol=EURUSD" \
-H "Authorization: Bearer your_api_key_here"
[
{
"ticket": 12345678,
"symbol": "EURUSD",
"side": "buy",
"volume": 0.1,
"price_open": 1.08757,
"price_current": 1.08890,
"sl": 1.08000,
"tp": 1.09500,
"profit": 13.30,
"swap": -0.52
}
]
FieldTypeDescription
ticketintegerPosition ticket number (unique identifier)
symbolstringTrading symbol
sidestringPosition direction: buy or sell
volumenumberPosition volume in lots
price_opennumberEntry price
price_currentnumberCurrent market price
slnumberStop loss price (0 if not set)
tpnumberTake profit price (0 if not set)
profitnumberUnrealized profit/loss
swapnumberAccumulated swap charges