Bulk Cancel

POST /auth/cancel/bulk

Cancel orders in bulk. This endpoint is recommended when you need to cancel more than 5 orders at once.

By using this endpoint you will only consume a single rate limit request and not 5. It will also be much faster than cancelling the orders individually.

Requires a signed payload in HMAC-SHA256 form to be appended to the x-signature header. The signed payload must be base64-encoded.

Javascript example:

  const formurlencoded = require('form-urlencoded').default;
  const crypto = require("crypto-js");
  const fetch = require("node-fetch");
  const API_KEY = "<YOUR_API_KEY>";
  const SECRET_KEY = "<YOUR_SECRET_KEY>";

  (async function() {
    const payload = {'ids': ['392392320eoweqwie3', '482392320eoweqwii5']};
    const payload_url_encoded = formurlencoded(payload);
    const HMAC = crypto.HmacSHA256(payload_url_encoded, SECRET_KEY).toString(crypto.enc.Base64);
    const submitted = await fetch('https://api.everstrike.io/auth/cancel/bulk', {method: 'POST', body: payload_url_encoded, headers: {'content-type': 'application/x-www-form-urlencoded', 'x-api-key': API_KEY, 'x-signature': HMAC}});
    const response = await submitted.json();
    console.log(response);
  })();

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • code integer

      Response code

    • msg string

      Diagnostic message

    • result array[object]

      Order information

      Hide result attributes Show result attributes
  • 503

    Error

    Hide response attributes Show response attributes object
POST /auth/cancel/bulk
curl \
 -X POST https://api.everstrike.io/auth/cancel/bulk \
 -H "x-api-key: $API_KEY"
Response examples (200)
{
  "code": 200,
  "msg": "string",
  "result": [
    {
      "pair": "USD_BTCCALL_PERP",
      "type": "LIMIT",
      "side": "SELL",
      "price": 100,
      "time_in_force": "GTC",
      "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
      "qty_orig": 0.002,
      "qty_remaining": 0.002,
      "status": "ACTIVE",
      "time": 1551137077642,
      "fills": [],
      "id": "849cdea0395411e98f54b395ae9c7bb6",
      "qty_orig_usd": 0.28101585963,
      "leverage": 1,
      "post_only": false,
      "reduce_only": false,
      "hidden": false
    },
    {
      "pair": "USD_BTCCALL_PERP",
      "type": "LIMIT",
      "side": "SELL",
      "price": 102,
      "time_in_force": "GTC",
      "customer_id": "5f9ca5f0-380e-11e9-bf51-91a076098e19",
      "qty_orig": 0.003,
      "qty_remaining": 0.003,
      "status": "ACTIVE",
      "time": 1551137077642,
      "fills": [],
      "id": "249cdea0395411e98f54b395ae9c7bc7",
      "qty_orig_usd": 0.30101585963,
      "leverage": 1,
      "post_only": false,
      "reduce_only": false,
      "hidden": false
    }
  ]
}
Response examples (503)
{
  "code": 503,
  "msg": "Invalid request",
  "result": {}
}