You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
833 B
19 lines
833 B
from huobi.client.trade import TradeClient
|
|
from huobi.constant import *
|
|
from huobi.utils import *
|
|
|
|
client_order_id_test = "xxxxxx"
|
|
symbol_test = "eosusdt"
|
|
|
|
trade_client = TradeClient(api_key=g_api_key, secret_key=g_secret_key)
|
|
|
|
order_id = trade_client.create_order(symbol=symbol_test, account_id=g_account_id,
|
|
order_type=OrderType.BUY_LIMIT,
|
|
source=OrderSource.API,
|
|
amount=18.0,
|
|
price=0.292, client_order_id=client_order_id_test)
|
|
LogInfo.output("created order id : {id}, {client_order_id}".format(id=order_id, client_order_id=client_order_id_test))
|
|
result = trade_client.cancel_client_order(client_order_id=client_order_id_test)
|
|
LogInfo.output("cancel result {id}".format(id=result))
|
|
|