Positions
Positions Request
This is a message sent to request a list of the users current positions.
Position Request Message
Name | Type | Comments |
---|---|---|
user_tag | string | Client 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
Name | Type | Comments |
---|---|---|
server_utc_timestamp | integer | Time at which the message was generated by the API |
user_tag | string | Client defined tag used to identify the request |
positions | Position[] | cf below |
Position
Object
Name | Type | Comments |
---|---|---|
symbol | string | Instrument name e.g BTC-USD |
deliverable_id | integer | |
product_type | string | option / perpetual_future / future |
timestamp | integer | μs utc timestamp when the position was last updated |
side | string | long / short |
size | float | Position Size |
average_entry_price | float | Average fill price |
mark_price | float | Current Mark Price |
upnl | float | Unrealised 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
Name | Type | Comments |
---|---|---|
server_utc_timestamp | integer | Time at which the message was generated by the API |
user_tag | string | Client defined tag used to identify the request |
error_code | integer | Numeric value of error |
message | string | Text explanation of error |
{
"positions_response": {
"server_utc_timestamp": "1213455667789",
"user_tag": "unique_request_id",
"error_code": "7",
"message": "position_information_not_available"
}
}