Developer Portal

List PositionsGET

Returns one page of closed-position history for the authenticated user, newest creation time first. There is no maximum date range. When more positions match, the response carries `next_token`; pass it back to fetch the next page. An absent `next_token` means this is the last page.

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

Inclusive start date (YYYY-MM-DD, UTC). Omit for all history.

toRequiredstring

Inclusive end date (YYYY-MM-DD, UTC).

limitinteger

Maximum number of positions to return in one page (default 25, max 500)

Default: 25Minimum: 1Maximum: 500
next_tokenstring

Opaque cursor from the previous page's next_token. Send it unchanged, with the same from/to; omit it for the first page.

curl -X GET "http://localhost:8081/api/v1/accounts/acc_123456/history/positions?from=2025-08-03&to=2025-08-03&limit=25&next_token=%3Cstring%3E" \
  -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,
      "current_price": 1.0865,
      "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
    }
  ],
  "next_token": "string"
}