kraken futures: add support for market orders (#870)

Kraken Futures supports a `mkt` order type which is a market order at
best price with a 1% order protection.
This commit is contained in:
Luis Rascão
2022-01-13 23:00:52 +00:00
committed by GitHub
parent 31b969856e
commit 98c4725e61
2 changed files with 2 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ var (
order.Stop: "stp",
order.PostOnly: "post",
order.TakeProfit: "take_profit",
order.Market: "mkt",
}
validSide = []string{"buy", "sell"}

View File

@@ -116,7 +116,7 @@ func (k *Kraken) FuturesSendOrder(ctx context.Context, orderType order.Type, sym
size, limitPrice, stopPrice float64) (FuturesSendOrderData, error) {
var resp FuturesSendOrderData
if ioc {
if ioc && orderType != order.Market {
orderType = order.ImmediateOrCancel
}