getHistoryCandleStick
This API retrieves historical candlestick (K-line) data for a specified token address from the blockchain. Below is a detailed explanation of the endpoint, including request parameters.
Example Request
Here’s an example of calling the API using curl
:
Endpoint: /getHistoryCandleStick Method: GET Summary: Retrieve historical retrieve candlestick (K-line) data for a specific token.
Request Parameters
apiKey
String
Yes
API key for authentication
tokenAddress
String
Yes
Address of the token to query
CUUZJST5B8fs43ikm5adsQrw4qz5n4mAgEiTzii2pump
interval
Integer
Yes
Time interval between candlesticks (in minutes by default)
5
startTime
String
Yes
Start time of the query period
2025-03-05 02:00:00
endTime
String
No
End time of the query period (optional)
2025-03-05 12:00:00
zoneId
String
Yes
Time zone for timestamps
UTC
intervalType
String
Yes
Type of time interval (seconds, minutes, hours, days, months)
minutes
blockchain
String
Yes
Type of blockchain
solana
Response Structure
The response is a ResponseResult
object containing a List<DexTraderView>
when successful. The response includes a status code and message, as defined below:
Status Codes
200
SUCCESS
Operation completed successfully
405
VALIDATE_FAILED
Unauthorized or invalid API key
409
FAILED_INSUFFICIENT
Insufficient balance or resources
500
FAILED
Internal server error occurred
Data Fields (When Successful)
Each DexTraderView
object in the data
list represents a candlestick and has the following fields:
blockTime
String
The timestamp of the candlestick’s block, formatted as YYYY-MM-DD HH:MM:SS
.
close
BigDecimal
The closing price of the token at the end of the interval, with high precision.
max
BigDecimal
The highest price of the token during the interval.
min
BigDecimal
The lowest price of the token during the interval.
open
BigDecimal
The opening price of the token at the start of the interval.
volume
String
The total trading volume of the token during the interval, as a string for precision.
token
String
The address or identifier of the token associated with this candlestick.
Last updated