From 9cfe3d423cb36b06ed7d743de35aa53c2c7874fa Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Wed, 30 Jul 2025 12:35:48 -0500 Subject: [PATCH] fix: align candle snapshot tool schema with Hyperliquid API - Change schema to expect 'coin' parameter instead of 'symbol' - Remove unnecessary transform in candleSnapshotSchema - Update tool definition and README to use 'coin' parameter - Fixes validation error when calling get_candle_snapshot tool --- src/schemas.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/schemas.ts b/src/schemas.ts index aeff3ac..13ef979 100644 --- a/src/schemas.ts +++ b/src/schemas.ts @@ -2,18 +2,12 @@ import { z } from "zod"; export const candleSnapshotSchema = z .object({ - symbol: z.string({ required_error: "Symbol must be a string" }), + coin: z.string({ required_error: "Coin must be a string" }), interval: z.string({ required_error: "Interval must be a string" }), startTime: z.number({ required_error: "Start time must be a number" }), endTime: z.number().nullable().optional(), }) - .strict() - .transform((data) => ({ - coin: data.symbol, - interval: data.interval, - startTime: data.startTime, - endTime: data.endTime, - })); + .strict(); export const l2BookSchema = z .object({