v1

latestOpenAPI 3.1.02026-07-241653251.3 MB
Positions

List participant positions

Retrieve all positions for the specified participant maintained at zerohash.

get/positions/participant/{id}

Path parameters

idstring required
Example:CUST01

Participant code to filter positions for.

Query parameters

platform_codestring

Filters for positions based on the specific platform.

account_labelstring
Example:general

Filter by account label (e.g., general, sub_account_test). Account labels are used to categorize accounts under a participant. Each participant account_label maintains a separate balance and transaction history.

Headers

X-SCX-SIGNEDstring required

HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.

X-SCX-TIMESTAMPstring required
Example:1678901234

Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.

Response

Successfully retrieved positions for the requested participant.

Example response

{
  "message": [
    {
      "platform_code": "PLAT01",
      "participant_code": "CUST01",
      "account_label": "general",
      "asset": "BTC",
      "position_all_open_trades": "10.02",
      "position_accepted_trades_only": "10.02",
      "position_active_trades_only": "0",
      "trade_ids_list": [
        "0003eb17-43b8-4c40-aec5-317b1080d6c3",
        "1f9142b8-57f2-4b4a-8e72-b94df84cf4e9"
      ]
    }
  ]
}