Nexus/API Reference/Futures resting orders

Cancel everything resting, or one contract's orders

POSThttps://app.skylit.ai/api/nexus/v1/trading/accounts/{account}/orders/cancel

"cancelAll": true cancels every resting order on the account. ticker cancels only that contract's. Not both. Nothing resting answers 200 with meta.nothingToCancel: true.

If one cancel fails part way, the error says how many were cancelled and which order is still working. Read the working list and send the cancel again. With "test": true it cancels the account's test orders in your test log and never touches a real order.

Authorization

Authorization: Bearer <your API key>

Required. A missing header returns 401; an invalid, revoked or expired key returns 403.

Path parameters

  • accountstringrequired

    practice, evaluation or funded (when you have exactly one running), or a futures account id from capabilities.

Request body

  • cancelAllboolean

    true cancels every resting order on the account.

  • tickerstring

    Cancel only this contract's orders, like NQ.

  • testboolean

    true cancels the account's test orders in your test log only.

Responses

  • 200

    What was cancelled. meta.count is how many.

  • 400

    The request was refused before anything was traded. Codes: bad_request, bad_contract, invalid_quantity, invalid_price, unsupported_asset_class, unsupported_order_type, only_market_orders, test_orders_unavailable, test_modify_unavailable.

  • 401

    No key, or a key that isn't valid. Codes: missing_api_key, invalid_api_key.

  • 403

    The key works but the account can't do this. Codes: account_suspended, nexus_access_denied, futures_access_denied.

  • 404

    Not on your account. Codes: trade_not_found, account_not_found, order_not_found.

  • 409

    The order clashes with what you hold or sent before. Codes: duplicate_position (with tradeId), trade_closed, open_position_limit, client_order_id_used, request_in_progress, account_locked, account_busy, account_ended, order_not_working.

  • 422

    Read fine, but the market or the account says no. Codes: market_closed, contract_expired, contract_not_offered, price_outside_market, insufficient_buying_power, account_not_tradable, account_ambiguous, reduce_only_would_open, order_refused.

  • 429

    Over a rate limit. Wait Retry-After seconds, then retry. Code: rate_limited.

  • 503

    Try again in a moment (honour Retry-After when it's sent). Codes: stale_quote, no_live_price, rules_pending, unavailable, auth_unavailable, access_check_unavailable, api_keys_unavailable, trades_api_disabled.

Response fields

  • dataobject
    • accountobject
    • cancelledobject[]
  • metaobject
    • countinteger
    • nothingToCancelboolean

Last updated

Was this page helpful?