sei-agent-kit
Version:
A package for building AI agents on the SEI blockchain
23 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeiCitrexListOpenOrdersTool = void 0;
const tools_1 = require("langchain/tools");
const zod_1 = require("zod");
const CitrexListOpenOrdersInputSchema = zod_1.z.object({
productSymbol: zod_1.z.string().min(1).optional().describe("Optional product symbol to filter by (e.g., 'btcperp', 'ethperp')"),
});
class SeiCitrexListOpenOrdersTool extends tools_1.StructuredTool {
constructor(seiKit) {
super();
this.seiKit = seiKit;
this.name = "citrex_list_open_orders";
this.description = "Lists all open orders for the account and sub-account on the Citrex Protocol. Can be filtered by product symbol. Returns an array of orders with details including order ID, account address, product information, price, quantity, residual quantity, order type, time in force, buy/sell direction, creation time, expiry, and status.";
this.schema = CitrexListOpenOrdersInputSchema;
}
async _call(input) {
const { productSymbol } = input;
return this.seiKit.citrexListOpenOrders(productSymbol);
}
}
exports.SeiCitrexListOpenOrdersTool = SeiCitrexListOpenOrdersTool;
//# sourceMappingURL=listOpenOrders.js.map