Cancel Trade Orders
Cancel trade orders that haven't completed. See the Guide.
-
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_tradescope, and you must be an enterprise user with the Trade role.Prerequisites:
- Complete Get Started
- Deposit Assets
- Place Trade Orders
// 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
{}