Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not consistent order response #5

Open
gergelyhegykozi opened this issue Jan 25, 2021 · 5 comments
Open

Not consistent order response #5

gergelyhegykozi opened this issue Jan 25, 2021 · 5 comments

Comments

@gergelyhegykozi
Copy link

gergelyhegykozi commented Jan 25, 2021

Hey Tomochain Team,

I am not sure which repository would be the right place concerning this question. Since I worked on the API implementation based on this repo and https://apidocs.tomochain.com/?javascript--node#tomodex-apis I decided to create the issue here.

1.: I dont find minOrderSize in the current api. If the orderSize is too small then I have no chance to recognize it through any API (https://apidocs.tomochain.com/?javascript--node#tomodex-apis-pairs would be right place I guess).

When I fetch again the order (after I created it) with the same order hash it returns null. Basically it returns always null until the order is "opened". I should get always the right order with the right status when I fetch the order, not null... (including the rejected order which is also null)
I saw on your dex that in websocket you give back ORDER_REJECTED order. When I tried to work around with websocket, I didnt get the ORDER_REJECTED response in my websocket. (regardless of my orders subscription). I get the order size related error message and thats it. I dont care too much about websocket right now though. If I can get proper consistent behavior through the rest API its good enough for me.

2.: If I create a market order, the rest API doesnt give me back the calculated price that was used for the market order on the backend. (On your dex you send a price also for the market order which doesnt seem to make sense for me and doesnt match with your documentation either)

Please let me know if you need any additional details / request params / response object. To resolve this issue.

@thanhson1085
Copy link
Contributor

@gergelyhegykozi
Copy link
Author

gergelyhegykozi commented Jan 26, 2021

Min order side is 1 TOMO https://docs.tomochain.com/tomodex/faq/trading-faq#9-what-are-the-minimum-maximum-trade-orders

  • How do you calculate the min size order for any the other pairs? like BTC-USDT?
  • After I create an order I get an order hash. I reuse that to fetch https://dex.tomochain.com/api/orders/{hash}... But it returns { data: null } Without that I cant have reliable implementation. It should contain either the error or the order with the current status.

@thanhson1085
Copy link
Contributor

thanhson1085 commented Jan 28, 2021

How do you calculate the min size order for any the other pairs? like BTC-USDT?

From BTC/USDT, TOMO/USDT (no pair TOMO/BTC), TomoX will calculate BTC-TOMO

After I create an order I get an order hash. I reuse that to fetch https://dex.tomochain.com/api/orders/{hash}... But it returns { data: null } Without that I cant have reliable implementation. It should contain either the error or the order with the current status.

the order hash is calculated in client. It will be take time to store the order in the networks, you need to wait a while to re-check the status.

@gergelyhegykozi
Copy link
Author

gergelyhegykozi commented Jan 28, 2021

From BTC/USDT, TOMO/USDT (no pair TOMO/BTC), TomoX will calculate BTC-TOMO

So in general I have to manually calculate the minimum order size against the baseAsset - 1 TOMO
I still don't get it why dont you give back a minimum order size from the API for every pair like everybody else... Its a good practice...

the order hash is calculated in client. It will be take time to store the order in the networks, you need to wait a while to re-check the status.

I described that already. Thats what I am doing already. My problem is your orders response is not consistent and if there is an error you still give back a null response and it will stuck "forever".

Besides that I am still waiting for a feedback concerning the market order related question...

@thanhson1085
Copy link
Contributor

Trader pay fee for Relayer by quote token, relayer pay fee for the network by TOMO (0.001 TOMO, requires > 1/1000 the volume). That why we need to required the volume > 1 TOMO.

We will consider the order status issue. Not easy to fix for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants