sei-agent-kit
Version:
A package for building AI agents on the SEI blockchain
23 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeiCitrexCancelOpenOrdersForProductTool = void 0;
const tools_1 = require("langchain/tools");
const zod_1 = require("zod");
const CitrexCancelOpenOrdersForProductInputSchema = zod_1.z.object({
productId: zod_1.z.number().int().positive().describe("The product ID of the orders to be cancelled"),
});
class SeiCitrexCancelOpenOrdersForProductTool extends tools_1.StructuredTool {
constructor(seiKit) {
super();
this.seiKit = seiKit;
this.name = "citrex_cancel_open_orders_for_product";
this.description = "Cancels all open orders for a specific product on the Citrex Protocol. This is useful for quickly closing all positions for a particular trading pair. Returns a success flag indicating whether the operation was successful.";
this.schema = CitrexCancelOpenOrdersForProductInputSchema;
}
async _call(input) {
const { productId } = input;
return this.seiKit.citrexCancelOpenOrdersForProduct(productId);
}
}
exports.SeiCitrexCancelOpenOrdersForProductTool = SeiCitrexCancelOpenOrdersForProductTool;
//# sourceMappingURL=cancelOpenOrdersForProduct.js.map