Fix OKEX match_price logic

Fixes https://github.com/thrasher-/gocryptotrader/issues/116
This commit is contained in:
Adrian Gallagher
2018-04-30 17:24:28 +10:00
parent 33398316ef
commit 2309e8ce60

View File

@@ -562,8 +562,10 @@ func (o *OKEX) PlaceContractOrders(symbol, contractType, position string, levera
values.Set("type", position)
if matchPrice {
values.Set("match_price", "1")
} else {
values.Set("match_price", "0")
}
values.Set("match_price", "0")
if leverageRate != 10 && leverageRate != 20 {
return 0, errors.New("leverage rate can only be 10 or 20")
}