Skip to main content

Positions

Positions Request

This is a message sent to request a list of the users current positions.

Position Request Message

NameTypeComments
user_tagstringClient defined tag used to identify the request

Example

{
"positions": {
"user_tag": "unique_request_id"
}
}

Positions Response

This is a response to a position request message.

Positions Response Message

NameTypeComments
server_utc_timestampintegerTime at which the message was generated by the API
user_tagstringClient defined tag used to identify the request
positionsPosition[]cf below

Position Object

NameTypeComments
symbolstringInstrument name e.g BTC-USD
deliverable_idinteger
product_typestringoption / perpetual_future / future
timestampintegerμs utc timestamp when the position was last updated
sidestringlong / short
sizefloatPosition Size
average_entry_pricefloatAverage fill price
mark_pricefloatCurrent Mark Price
upnlfloatUnrealised PNL

Example

{
"positions_response": {
"server_utc_timestamp": "1670226488262011",
"user_tag": "unique_request_id",
"positions": [
{
"symbol": "BTC-20230630-22000C",
"deliverable_id": "1825",
"product_type": "option",
"timestamp": "1670226487671223000",
"side": "long",
"size": "0.1",
"mark_price": "1769.4993075949",
"average_entry_price": "7975",
"upnl": "-620.55006924051"
},
{
"symbol": "ETH-20230331",
"deliverable_id": "493",
"product_type": "future",
"timestamp": "1670226487671223000",
"side": "short",
"size": "-0.1",
"mark_price": "1294.52",
"average_entry_price": "1181.0000186256",
"upnl": "-11.35199813744"
},
{
"symbol": "BTC-USD-PERPETUAL",
"deliverable_id": "24",
"product_type": "perpetual_future",
"timestamp": "1670226487671223000",
"side": "short",
"size": "-6.1",
"mark_price": "17342.11",
"average_entry_price": "16700.8901639345",
"upnl": "-3911.44099999955"
}
]
}
}

Position Response Error Message

NameTypeComments
server_utc_timestampintegerTime at which the message was generated by the API
user_tagstringClient defined tag used to identify the request
error_codeintegerNumeric value of error
messagestringText explanation of error
{
"positions_response": {
"server_utc_timestamp": "1213455667789",
"user_tag": "unique_request_id",
"error_code": "7",
"message": "position_information_not_available"
}
}