UNPKG

sei-agent-kit

Version:

A package for building AI agents on the SEI blockchain

21 lines 1.13 kB
import { StructuredTool } from "langchain/tools"; import { z } from "zod"; const CitrexGetTradeHistoryInputSchema = z.object({ productSymbol: z.string().min(1).describe("The product symbol to get data for (e.g., 'btcperp', 'ethperp')"), quantity: z.number().int().min(1).max(500).optional().describe("The quantity of trades to fetch (maximum 500, default 10)"), }); export class SeiCitrexGetTradeHistoryTool extends StructuredTool { seiKit; name = "citrex_get_trade_history"; description = "Retrieves trade history for a product on the Citrex Protocol. This shows recent trades that have occurred for a specific trading pair. Returns an array of trades with details including timestamp, maker/taker information, price, quantity, fees, trade direction, and unique identifiers."; schema = CitrexGetTradeHistoryInputSchema; constructor(seiKit) { super(); this.seiKit = seiKit; } async _call(input) { const { productSymbol, quantity } = input; return this.seiKit.citrexGetTradeHistory(productSymbol, quantity); } } //# sourceMappingURL=getTradeHistory.js.map