Retrieving positions

Prerequisites

Once you have an active user with an account group and a corresponding open account, you can already query positions for the account.##

List positions

You can query positions in two different ways: per instrument ID or as a list of all positions per account.

List positions with

GET /accounts/{account_id}/positions

Example response

{
  "meta": {
    "offset": 0,
    "limit": 100,
    "count": 1,
    "total_count": 1,
    "sort": "id",
    "order": "ASC"
  },
  "data": [
    {
      "account_id": "c5161455-4d27-4781-bc74-f05532e49a77",
      "instrument": {
        "isin": "US0378331005",
        "uuid": "ccb86937-8a39-4160-8d33-85bf9e902321"
      },
      "quantity": "10.4",
      "locked_for_trading": "5",
      "pending_settlement": "0",
      "available_for_trading": "5.4"
    }
  ]
} 

Get position by ID

Retrieve a single position by instrument ID with

GET /accounts/{account_id}/positions/{instrument_id}

Example response

{
  "account_id": "c5161455-4d27-4781-bc74-f05532e49a77",
  "instrument": {
    "isin": "US0378331005",
    "uuid": "ccb86937-8a39-4160-8d33-85bf9e902321"
  },
  "quantity": "10.4",
  "locked_for_trading": "5",
  "pending_settlement": "0",
  "available_for_trading": "5.4"
}

Was this page helpful?