Get All Positions

GET https://api.sfox.com/v1/post-trade-settlement/positions

Retrieve a list of your account's positions.

Rate Limit: 10 requests per 10 seconds

Query Parameters

NameTypeDescription

status

String

Filter response by position status

active (default) = active positions

closed = settlement history

pair

String

Filter response by currency pair associated with the position i.e. btcusd

loan_currency

String

Filter response by loan currency i.e. btc

collateral_currency

String

Filter response by collateral currency i.e. btc

margin_type

String

Filter response by margin type

PTS_SHORT = short positions

PTS_LONG = long positions

from

String

Starting UNIX timestamp (in millis)

to

String

Ending UNIX timestamp (in millis)

page_size

String

The number of positions sent in the request. Default/Max = 100

page_cursor

String

The last Position Id of the previous page. The request will contain orders following the cursor.

Response Body

KeyDescription

id

Position ID

status

The status of the position ACTIVE : Outstanding pending settlement CLOSED : Settled

date_added

Date and time the position was opened

date_loan_closed

The date and time the position was settled (null if position is active)

loan_currency_symbol

Currency borrowed

current_loan_qty

The amount currently awaiting settlement including interest if applicable

collateral_currency

Order proceeds currency

pair

Currency pair traded to open the position

interest_rate

The annualized interest rate of the borrowed currency

interest_qty

The amount of interest that has been charged to this position in terms of the currency borrowed

margin_type

Long or short

order_id_open

The ID of the order that opened the position

order_id_close

The ID of the order that closed/settled the position, if applicable (null if position is active or settled via transfer)

proceeds

Proceeds of the collateral currency as a result of this position

vwap

Open Price. The fill price of the order that opened the position

Responses

200
{
    "id": 3065,
    "status": "ACTIVE",
    "date_added": "2022-06-01T19:49:53.000Z",
    "date_loan_closed": null,
    "loan_currency_symbol": "btc",
    "current_loan_qty": 0.03349122,
    "collateral_currency": "usd",
    "pair": "btcusd",
    "interest_rate": 0.1,
    "interest_qty": 0.0000931,
    "margin_type": "PTS_SHORT",
    "order_id_open": 1117465,
    "order_id_close": null,
    "proceeds": 1003.651384,
    "vwap": 29967.597
}

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' \
https://api.sfox.com/v1/post-trade-settlement/positions

Last updated