Upscale
Menu
On this page

Cancel order

Try it out ↓
DELETE/orders/{orderId}
Cancel orderTrading

Cancels a pending order and releases whatever it had reserved.

  • The order must still be active; one that has already executed or been cancelled answers 403.
  • Allowed while the account is locked by the managed capital limit — that lock only stops orders that would grow a position.
  • The market must not be paused.
Base URL https://api.upscale.trade

Authorization

bearerhttp · bearerrequired

Personal API key, prefixed with usk_.

Parameters

Path
orderIdstring · uuidrequired

Identifier of the order to cancel.

Example: 00000000-0000-4000-8000-000000000000

Examples

curl --request DELETE 'https://api.upscale.trade/orders/{orderId}' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Responses

204

Order cancelled

401

Unauthorized

403

The order is no longer active. The account belongs to another user (account_access_denied), or the request is authenticated with an API key while api_trading is disabled on the account (api_trading_not_enabled). Trading on the account is over in its current status (challenge_closed), or the account is locked by the managed capital limit (funded_limit_trading_locked). The market is paused (market_paused) or accepts closing orders only (market_close_only).

404

No order with this identifier.

429

Rate limit of the API key exceeded (api_key_rate_limit_exceeded). Retry-After says when to come back; the body carries the bucket (read / write), the window that tripped, its limit and retryAt.