Yellow BoxTrading APIv1 · pre-release

Trade

GETOpen positions (USER_DATA)

API Description

Every open position on the account. Under hedging a symbol can hold many, in both directions.

HTTP Request

HTTP
GET /v1/positions

Request Weight

1

Request Parameters

Name Type Mandatory Description
login LONG YES
symbol STRING NO Exact, case-sensitive.
recvWindow, timestamp, signature

Response Example

JSON
[
  {
    "login": 100123,
    "positionId": 44412345,
    "symbol": "XAUUSD",
    "side": "BUY",
    "volume": "0.10",
    "priceOpen": "2331.42",
    "priceCurrent": "2331.15",
    "sl": "2320.00",
    "tp": "2350.00",
    "profit": "-2.7000",
    "swap": "0.0000",
    "openTime": 1789012345000,
    "updateTime": 1789012400000,
    "comment": "signal-7"
  }
]
Field Type Description
positionId LONG MT5 position ticket. The handle for closing and for SL/TP changes.
side ENUM BUY / SELL.
volume DECIMAL Open volume, lots. Reduced by a partial close.
priceOpen DECIMAL Volume-weighted open price.
priceCurrent DECIMAL The trade server's current price for the position.
profit DECIMAL Floating profit, as the trade server computes it — spread, conversion and the symbol's contract terms included. In the account's deposit currency.
swap DECIMAL Swap accumulated on this position so far.
openTime / updateTime LONG Unix ms.
comment STRING The comment the position was opened with, as stored on MT5. For a position opened through this API that includes the service's correlation tag — see Comments and deal attribution.