Skip to main content

Candlesticks

Retrieve candlestick data for specified symbols and intervals.

Endpoint

GET /candlesticks

Parameters

note
  • A maximum of 500 candlesticks can be retrieved per request.
ParameterTypeRequiredDescription
symbol_namestringYesThe trading pair symbol (e.g., ONX_USDT).
intervalstringYesThe time interval for candlesticks (Interval Name).
fromint64YesStart time in milliseconds since epoch.
toint64YesEnd time in milliseconds since epoch.

Response

JSON Array of Objects


Response Fields

FieldTypeDescription
sstringSymbol name (e.g., ETH_USDT).
istringInterval.
ostringOpen price.
hstringHigh price.
lstringLow price.
cstringClose price.
bstringBase volume (e.g., total volume of ETH for ETH_USDT).
qstringQuote volume (e.g., total volume of USDT for ETH_USDT).
tstringStart time of the candlestick (timestamp in milliseconds).
ustringLast updated time of the candlestick (timestamp in milliseconds).

Example Usage

curl --location 'https://spot-markets-dev.goonus.io/candlesticks?symbol_name=ONX_USDT&interval=5m&from=1725937488000&to=1837403913011'

Response Example

[
{
"s": "ETH_USDT",
"i": "1m",
"o": "2.0000000",
"h": "2.0000000",
"l": "2.0000000",
"c": "2.0000000",
"b": "0.000",
"q": "0.00000000",
"t": "1720754160000",
"u": "1720754160000"
},
{
"s": "ETH_USDT",
"i": "1m",
"o": "2.0000000",
"h": "2.0000000",
"l": "2.0000000",
"c": "2.0000000",
"b": "0.000",
"q": "0.00000000",
"t": "1720754100000",
"u": "1720754100000"
}
]