Rate Data Collection Frequency
The data collection frequency can be configured in the cron configuration. The data is stored at different frequencies depending on its proximity to the current moment. Below is a description of the periods and the recommended data collection frequency.
Hour
(last hour): Information is saved every minute and stored with a limit of 60 entries. Older entries are removed from the cache.Day
(last day): Information is saved twice an hour and stored with a limit of 60 entries. Older entries are removed from the cache.Week
(last week): Information is saved every three hours and stored with a limit of 60 entries. Older entries are removed from the cache.Month
(last month): Information is saved every 12 hours and stored with a limit of 60 entries. Older entries are removed from the cache.Eternity
: Information is collected once a day since the launch of the rate service. Data is not removed from the cache.
JSON cache
Historical
Swagger Rates History
Request Structure
/rate-history-{period}-{chain}.json
/rate-history-{period}-{chain}-{contract}.json
Response Structure
Request Example
https://cloud.spatium.net/rate-info/v1/static/rate-history-day-btc.json
Response Example
Latest
Swagger Rates Latest
Latest Coins Rates
Request Structure
/rates-coin.json
Response Structure
{
"{chain}": {
"{fiat}": number,
"{fiat}": number,
},
"{chain}": {
"{fiat}": number,
"{fiat}": number,
}
}
Request Example
https://cloud.spatium.net/rate-info/v1/static/rates-coin.json
Response Example
Latest ERC20 Token Rates
Request Structure
/rates-erc20.json
Response Structure
{
"{chain}-{contract}": {
"{fiat}": number,
"{fiat}": number,
},
"{chain}-{contract}": {
"{fiat}": number,
"{fiat}": number,
}
}
Request Example
https://cloud.spatium.net/rate-info/v1/static/rates-erc20.json