zhouaini528 / huobi-php

Huobi API Like the official document interface, Support for arbitrary extension.
MIT License
42 stars 23 forks source link

spot api trade problem #11

Open tellocan opened 2 years ago

tellocan commented 2 years ago

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 commented 2 years ago

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

tellocan commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

{"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 commented 2 years ago

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

zhouaini528 commented 2 years ago

"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. 😂