Skip to content

Commit

Permalink
okex createOrder futures market orders fix ccxt#7829
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Oct 19, 2020
1 parent b350cd6 commit 3effe88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/okex.js
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,9 @@ module.exports = class okex extends Exchange {
const orderType = this.safeString (params, 'order_type');
// order_type === '4' means a market order
const isMarketOrder = (type === 'market') || (orderType === '4');
if (!isMarketOrder) {
if (isMarketOrder) {
request['order_type'] = '4';
} else {
request['price'] = this.priceToPrecision (symbol, price);
}
if (market['futures']) {
Expand Down

0 comments on commit 3effe88

Please sign in to comment.