CO Historical Data
This interface serves as Cryptoracle's unified data retrieval endpoint for indicator data. It supports querying multiple indicators in a single request by accepting common parameters such as multiple tokens and time ranges. It is suitable for batch query scenarios to reduce the overhead of multiple API calls.
Important Notes:
Data start time: January 1, 2025
All time fields must use the current time (UTC+8, Beijing Time) in the format: YYYY-MM-DD HH:mm:ss
Multiple tokens and indicators can be queried in a single request to improve efficiency, with a maximum of 2000 records returned per API call
If additional parameters are required for specific indicators, please pass them in the extraParams field according to the specified structure
Please ensure the indicator codes in the endpoints array are accurate, as incorrect codes may cause request failures or return empty data
This interface is designed to enhance flexibility and efficiency in multi-indicator and multi-token usage scenarios
Request URL
text
POST /v2/endpointCommon Request Parameters
Parameter Name
Type
Required
Description
token
List
Yes
Collection of token names. Example: ["BTC","ETH"]
startTime
string
Yes
Start time in the format yyyy-MM-dd HH:mm:ss
endTime
string
Yes
End time in the format yyyy-MM-dd HH:mm:ss
timeType
string
Yes
Time granularity. Optional values: 15m (15 minutes), 1h (1 hour), 4h (4 hours), 1d (1 day). Specifies the time interval for data aggregation.
endpoints
List
Yes
Specified indicators. Example: ["CO-A-01-01","CO-A-01-02"]
tags
List
No
Specified tags. Example: ["CO-B-03-01","CO-B-03-05"]
extraParams
List
No
List of additional parameters for passing non-common parameters (refer to specific indicator definitions for details)
Extended Parameter Structure (for use in extraParams)
Parameter Name
Type
Required
Description
endpoint
String
No
Specifies the target indicator code for the parameters (e.g., CO-A-01-01)
param
Object
No
Object containing the extended parameters required by the specified indicator. Refer to the respective indicator's parameter definition for specific content.
Responses
Parameter Name
Type
Description
token
string
Token name
startTime
string
Start time
endTime
string
End time
timeType
string
Time granularity (matches the request)
timePeriods
List
Collection of time periods (see structure below)
Time Periods Structure (timePeriods)
Parameter Name
Type
Description
startTime
string
Start time of the period (yyyy-MM-dd HH:mm:ss)
endTime
string
End time of the period (yyyy-MM-dd HH:mm:ss)
data
List
Collection of indicator data points for the period. Example: [{"endpoint": "CO-A-01-01", "value": "1"}, {"endpoint": "CO-A-01-02", "value": "1.22"}]
Request Example
json
Response Example
json
最后更新于