UNPKG

sei-agent-kit

Version:

A package for building AI agents on the SEI blockchain

19 lines 855 B
import { StructuredTool } from "langchain/tools"; import { z } from "zod"; const CitrexGetOrderBookInputSchema = z.object({ symbol: z.string().min(1), }); export class SeiCitrexGetOrderBookTool extends StructuredTool { seiKit; name = "citrex_get_order_book"; description = "Retrieves the order book for a product from the Citrex Protocol. The symbol must be a valid product symbol from the Citrex Protocol. Example: ETH -> 'ethperp', BTC -> 'btcperp', etc. Returns the order book with arrays of asks and bids, each containing price, quantity, and cumulative quantity information."; schema = CitrexGetOrderBookInputSchema; constructor(seiKit) { super(); this.seiKit = seiKit; } async _call(input) { return this.seiKit.citrexGetOrderBook(input.symbol); } } //# sourceMappingURL=getOrderBook.js.map