Cancel Trade Orders

Cancel trade orders that haven't completed. See the Guide.

  1. Cancel a trade order that hasn't completed. For example, if you place a limit order with a 24 hour duration, you can cancel the order before the order duration ends. Your access token must have the trade_trade scope, and you must be an enterprise user with the Trade role.

    Prerequisites:

    API Reference

// 1. Cancel Trade Order
export ACCOUNT_ID="<YOUR_GO_ACCOUNT_WALLET_ID>"
export ORDER_ID="<YOUR_ORDER_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X PUT \
  "https://app.bitgo-test.com/api/prime/trading/v1/accounts/$ACCOUNT_ID/orders/$ORDER_ID/cancel" \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
// 1. Cancel Trade Order Response
{}