Cascade
Orders

Submit Batch Orders

Submit a batch of Limit orders, a TWAP or Iceberg order, or a pair of TP/SL orders

Common rules: account, subaccountIndex, symbol, orderType and period must be the same for every order in the batch. Each order must have a unique nonce (for account and subaccount) and signature. Nonces must be sequential but need not be contiguous.

TWAP: Set the quantity of each order so the sum equals the total desired quantity. Specify a nonzero period (milliseconds) between orders.

Iceberg: Set the quantity of each order to the desired display quantity. Divide total desired quantity by display quantity to get the number of orders. Partial fills reduce the display quantity; the next order is triggered when the previous order is fully filled.

TP/SL pair: Exactly two orders—one TakeProfit and one StopLoss. Leave parentOrderId empty to attach to an existing position or set to the same orderId to attach to an existing order on the book.

POST
/account/orders
orders

Response Body

application/json

text/plain

text/plain

text/plain

text/plain

curl -X POST "https://engine.cascade.cooking/account/orders" \  -H "Content-Type: application/json" \  -d '{    "orders": [      {        "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",        "clientId": "tpsl-tp-1",        "expiresAt": 1968686299000,        "flags": {          "ioc": true,          "postOnly": false,          "reduceOnly": true        },        "nonce": 1968686298800,        "orderType": "TakeProfit",        "originator": "0x0000000000000000000000000000000000000000",        "originatorFee": 0,        "parentOrderId": null,        "period": null,        "price": "0.000001",        "quantity": "-1.5",        "signatures": [          "a1b2c3d4e5f6071827364556677889900aabbccdddeeff00112233445566778899"        ],        "subaccountIndex": 0,        "symbol": "BTC-USD-PERP",        "triggerPrice": "105000.00"      },      {        "account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",        "clientId": "tpsl-sl-1",        "expiresAt": 1968686299000,        "flags": {          "ioc": true,          "postOnly": false,          "reduceOnly": true        },        "nonce": 1968686298900,        "orderType": "StopLoss",        "originator": "0x0000000000000000000000000000000000000000",        "originatorFee": 0,        "parentOrderId": null,        "period": null,        "price": "0.000001",        "quantity": "-1.5",        "signatures": [          "b2c3d4e5f6071827364556677889900aabbccdddeeff00112233445566778800"        ],        "subaccountIndex": 0,        "symbol": "BTC-USD-PERP",        "triggerPrice": "95000.00"      }    ]  }'
{
  "orders": [
    {
      "account": "string",
      "clientId": "string",
      "createdAt": 0,
      "expiresAt": 0,
      "flags": {
        "ioc": true,
        "postOnly": true,
        "reduceOnly": true,
        "selfTradeExpire": 0
      },
      "groupId": "string",
      "lastUpdateSequenceNumber": 0,
      "nonce": 0,
      "ocoGroupId": "string",
      "orderId": "string",
      "orderType": "unsupported",
      "originator": "string",
      "originatorFee": 0,
      "parentOrderId": "string",
      "period": 0,
      "price": "string",
      "quantity": "string",
      "reason": "string",
      "remaining": "string",
      "settled": "string",
      "status": "new",
      "subaccountIndex": 0,
      "symbol": "string",
      "trailingPercent": "string",
      "triggerPrice": "string",
      "updatedAt": 0
    }
  ]
}
"string"
"string"
"Not delegated for account and subaccount"
"Invalid subaccount index"