Get Portfolio Valuation

USD valuation of your portfolio over time

Retrieve a history of the USD value of your account's portfolio at hourly or daily intervals

Retrieve Portfolio Valuation History

GET https://api.sfox.com/v1/account/balance/history

Query Parameters

NameTypeDescription

start_date*

Number

Timestamp of the start of the query

Unix timestamp (ms)

end_date

Number

Timestamp of the end of the query

Unix timestamp (ms)

interval

Number

Timeseries interval (sec)

Options:

3600 (hourly)

86400 (daily)

Default: 86400

{
    "data": [
        {
            "timestamp": 1701475200000,
            "usd_value": 349515.64495392627
        },
        {
            "timestamp": 1701561600000,
            "usd_value": 349628.6458040236
        },
        {
            "timestamp": 1701648000000,
            "usd_value": 349653.452981625
        },
        {
            "timestamp": 1701734400000,
            "usd_value": 349301.02066800353
        },
        {
            "timestamp": 1701820800000,
            "usd_value": 350066.51819476683
        },
        {
            "timestamp": 1701907200000,
            "usd_value": 350761.96052562393
        }
    ]
}

Response Body

KeyDescriptionExample

timestamp

Unix timestamp (ms) of the valuation

usd_value

USD valuation of your portfolio as of the timestamp

Example Request

curl -H 'Authorization: Bearer <API_TOKEN>'
'https://api.sfox.com/v1/account/balance/history?interval=86400&start_date=1701475200000&end_date=1701734400000'

Last updated