UNPKG

sei-agent-kit

Version:

A package for building AI agents on the SEI blockchain

22 lines 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SeiCitrexGetOrderBookTool = void 0; const tools_1 = require("langchain/tools"); const zod_1 = require("zod"); const CitrexGetOrderBookInputSchema = zod_1.z.object({ symbol: zod_1.z.string().min(1), }); class SeiCitrexGetOrderBookTool extends tools_1.StructuredTool { constructor(seiKit) { super(); this.seiKit = seiKit; this.name = "citrex_get_order_book"; this.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."; this.schema = CitrexGetOrderBookInputSchema; } async _call(input) { return this.seiKit.citrexGetOrderBook(input.symbol); } } exports.SeiCitrexGetOrderBookTool = SeiCitrexGetOrderBookTool; //# sourceMappingURL=getOrderBook.js.map