mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 07:26:47 +00:00
huobi futures: improve market order type (#878)
This commit is contained in:
@@ -946,9 +946,17 @@ func (h *HUOBI) SubmitOrder(ctx context.Context, s *order.Submit) (order.SubmitR
|
||||
var oType string
|
||||
switch s.Type {
|
||||
case order.Market:
|
||||
oType = "opponent"
|
||||
// https://huobiapi.github.io/docs/dm/v1/en/#order-and-trade
|
||||
// At present, Huobi Futures does not support market price when placing an order.
|
||||
// To increase the probability of a transaction, users can choose to place an order based on BBO price (opponent),
|
||||
// optimal 5 (optimal_5), optimal 10 (optimal_10), optimal 20 (optimal_20), among which the success probability of
|
||||
// optimal 20 is the largest, while the slippage always is the largest as well.
|
||||
//
|
||||
// It is important to note that the above methods will not guarantee the order to be filled in 100%.
|
||||
// The system will obtain the optimal N price at that moment and place the order.
|
||||
oType = "optimal_20"
|
||||
if s.ImmediateOrCancel {
|
||||
oType = "opponent_ioc"
|
||||
oType = "optimal_20_ioc"
|
||||
}
|
||||
case order.Limit:
|
||||
oType = "limit"
|
||||
|
||||
Reference in New Issue
Block a user