UNPKG

sei-agent-kit

Version:

A package for building AI agents on the SEI blockchain

23 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SeiCitrexListPositionsTool = void 0; const tools_1 = require("langchain/tools"); const zod_1 = require("zod"); const CitrexListPositionsInputSchema = zod_1.z.object({ productSymbol: zod_1.z.string().min(1).optional().describe("Optional product symbol to filter by (e.g., 'btcperp', 'ethperp')"), }); class SeiCitrexListPositionsTool extends tools_1.StructuredTool { constructor(seiKit) { super(); this.seiKit = seiKit; this.name = "citrex_list_positions"; this.description = "Lists all positions for the account and sub-account on the Citrex Protocol. Can be filtered by product symbol. Returns an array of positions with details including account address, position quantity, entry price, liquidation price, mark price, accrued funding, margin, PnL, and product information."; this.schema = CitrexListPositionsInputSchema; } async _call(input) { const { productSymbol } = input; return this.seiKit.citrexListPositions(productSymbol); } } exports.SeiCitrexListPositionsTool = SeiCitrexListPositionsTool; //# sourceMappingURL=listPositions.js.map