Skip to content

Commit 2b021fe

Browse files
committed
fix(hyperliquid): default fetchOHLCV params to {} so server dispatch survives
Server's flat-body dispatch passes a single merged object as args[0], leaving args[1] undefined. The other HL read methods make params optional; OHLCV did not, so calls without explicit start/end crashed with 'Cannot read properties of undefined (reading start)'. Reproduces via MCP: pmxt.fetchOHLCV({exchange:'hyperliquid', outcomeId:'hl-outcome-172', resolution:'1h'}).
1 parent 3384cc6 commit 2b021fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/exchanges/hyperliquid/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class HyperliquidExchange extends PredictionMarketExchange {
145145
return this.normalizer.normalizeOrderBook(raw, outcomeId);
146146
}
147147

148-
async fetchOHLCV(outcomeId: string, params: OHLCVParams): Promise<PriceCandle[]> {
148+
async fetchOHLCV(outcomeId: string, params: OHLCVParams = {}): Promise<PriceCandle[]> {
149149
const raw = await this.fetcher.fetchRawOHLCV(outcomeId, params);
150150
return this.normalizer.normalizeOHLCV(raw, params);
151151
}

0 commit comments

Comments
 (0)