@sangaman/xud
Version:
Exchange Union Daemon
23 lines • 788 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const command_1 = require("../command");
const xudrpc_pb_1 = require("../../proto/xudrpc_pb");
exports.command = 'getorders <pair_id> [max_results]';
exports.describe = 'get orders from the order book';
exports.builder = {
pair_id: {
type: 'string',
},
max_results: {
default: 10,
description: 'max # of orders to return, 0 = no limit',
type: 'number',
},
};
exports.handler = (argv) => {
const request = new xudrpc_pb_1.GetOrdersRequest();
request.setPairId(argv.pair_id);
request.setMaxResults(argv.max_results);
command_1.loadXudClient(argv).getOrders(request, command_1.callback);
};
//# sourceMappingURL=getorders.js.map