MCPcopy Create free account
hub / github.com/ccxt/ccxt / batchOrdersRequest

Method batchOrdersRequest

js/src/pacifica.js:1428–1473  ·  view source on GitHub ↗
(actions)

Source from the content-addressed store, hash-verified

1426 return [request, operationType];
1427 }
1428 batchOrdersRequest(actions) {
1429 //
1430 // [
1431 // {
1432 // "type":"Create",
1433 // "data":{
1434 // "account":"42trU9A5...",
1435 // "signature":"5UpRZ14Q...",
1436 // "timestamp":1749190500355,
1437 // "expiry_window":5000,
1438 // "symbol":"BTC",
1439 // "price":"100000",
1440 // "reduce_only":false,
1441 // "amount":"0.1",
1442 // "side":"bid",
1443 // "tif":"GTC",
1444 // "client_order_id":"57a5efb1-bb96-49a5-8bfd-f25d5f22bc7e"
1445 // }
1446 // },
1447 // {
1448 // "type":"Cancel",
1449 // "data":{
1450 // "account":"42trU9A5...",
1451 // "signature":"4NDFHyTG...",
1452 // "timestamp":1749190500355,
1453 // "expiry_window":5000,
1454 // "symbol":"BTC",
1455 // "order_id":42069
1456 // }
1457 // }
1458 // ]
1459 //
1460 // Create (Only Limit or Market, never stop order or tpsl order)
1461 // Cancel (Only common (limit) orders)
1462 //
1463 const lenActions = actions.length;
1464 const maxLen = this.handleOption('batchOrdersRequest', 'batchOrdersMax');
1465 if (maxLen !== undefined) {
1466 if (lenActions > maxLen) {
1467 throw new ExchangeError(this.id + ' batchOrdersRequest() too many orders to create/cancel. Limit is ' + maxLen);
1468 }
1469 }
1470 return {
1471 'actions': actions,
1472 };
1473 }
1474 createOrdersRequest(orders, params = {}) {
1475 const actions = [];
1476 const timestamp = this.milliseconds(); // unified sequence

Callers 2

createOrdersRequestMethod · 0.95
cancelOrdersRequestMethod · 0.95

Calls 1

handleOptionMethod · 0.45

Tested by

no test coverage detected