SaturnX
  • WELCOME
    • ☀️What is Saturnx?
    • Pricing with Rate limits
      • Prepaid Credits
      • Pay with Crypto
  • RPC Nodes
    • RPCs Overview
  • BLOCKCHAIN
    • Overview
    • HTTP
      • getHistoryCandleStick
      • getHistoryTransaction
      • getAccountTnx
      • getAccountTnxByToken
      • getHoldersTop
      • getHotPairs
      • getTokenSecurity
    • WebSocket
      • {blockchain}.broadcast.transactions
      • {blockchain}.broadcast.kline
    • Kafka
Powered by GitBook
On this page
  • Example Request
  • Request Parameters
  • Response Structure
  1. BLOCKCHAIN
  2. HTTP

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:

curl -L \
  --request GET \
  --url "https://api.saturnx.dev/api/process/getHistoryCandleStick?apiKey=111&tokenAddress=CUUZJST5B8fs43ikm5adsQrw4qz5n4mAgEiTzii2pump&interval=5&startTime=2025-03-05%2002:00:00&endTime=2025-03-05%2012:00:00&zoneId=UTC&intervalType=minutes&blockchain=solana" \
  --header "Content-Type: application/json"

Endpoint: /getHistoryCandleStick Method: GET Summary: Retrieve historical retrieve candlestick (K-line) data for a specific token.

Request Parameters

Parameter
Type
Required
Description
Example Value

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

Code
Status
Description

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:

Field
Type
Description

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.

PreviousHTTPNextgetHistoryTransaction

Last updated 1 month ago