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

spot api trade problem #11

Open
tellocan opened this issue May 24, 2022 · 7 comments
Open

spot api trade problem #11

tellocan opened this issue May 24, 2022 · 7 comments

Comments

@tellocan
Copy link

tellocan commented May 24, 2022

hello my friend, the trade continues normally, it returns a code like once in a while and does not make a purchase

( [status] => ok [data] => 543496989246785 ) Array ( [status] => ok [data] => Array ( [id] => 543496989246785 [symbol] => ktusdt [account-id] => 42532667 [client-order-id] => [amount] => 9.900000000000000000 [price] => 0.0 [created-at] => 1653394738796 [type] => buy-market [field-amount] => 0.0 [field-cash-amount] => 0.0 [field-fees] => 0.0 [finished-at] => 1653394738803 [source] => spot-api [state] => canceled [canceled-at] => 1653394738799 ) )

@zhouaini528
Copy link
Owner

This is indeed a very strange problem, I did not find the problem. what is your code?

@tellocan
Copy link
Author

This is indeed a very strange problem, I did not find the problem. what is your code?

your codes, there is no change and it gives such problems only in some of the orders, not all

@zhouaini528
Copy link
Owner

hello my friend, the trade continues normally, it returns a code like once in a while and does not make a purchase

( [status] => ok [data] => 543496989246785 ) Array ( [status] => ok [data] => Array ( [id] => 543496989246785 [symbol] => ktusdt [account-id] => 42532667 [client-order-id] => [amount] => 9.900000000000000000 [price] => 0.0 [created-at] => 1653394738796 [type] => buy-market [field-amount] => 0.0 [field-cash-amount] => 0.0 [field-fees] => 0.0 [finished-at] => 1653394738803 [source] => spot-api [state] => canceled [canceled-at] => 1653394738799 ) )

I still haven't found the problem, but from the results, it runs two interfaces postOrder getOrder. You can find the problem at the code source breakpoint.

@tellocan
Copy link
Author

https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order

here it says "canceled-at": 0 returns if the order is complete. I understand that huobi may have closed some coins to order with API. Is there any way to find out?

@tellocan
Copy link
Author

{"base-currency":"apn","quote-currency":"usdt","price-precision":6,"amount-precision":2,"symbol-partition":"main","symbol":"apnusdt","state":"online","value-precision":8,"min-order-amt":0.1,"max-order-amt":50000000,"min-order-value":1,"limit-order-min-order-amt":0.1,"limit-order-max-order-amt":50000000,"limit-order-max-buy-amt":50000000,"limit-order-max-sell-amt":50000000,"buy-limit-must-less-than":1.1,"sell-limit-must-greater-than":0.9,"sell-market-min-order-amt":0.1,"sell-market-max-order-amt":5000000,"buy-market-max-order-value":100000,"market-sell-order-rate-must-less-than":0.1,"market-buy-order-rate-must-less-than":0.1,"api-trading":"enabled","tags":""}

@tellocan
Copy link
Author

"api-trading":"enabled" , "state":"online" There is no obvious problem here either.

@zhouaini528
Copy link
Owner

"api-trading":"enabled" , "state":"online" There is no obvious problem here either.

The area I am in is restricted by huobi, I can't test it better, it's a bit troublesome. 😂

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