GET
/
core
/
assets
/
{asset}
/
historical-rates
Get asset historical rates
curl --request GET \
  --url https://api.enterprise.sandbox.uphold.com/core/assets/{asset}/historical-rates \
  --header 'Authorization: Bearer <token>'
{
"historicalRates": {
"BTC": [
{
"rate": {
"mid": "27649.1865680048064515576"
},
"timestamp": "2021-07-01T00:00:00Z"
},
{
"rate": {
"mid": "28000.1234567890123456789"
},
"timestamp": "2021-07-02T00:00:00Z"
}
]
}
}

Denomination

The to query parameter allows you to denominate rates against another asset. If not passed, it defaults to USD.

There is a specific set of assets allowed, including but not limited to: USD, EUR, GBP, AUD, CAD, NZD, MXN, and BTC. If you need a particular asset added to this list, please contact us.

Interval

The interval query parameter determines the overall timespan of historical data and the frequency at which data points are aggregated (rolled up). Each interval value defines how far back in time the data spans, and how granular each returned data point is within that range:

IntervalDescriptionRollup Frequency
hourPast hour of historical data1 minute
dayPast day of historical data10 minutes
weekPast week of historical data1 hour
monthPast month of historical data6 hours
yearPast year of historical data2 days

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication.

Path Parameters

asset
string
required

The asset code.

Minimum length: 1

Query Parameters

denomination
string
default:USD

Specifies the asset code to use as the denomination for value conversion. If not provided, USD is used by default.

Minimum length: 1
to
string
default:USD
deprecated

The code of the asset for which historical rates are requested. Deprecated: Use the denomination parameter instead.

Minimum length: 1
interval
enum<string>
default:one-day

The interval for the historical rates.

Available options:
one-hour,
one-day,
one-week,
one-month,
one-year

Response

200
application/json

Historical rates retrieved.

The response is of type object.