Skip to content

Commit

Permalink
Merge pull request #857 from aquibsayyed09/marketOrder-amount-based
Browse files Browse the repository at this point in the history
support for market order based on quote order currency or amount
  • Loading branch information
carlosmiei authored Feb 7, 2025
2 parents 94d595a + 28e4eef commit b7fca74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions node-binance-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,12 @@ let api = function Binance( options = {} ) {
let opt = {
symbol: symbol,
side: side,
type: 'LIMIT',
quantity: quantity
type: 'LIMIT'
};
if(typeof flags.quoteOrderQty !== undefined && flags.quoteOrderQty > 0)
opt.quoteOrderQty = flags.quoteOrderQty
else
opt.quantity = quantity
if ( typeof flags.type !== 'undefined' ) opt.type = flags.type;
if ( opt.type.includes( 'LIMIT' ) ) {
opt.price = price;
Expand Down

0 comments on commit b7fca74

Please sign in to comment.