Developer Portal

Position HistoryGET

Return historical positions for the specified trading account within the requested date range.

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

Authorization

Authorization<token>

Bearer access token issued by the admin login flow.

In: header

Path Parameters

idRequiredstring

Query Parameters

fromstring
Format: "date-time"
tostring
Format: "date-time"
curl -X GET "https://example.com/accounts/<string>/history/positions?from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z" \
  -H "Authorization: <token>"

A successful response.

{
  "positions": [
    {
      "id": "string",
      "symbolId": "string",
      "accountId": "string",
      "orderId": "string",
      "symbolName": "string",
      "openPrice": 0.1,
      "openPriceRaw": 0.1,
      "closePrice": 0.1,
      "closePriceRaw": 0.1,
      "side": "TRADE_SIDE_UNSPECIFIED",
      "status": "POSITION_STATUS_UNSPECIFIED",
      "commission": 0.1,
      "swap": 0.1,
      "profit": 0.1,
      "units": 0.1,
      "qty": 0.1,
      "qtyClosed": 0.1,
      "comment": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "realizedPnl": 0.1,
      "unitsClosed": 0.1,
      "usdPnl": 0.1,
      "currentPrice": 0.1,
      "margin": 0.1,
      "fundingAccrued": 0.1
    }
  ]
}