Get All Funding Transactions

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

Retrieve a list funding transactions that have accrued to positions in your account.

Query Parameters

NameTypeDescription

limit

int

Limit on the number of results to return. Default: 100.

before

int

Pagination parameter. Return results that occurred before (older) than the specified ID (id from response body).

after

int

Pagination parameter. Return results that occurred after (newer) than the specified ID (id from response body).

start_date

timestamp

Search by minimum specified date time. Unix timestamp in ms.

end_date

timestamp

Search by maximum specified date time. Unix timestamp in ms.

Response Body

NameTypeDescription

id

int

sFOX-generated ID for the transaction. Use for before / after pagination.

currency

string

The currency of the transaction.

amount

number

Amount of the currency charged.

amount_usd

number

USD value of the amount at the time of the transaction.

date_added

datetime

Date the transaction was created.

date_updated

datetime

Date the transaction was last updated.

position_id

int

sFOX-generated ID of the PTS position that this transaction accrued to.

next_cursor

int

Newest transaction id of the results. Paginate to the next, newer page of results specifying after = this value.

prev_cursor

int

Oldest transaction id of the results. Paginate to the next, older page of results specifying before = this value.

Responses

200
{
    "data": [
        {
            "id": 2889941222331,
            "currency": "eth",
            "amount": 0.00011888,
            "amount_usd": 0.41202856,
            "date_added": "2024-03-21T20:39:00.000Z",
            "date_updated": "2024-03-21T20:39:00.000Z",
            "position_id": 253441111123
        },
        {
            "id": 2889941222330,
            "currency": "eth",
            "amount": 0.00011888,
            "amount_usd": 0.41218777,
            "date_added": "2024-03-21T19:37:00.000Z",
            "date_updated": "2024-03-21T19:37:00.000Z",
            "position_id": 253441111123
        }
    ],
    "page": {
        "next_cursor": 2889941222331,
        "prev_cursor": 2889941222330
    }
}
400: Bad Request
//specify only one of 'before' and 'after'
{
    "error": "before and after are mutually excusive parameters"
}

//start_date must be a valid Unix timestamp in ms
{
    "error": "start_date must be a valid timestamp"
}

//end_date must be a valid Unix timestamp in ms
{
    "error": "start_date must be a valid timestamp"
}
401: Unauthorized
//invalid API key
{
    "error": "user lookup failed"
}
403: Forbidden
//your account does not have post-trade settlement enabled
{
    "error": "post trade settlement disabled"
}

Example Requests

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

Last updated