We are building a workflow that pulls kline (candlestick) data from Binance for 10 different crypto assets (BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, ADAUSDT, DOTUSDT, AVAXUSDT, LINKUSDT, DOGEUSDT, and SHIBUSDT) on different intervals (15 m, 1 h, and 1 d). The process is as follows:
- Ticker List Preparation:
A “loop” (or “Set”) node outputs an array of objects, each with a keyticker
that holds one of the asset symbols. This part is working correctly. - HTTP Request Node(s):
We then use an HTTP Request node (or nodes) configured to call the Binance API with a URL similar to:
bash
Copy
https://api.binance.com/api/v3/klines?symbol={{ $json["ticker"] }}&interval=15m&limit=50
(and similar for 1 h and 1 d, with adjusted interval and limit).
The expectation is that the ticker value from the previous node is injected into the URL so that the Binance API returns the corresponding klines data for each asset.
3. Ticker Loss and “Unknown” Values:
The Binance API’s response, however, does not include the ticker symbol. With the node set to “Always Output Data” (or “Keep Input Data”), we expect the original ticker (or a copy, e.g. originalTicker
) to be preserved in each item. Instead, after processing through a Code (transformation) node intended to reattach the ticker, the output shows that the ticker is coming through as "unknown"
.
For example, a 15‑minute data item ends up looking like:
json
Copy
{
"ticker": "unknown",
"timeframe": "15m",
"klines": [ ... Binance kline array ... ]
}
When these items are merged later (by ticker), the merge node only sees valid data (or data for BTCUSDT) and the rest of the tickers either come through as empty or “unknown.”
4. Merging Issue:
Finally, our merge node (which aggregates data for each ticker from all timeframes) outputs a merged object for each ticker. However, because the ticker is lost (or overwritten) by the HTTP response, most of the merged items have an empty binanceData
or the ticker field set to "unknown"
, except for data that somehow correctly carried through (e.g. BTCUSDT).
What We’ve Tried:
- We ensured the initial loop/set node correctly outputs the list of tickers.
- We attempted to “preserve” the ticker value by copying it to an
originalTicker
field before the HTTP Request. - We used the HTTP Request node’s Query Parameters feature to pass the ticker in (e.g.,
symbol: {{$json["ticker"]}}
). - We enabled “Always Output Data” to try and keep the original input data together with the API response.
- A Code node was added afterward with logic to reattach the ticker and add a timeframe label.
- Despite all of this, the output from the transformation node (and, consequently, the merge node) shows the ticker as
"unknown"
for most assets except possibly BTCUSDT.
Possible Causes:
- Loss of Ticker Field: The Binance API response does not include the ticker field, so if the HTTP Request node isn’t configured to “keep” the input data, the original ticker value may be overwritten.
- Improper Use of Templating/Query Parameters: Using templated URLs without properly preserving the original JSON might be causing the ticker value to be lost.
- Data Flow/Node Settings: In some cases, the node settings (like “Always Output Data” or the handling of the response as a raw array) might be replacing the entire item with the API response instead of merging it with the ticker.
What We Need Help With:
We would like guidance on how to configure the HTTP Request node and any following transformation nodes so that the original ticker (asset symbol) is preserved and reattached to the Binance API response data. We want each item to eventually look like this (using 15m as an example):
json
Copy
{
"ticker": "BTCUSDT",
"timeframe": "15m",
"klines": [
[timestamp, open, high, low, close, volume, ...],
...
]
}
And then have the merge node combine data from 15m, 1h, and 1d nodes for each ticker into a single object under binanceData
.
Any advice on preserving the ticker and correctly merging the data for all 10 assets would be appreciated.