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
Name Type Description Limit on the number of results to return. Default: 100.
Pagination parameter. Return results that occurred before (older) than the specified ID (id
from response body).
Pagination parameter. Return results that occurred after (newer) than the specified ID (id
from response body).
Search by minimum specified date time. Unix timestamp in ms.
Search by maximum specified date time. Unix timestamp in ms.
Response Body
Name Type Description sFOX-generated ID for the transaction. Use for before
/ after
pagination.
The currency of the transaction.
Amount of the currency charged.
USD value of the amount at the time of the transaction.
Date the transaction was created.
Date the transaction was last updated.
sFOX-generated ID of the PTS position that this transaction accrued to.
Newest transaction id
of the results. Paginate to the next, newer page of results specifying after
= this value.
Oldest transaction id
of the results. Paginate to the next, older page of results specifying before
= this value.
Responses
200
Copy {
"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
Copy //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
Copy //invalid API key
{
"error" : "user lookup failed"
}
403 : Forbidden
Copy //your account does not have post-trade settlement enabled
{
"error" : "post trade settlement disabled"
}
Example Requests
Shell NodeJS Python
Copy curl -H 'Authorization: Bearer <API_TOKEN>' \
https://api.sfox.com/v1/post-trade-settlement/interest/history
Copy const axios = require ( 'axios' );
axios ({
method : 'get' ,
url : 'https://api.sfox.com/v1/post-trade-settlement/interest/history' ,
headers : {
'Authorization' : 'Bearer <API_KEY>'
}
}) .then (response => {
console .log (response)
}) .catch (err => {
console .error (err)
});
Copy import requests
data = requests . get (
"https://api.sfox.com/v1/post-trade-settlement/interest/history" ,
headers = {
"Authorization" : "Bearer <API_KEY>" ,
}
)
print (data)
Last updated 7 months ago