sei-agent-kit
Version:
A package for building AI agents on the SEI blockchain
24 lines • 1.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeiCitrexGetTradeHistoryTool = void 0;
const tools_1 = require("langchain/tools");
const zod_1 = require("zod");
const CitrexGetTradeHistoryInputSchema = zod_1.z.object({
productSymbol: zod_1.z.string().min(1).describe("The product symbol to get data for (e.g., 'btcperp', 'ethperp')"),
quantity: zod_1.z.number().int().min(1).max(500).optional().describe("The quantity of trades to fetch (maximum 500, default 10)"),
});
class SeiCitrexGetTradeHistoryTool extends tools_1.StructuredTool {
constructor(seiKit) {
super();
this.seiKit = seiKit;
this.name = "citrex_get_trade_history";
this.description = "Retrieves trade history for a product on the Citrex Protocol. This shows recent trades that have occurred for a specific trading pair. Returns an array of trades with details including timestamp, maker/taker information, price, quantity, fees, trade direction, and unique identifiers.";
this.schema = CitrexGetTradeHistoryInputSchema;
}
async _call(input) {
const { productSymbol, quantity } = input;
return this.seiKit.citrexGetTradeHistory(productSymbol, quantity);
}
}
exports.SeiCitrexGetTradeHistoryTool = SeiCitrexGetTradeHistoryTool;
//# sourceMappingURL=getTradeHistory.js.map