Developer Portal

List PositionsGET

Returns position history for the authenticated user

View as Markdown
GET
/accounts/{account_id}/history/positions

Authorization

AuthorizationRequiredBearer <token>

JWT token obtained from the login endpoint

In: header

Path Parameters

account_idRequiredstring

Account ID to fetch position history for

Query Parameters

fromstring

From date created to fetch position history for

toRequiredstring

To date created to fetch position history for

curl -X GET "http://localhost:8081/api/v1/accounts/acc_123456/history/positions?from=2025-08-03&to=2025-08-03" \
  -H "Authorization: Bearer <token>"

Successfully retrieved position history

{
  "positions": [
    {
      "id": "pos_123456",
      "symbol_id": "EURUSD",
      "account_id": "acc_123456",
      "order_id": "ord_123456",
      "symbol_name": "EURUSD",
      "open_price": 1.085,
      "close_price": 1.086,
      "side": "TRADE_SIDE_BUY",
      "status": "POSITION_STATUS_OPEN",
      "is_closing": false,
      "commission": 2.5,
      "swap": -0.15,
      "profit": 100,
      "units": 100000,
      "qty": 1,
      "qty_closed": 0,
      "comment": "Manual trade",
      "created_at": "2025-01-01T12:00:00Z",
      "updated_at": "2025-01-01T12:30:00Z",
      "funding_accrued": -1.25
    }
  ]
}