Problem with deleting an order

Hi.

I’m not sure what I am doing wrong so DELETE on /orders/{order_id} doesn’t work.

Here’s my scenario:

curl --location --request GET 'https://api-public.sandbox.pro.coinbase.com/orders?product_id=BTC-USD&status=open' \
--header 'Content-Type: application/json' \
--header 'CB-ACCESS-KEY: xxx' \
--header 'CB-ACCESS-PASSPHRASE: xxx' \
--header 'CB-ACCESS-SIGN: xxx=' \
--header 'CB-ACCESS-TIMESTAMP: 1656428496'

Response:

[
    {
        "id": "80aae251-bd8e-4b45-8649-a0eace9b35b7",
        "client_oid": "73bfd9c5-096e-4757-d2a8-dab7337d6aef",
        "price": "29300.00000000",
        "size": "10.00000000",
        "product_id": "BTC-USD",
        "profile_id": "f56563c8-5f19-4647-87e5-423c391e3a6b",
        "side": "sell",
        "type": "limit",
        "time_in_force": "GTC",
        "post_only": false,
        "created_at": "2022-05-18T07:57:29.54455Z",
        "fill_fees": "11.1513245040000000",
        "filled_size": "0.38059128",
        "executed_value": "11151.3245040000000000",
        "status": "open",
        "settled": false
    }
]

Now, I’m trying to delete the order:

curl --location --request DELETE 'https://api-public.sandbox.pro.coinbase.com/orders/80aae251-bd8e-4b45-8649-a0eace9b35b7' \
--header 'Content-Type: application/json' \
--header 'CB-ACCESS-KEY: xxx' \
--header 'CB-ACCESS-PASSPHRASE: xxx' \
--header 'CB-ACCESS-SIGN: xxx=' \
--header 'CB-ACCESS-TIMESTAMP: 1656428496'

Response:

{
    "message": "order not found"
}

Could please advice me why it’s not working?

1 Like

Hello @Tomasz! Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your concern, we will check on this for you with our team. We will get back to you once we have more information. Keep in touch!

2 Likes

Hi @Tomasz!

We recommend that you retry the steps and confirm if the issue still persists. Our team tried reproducing this scenario and it works just fine. We would also like to know if that’s only happening for a specific order or for all orders you’re trying to cancel. Please let us know the result. Thanks!

2 Likes

Hi @pauline.macahia !
Just wanted to confirm that now it works as expected.

Thank you for you support

1 Like

Hello @Tomasz ! We are always happy to help! Thanks for letting us know it all worked out.
Please reach out in the future if you need anything else. Have a great day!

2 Likes