Skip to content

Commit 874c96c

Browse files
committed
Fix exchange
Signed-off-by: Herklos <herklos@drakkar.software>
1 parent f737b52 commit 874c96c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

rust/src/exchange.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,6 @@ pub trait Exchange: ValueTrait {
31743174
}
31753175
let mut request = if params.is_object() { params.clone() } else { Value::new_object() };
31763176
request.set("symbol".into(), symbol.clone());
3177-
request.set("timeframe".into(), timeframe.clone());
31783177
request.set("interval".into(), timeframe.clone());
31793178
if since.is_nonnullish() { request.set("since".into(), since.clone()); request.set("startTime".into(), since.clone()); }
31803179
if limit.is_nonnullish() { request.set("limit".into(), limit.clone()); }
@@ -3184,6 +3183,10 @@ pub trait Exchange: ValueTrait {
31843183
}
31853184
for token in ["klines", "candles", "ohlcv"] {
31863185
for (api_name, method_name, path_name) in &dynamic_calls {
3186+
// Skip non-public APIs (futures, options, etc.) — they require
3187+
// different params (e.g. 'pair' instead of 'symbol') and are not
3188+
// appropriate for generic spot OHLCV fetching.
3189+
if api_name.as_str() != "public" { continue; }
31873190
if method_name.as_str() != "GET" || path_name.contains('{') { continue; }
31883191
let p = path_name.to_lowercase();
31893192
if p == token || p.contains(token) {

0 commit comments

Comments
 (0)