FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

100% trading in the market using the .marketBuy function · Issue #886 · ccxt/node-binance-api · GitHub

Repository navigation

100% trading in the market using the .marketBuy function #886

Description

hello.
Is it necessary that the user's usdt balance is a slightly higher than the amount for the trade to take place in .marketBuy function?

Is the transaction definitely done without the buffer amount?

amount = 0.2
price = binance.prices('BTCUSDT')
total = price * amount 

const buffer = 2; // set a buffer of 2 usdt
if (balance < total + buffer) {
  console.error('Insufficient USDT balance');
  return;
}
else{
  binance.marketBuy('BNBBTC', amount)
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL