sei-agent-kit
Version:
A package for building AI agents on the SEI blockchain
20 lines • 1.03 kB
JavaScript
import { StructuredTool } from "langchain/tools";
import { z } from "zod";
const CitrexListOpenOrdersInputSchema = z.object({
productSymbol: z.string().min(1).optional().describe("Optional product symbol to filter by (e.g., 'btcperp', 'ethperp')"),
});
export class SeiCitrexListOpenOrdersTool extends StructuredTool {
seiKit;
name = "citrex_list_open_orders";
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.";
schema = CitrexListOpenOrdersInputSchema;
constructor(seiKit) {
super();
this.seiKit = seiKit;
}
async _call(input) {
const { productSymbol } = input;
return this.seiKit.citrexListOpenOrders(productSymbol);
}
}
//# sourceMappingURL=listOpenOrders.js.map