List open positions
Your open positions as a point-in-time snapshot, largest position first.
- The body is identical to the
all_positionsframe thepositions:{user_id}WebSocket channel sends on join, so a REST read can seed state that the channel’supdated_positionsdeltas then keep current. This is a snapshot, not a feed: subscribe to the channel to hear about changes. - Not paginated: the list is bounded by the markets you hold a live position in, and there is no
cursor. - A market you traded and closed out can appear with
position"0.00"until it settles. - Positions are not marked to market.
GET
/api/v1/positionsParameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
market_ids |
query |
string | no | Comma-separated market UUIDs. Returns only positions in these markets; an id you hold no position in matches nothing. Omit for every open position. |
Responses
Section titled “Responses”| Status | Description | Schema |
|---|---|---|
200 |
Success | object |
400 |
A parameter was missing or invalid. | Error |
401 |
Missing, malformed or unrecognized signature, or a timestamp outside the 30-second window. Body: {“error”:“Missing or invalid API key credentials”} | Error |
403 |
The account behind this key is not active, for example it is pending approval or suspended. Body: {“error”:“Your account is suspended. Contact support.”}, the message naming the account’s status. | Error |
Example
Section titled “Example”Request:
curl --request GET \ --url 'https://demo.stxapp.io/api/v1/positions' \ --header 'X-STX-ACCESS-KEY: <key-id>' \ --header 'X-STX-ACCESS-TIMESTAMP: <unix-ms>' \ --header 'X-STX-ACCESS-SIGNATURE: <base64-ed25519>'Response 200:
{ "positions": [ { "account_id": "28417940-ecef-40a9-8816-cc055d7d846f", "average_open_premium": "-0.5800", "buy_order_liability": "34.8000", "contracts_settled": "0.00", "event_id": "24636b3d-f566-4dd3-8c8b-c1a6c2747789", "gross_pnl": "0.0000", "id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b", "market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b", "max_potential_fee": "0.9800", "max_potential_profit": "16.8000", "max_risk": "23.2000", "multiplier": null, "open_potential_fee": "0.0000", "open_potential_profit": "16.8000", "open_risk": "23.2000", "position": "40.00", "position_premium_liability": "-23.2000", "premium": "-23.2000", "sell_order_liability": "0.0000", "total_fee": "0.9800", "total_settlement_pnl": "0.0000" } ]}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
account_id |
uuid | The account the position belongs to. |
average_open_premium |
decimal | Average premium per contract for the open portion. In dollars. |
buy_order_liability |
decimal | Liability from your open buy orders on this market. In dollars. |
contracts_settled |
decimal | Contracts settled in the position so far. |
event_id |
uuid | The event the market belongs to. |
gross_pnl |
decimal | total_settlement_pnl plus any pending-close profit or loss that has not settled yet. In dollars. |
id |
uuid | The unique id of the position record. |
market_id |
uuid | The market the position is on. |
max_potential_fee |
decimal | Total potential fee across the position’s settlements. In dollars. |
max_potential_profit |
decimal | Total possible profit for the position if everything settles favorably. In dollars. |
max_risk |
decimal | Account-level risk on the position, netting in already settled profit and loss. In dollars. |
multiplier |
number | A combination position’s payout per dollar risked: max price over the buy-side average fill, floored to two places. null for any market that is not a combination. |
open_potential_fee |
decimal | Potential fee on the open contracts when they settle. In dollars. |
open_potential_profit |
decimal | Possible profit on the position’s open contracts. In dollars. |
open_risk |
decimal | Risk on the position’s open (unsettled) contracts. In dollars. |
position |
decimal | Net position in the market: positive if long (bought), negative if short (sold). Can be "0.00" for a market you have traded and closed out that has not settled yet. In contracts. |
position_premium_liability |
decimal | Liability from the position’s premium that counts against available balance. Routinely negative. In dollars. |
premium |
decimal | Total premium paid or received for the open portion of the position. In dollars. |
sell_order_liability |
decimal | Liability from your open sell orders on this market. In dollars. |
total_fee |
decimal | Total fees paid across the position’s settlements. In dollars. |
total_settlement_pnl |
decimal | Profit or loss realized from settlements so far. In dollars. |
Docs version v1.10.5

