mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
fix: reverse Kline entries in mapKlines function to maintain chronological order
This commit is contained in:
@@ -1162,7 +1162,7 @@ function mapTicker(response: IApiTickerResponse, symbol: string): AsterTicker |
|
||||
}
|
||||
|
||||
function mapKlines(response: IApiCandlestickResponse, symbol: string): AsterKline[] {
|
||||
return (response.result ?? []).map((entry) => ({
|
||||
return (response.result ?? []).reverse().map((entry) => ({
|
||||
openTime: nsToMs(entry.open_time ?? Date.now() * ONE_SECOND_IN_NANOSECONDS),
|
||||
closeTime: nsToMs(entry.close_time ?? Date.now() * ONE_SECOND_IN_NANOSECONDS),
|
||||
open: entry.open ?? "0",
|
||||
|
||||
Reference in New Issue
Block a user