Canceling orders using the cancel endpoint returns not found despite the UI showing the order ID

As the title suggests

404 Client Error: Not Found for url: https://api.coinbase.com/api/v3/brokerage/batch_cancel

for existing orders that were created via the api

Can you copy/paste your code here?

1 Like

This is what my POST request looks like to https://api.coinbase.com/api/v3/brokerage/orders/batch_cancel:

{“order_ids”: [“XXXXXXXXXXXXX”]}

Where XXXXX is a valid order ID returned by the get orders endpoint (which returns the order ID just fine)

This is what I am using for reference: Cancel Orders

Their example cURL:

     --url https://coinbase.com/api/v3/brokerage/orders/batch_cancel \
     --header 'CB-ACCESS-KEY: $ACCESS_KEY' \
     --header 'CB-ACCESS-SIGN: $SIGNATURE' \
     --header 'CB-ACCESS-TIMESTAMP: $TIMESTAMP' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
     "order_ids": [
          "XXXXXXXX"
     ]
}
'```

I meant like the function/script/whatever that you are using. Seeing the coinbase examples doesn’t help me diagnose your code. How are you signing the message, for example?

It would be most helpful if you could post two code snippets. The one you have working, and the one that isn’t working. Easier to compare and figure out the issue etc. Thanks!

Open Bank currency rates for all major currencies in Pakistan can be viewed online including US Dollar to PKR. We provide updated Open Bank currency exchange rates in Pakistan. View todays open bank foreign currency exchange rates with Pakistani Rs. PKR. We update our rates from time to time everyday, as per exchange dealers in Pakistani market.