hbdmapi / huobi_futures_Python

An Asynchronous Event-driven High-frequency Trading System,huobi future,huobi coin margined swap, huobi usdt margined swap included.
MIT License
267 stars 113 forks source link

closing long position in current holdings #10

Closed igkoh closed 4 years ago

igkoh commented 4 years ago

In create orders, action has ORDER_ACTION_BUY('BUY') ,ORDER_ACTION_SELL('SELL').  What is closing of  long position in current holdings?

Best regards, Ingyu

foonsun commented 4 years ago

@igkoh You can use "quantity" field to indicate long or short.https://github.com/hbdmapi/hbdm_Python/blob/master/alpha/platforms/huobi_swap_trade.py#L277