Developer Portal

Get PortfolioGET

Return the account portfolio snapshot, including balance, equity, margin, and related trading state values.

View as Markdown
GET
/portfolios/{id}

Authorization

Authorization<token>

Bearer access token issued by the admin login flow.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://example.com/portfolios/<string>" \
  -H "Authorization: <token>"

A successful response.

{
  "accountId": "string",
  "currency": "string",
  "balance": 0.1,
  "unrealizedPnl": 0.1,
  "usedMargin": 0.1,
  "pendingMargin": 0.1,
  "accountVersion": "string",
  "inMarginCall": true,
  "inStopOut": true,
  "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
    }
  ],
  "orders": [
    {
      "id": "string",
      "accountId": "string",
      "groupId": "string",
      "symbolId": "string",
      "symbolName": "string",
      "positionId": "string",
      "clientOrderId": "string",
      "ipAddress": "string",
      "managerId": "string",
      "parentOrderId": "string",
      "cancelsOrderId": "string",
      "venueId": "string",
      "venueOrderId": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "expirationDate": "2019-08-24T14:15:22Z",
      "qtyOriginal": 0.1,
      "qtyFilled": 0.1,
      "seenPrice": 0.1,
      "limitPrice": 0.1,
      "stopPrice": 0.1,
      "slippage": 0.1,
      "isClosing": true,
      "trailingOffset": "string",
      "trailingStep": "string",
      "stopLossPts": "string",
      "takeProfitPts": "string",
      "stopLossPrice": 0.1,
      "takeProfitPrice": 0.1,
      "status": "ORDER_STATUS_UNSPECIFIED",
      "side": "TRADE_SIDE_UNSPECIFIED",
      "type": "ORDER_TYPE_UNSPECIFIED",
      "timeInForce": "ORDER_TIF_UNSPECIFIED",
      "comment": "string",
      "fillPrice": 0.1,
      "fillPriceRaw": 0.1,
      "unitsOriginal": 0.1,
      "unitsFilled": 0.1,
      "completed": true,
      "initialMargin": 0.1,
      "triggerQuote": {
        "symbolId": "string",
        "bid": 0.1,
        "ask": 0.1,
        "volume": "string",
        "datetime": "2019-08-24T14:15:22Z"
      },
      "md": "string"
    }
  ],
  "groupId": "string",
  "usdPnl": 0.1,
  "maxLeverage": "string",
  "status": "TRADE_STATUS_UNSPECIFIED",
  "isSb": true,
  "isDemo": true,
  "profileId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "nop": 0.1,
  "marginCalcTypeOverride": "MARGIN_CALC_TYPE_UNSPECIFIED",
  "dailyStatement": true
}