Candle Detection
Candle Detection
GET
/charts/candle-info
This API provides the latest 30 candlesticks of a token to analyze and identify candlestick patterns. It supports data retrieval for three specific time intervals: 1-hour, 4-hour, and 1-day.
Example on DeFi Lens: https://defilens.ai/tokens/bitcoin/candle-detection
Headers
Name
Typy
Description
x-partner-key
string
Your API Key
Ex: xxxx
Body
Name
Type
Description
ohlcDataList
string
Latest 30 candles of the source token
Example request
curl-X'GET'\'https://api.defilens.ai/charts/candle-info?ohlcDataList=[{"timestamp":1722898800000,"open":54695.87,"high":55082,"low":53876.47,"close":54018.81,"volume":93123605.0730397,"turnover":5067627113901.133,"date":"2024-08-05T23:00:00.000Z"},{"timestamp":1722902400000,"open":54018.82,"high":56064.21,"low":53950,"close":56038,"volume":222477592.8350171,"turnover":12240218251780.709,"date":"2024-08-06T00:00:00.000Z"},{"timestamp":1722906000000,"open":56037.99,"high":56276,"low":55436,"close":55723.98,"volume":164161545.5045277,"turnover":9171458073808.113,"date":"2024-08-06T01:00:00.000Z"}]'\-H'accept:*/*'
Response
{
"data": [
{
"1722837600000": {
"type": "BH",
"pattern_slug": "bullish_hammer",
"name": "Bullish Hammer candlestick"
}
},
{
"1722855600000": {
"type": "BD",
"pattern_slug": "basic_doji",
"name": "Doji candlestick"
}
},
{
"1722891600000": {
"type": "BD",
"pattern_slug": "basic_doji",
"name": "Doji candlestick"
}
}
],
"draftData": {
"1722801600000": {},
"1722805200000": {},
"1722808800000": {},
"1722812400000": {},
"1722816000000": {},
"1722819600000": {},
"1722823200000": {},
"1722826800000": {},
"1722830400000": {},
"1722834000000": {},
"1722837600000": {
"bullish_hammer": {
"type": "bullish_hammer",
"metadata": {
"description": [
"hint the start of potential reversal",
"hint the start of bullish pattern"
]
},
"name": "Bullish Hammer candlestick"
}
},
"1722841200000": {},
"1722844800000": {},
"1722848400000": {},
"1722852000000": {},
"1722855600000": {
"basic_doji": {
"type": "basic_doji",
"metadata": {
"description": [
"hint the start of potential reversal"
]
},
"name": "Doji candlestick"
}
},
"1722859200000": {},
"1722862800000": {},
"1722866400000": {},
"1722870000000": {},
"1722873600000": {},
"1722877200000": {},
"1722880800000": {},
"1722884400000": {},
"1722888000000": {},
"1722891600000": {
"basic_doji": {
"type": "basic_doji",
"metadata": {
"description": [
"hint the start of potential reversal"
]
},
"name": "Doji candlestick"
}
},
"1722895200000": {},
"1722898800000": {},
"1722902400000": {},
"1722906000000": {}
}
}
Data return
Name
Type
Description
pattern_slug
string
A string identifier or "slug" that is unique to the type of candlestick pattern.
name
string
Name of the candlestick pattern
timestamp
(e.g., 1722837600000)
object
This represents the time at which the candlestick pattern was detected
type
string
Represents the shorthand code for the candlestick pattern detected
Example: "BH"
for Bullish Hammer
Last updated