Order may not be consistent after creating an order

hi team,
I noticed that this happened several times in my project.
steps,
1, create a limit order by using https://api.exchange.coinbase.com/orders, when it’s success, I get an order_id
2, then I try to invoke https://api.exchange.coinbase.com/orders/{order_id} to get order status, but sometimes the server always return 404 (not found)

I understand if I call GET /orders/{order_id} immediately I may get 404 because server needs time to sync the status, but for few orders I can’t get the order info even the order is completed for an hour (I can see that order on pro app).

so my question would be is there any known issue or background about this kind of issue? thanks a lot

William

Hi @sp213231! Welcome to the community! We appreciate your enthusiasm in trying out Coinbase APIs.

We can see that you are trying to utilize the /orders endpoint to run a GET request for the order status but receiving a 404 Not Found error message. Related to this, can you please confirm if the API key you’re using in the GET /orders/{order_id} endpoint is the one linked with your Profile in your Exchange account? This could be one thing that is causing the said error response and this is also because you’ve mentioned that you are checking the order status via your “Pro app” when we can see that you’re using the Exchange API.

Please note that Coinbase Pro and Coinbase Exchange API are interchangeable; thus the same documentation but requires different API key. The main difference between the two is its intended users. Coinbase Pro is for individuals while the Coinbase Exchange is for institutional accounts. You may use endpoints from both the APIs. All endpoints available for Coinbase Exchange are listed here. To access the endpoints of Coinbase Pro API, you can just change the word “exchange” on the URLs of your requests to “pro.” For example, https://api.exchange.coinbase.com/orders is similar to https://api.pro.coinbase.com/orders.

Additionally, it is mentioned here that if the order is canceled you may also receive a response status code 404 if the order had no matches.

Once you confirm to us the information requested above, we’ll work to quickly address this issue. We appreciate your patience and understanding.

3 Likes

thanks for the quick response. yes, I should use the correct profile_id because I have only one profile that used for api trading. the one I didn’t notice is that I used to use api from api.exchange.coinbase (not api.pro.coinbase) as you mentioned these two should be interchangeable, but I will give a try of api.pro.coinbase.

this not happened every time, the possibility is like 1/20 - 1/40. here’s a sample of not found order.

2022-11-27T19:37:36,707 INFO [http-nio-8080-exec-7] c.s.c.s.t.i.ProdExchangeTradingService: [LIMIT_SELL_ORDER_PLACED] productId: [ETH_USD] at price: 1161.33 sellQuota: 6.63569458, response: CBCreateNewOrderService.CreateNewOrderResponse(id=47b20ff1-40cc-4126-9dc7-9f19d4c0d81f, clientOid=55342f10-273a-4f79-adf5-4621b37dabc9, price=1161.33000000, size=6.63569458, productId=ETH-USD, side=sell, stp=dc, type=limit, timeInForce=GTT, expireTime=2022-11-28T02:37:36.721Z, postOnly=true, createdAt=2022-11-28T01:37:36.723062Z, fillFees=0, filledSize=0, executedValue=0, status=pending, settled=false, funds=null, specifiedFunds=null)
2022-11-27T19:37:39,453 WARN [pool-2-thread-8] c.s.c.j.OrderProcessQueueExecutor: [ORDER_NOT_FOUND] order not found from Coinbase side, order_id=47b20ff1-40cc-4126-9dc7-9f19d4c0d81f
2022-11-27T19:37:42,437 WARN [pool-2-thread-9] c.s.c.j.OrderProcessQueueExecutor: [ORDER_NOT_FOUND] order not found from Coinbase side, order_id=47b20ff1-40cc-4126-9dc7-9f19d4c0d81f
2022-11-27T19:37:45,461 WARN [pool-2-thread-7] c.s.c.j.OrderProcessQueueExecutor: [ORDER_NOT_FOUND] order not found from Coinbase side, order_id=47b20ff1-40cc-4126-9dc7-9f19d4c0d81f
2022-11-27T19:37:48,424 WARN [pool-2-thread-4] c.s.c.j.OrderProcessQueueExecutor: [ORDER_NOT_FOUND] order not found from Coinbase side, order_id=47b20ff1-40cc-4126-9dc7-9f19d4c0d81f

Hello @sp213231! We appreciate your patience so far. Please feel free to inform us if the issue still persists and we will be happy to investigate further.

3 Likes