gateio / gateapi-go

100 stars 32 forks source link

cant get order by client id #41

Open lexand opened 11 months ago

lexand commented 11 months ago

Salutations.

I've created two orders for tests

orderId : 373656130585 with text: t-12345679 (2023-07-27 18:32:37)
orderId : 373654658195 with text: t-12345678 (2023-07-27 18:28:51)

Your documentation says

order_id: Order ID returned, or user custom ID(i.e., text field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted.

I've tried to get order just after it finished, after 5 minutes, after 10 minutes...

but I always got error

label: CLIENT_ID_NOT_FOUND, message: Order with client ID t-12345678 not found

To build fault tolerance system as much as possible we need to find orders by custom client ID.

revilwang commented 11 months ago

If you send two orders with the same client-id, the latter one will override. Have you cancelled the order before you query the order? How long did you wait after you created the order?

lexand commented 11 months ago

As you can see both orders have different client id. Orders were not canceled they were completely filled. I've tried to get order by client id inside allowed 1-hour range (5s, 5m, 10m ... after orders were finished)