DEV Community

Cover image for Binance P2P Bot

Binance P2P Bot

sanchezmarcosme profile image Sanchez Marcos Updated on ・2 min read

Making of a bot that calculates median price of any crypto-asset in fiat currency on Binance's p2p exchange, without leaving your console.

Alt Text

◼️ Challenge

Calculate the median price of any cryptocurrency in the Binance p2p market, and make it open source off course.

⚫️ Primary Objetives

  • Provide the minimum, median and maximum prices
  • It cannot be intrusive or distracting
  • Quick and easy to use and to discard

⚫️ Context variables

  • 62 fiat currencies available
  • 6 crypto currencies tickers
  • Wide price range
  • Price variation between purchase and sale
  • More than 30 pages of results by combination
  • No API's available

Alt Text
Binance P2P Market

◼️ Solution

A very simple command line interface, focused on a simple and intuitive UX, providing a quick response on assets price.

Alt Text


# Using npx
npx binance-p2p-bot

# Using npm
Enter fullscreen mode Exit fullscreen mode


# Using npm
npm install -g binance-p2p-bot

# Using yarn
yarn global add binance-p2p-bot
Enter fullscreen mode Exit fullscreen mode

⚫️ Dependencies

  • puppeteer - Headless Chrome Node.js API
  • chalk - Terminal string styling done right
  • inquirer - Common interactive command line user interfaces

⚫️ Repository

Alt Text

Any feedback on the article and code is welcome.
🖤 Thank you very much for your time and attention!

Follow me on Twitter

Bitcoin, Crypto, Ethereum.

Discussion (2)

Editor guide
3dubbeltjes2 profile image

Can you also make it so the bot can automatically execute orders buy/sell without leaving your console?

sanchezmarcosme profile image
Sanchez Marcos Author

Of course it can be done with little effort by following the respective security precautions in asset management, but I think Binance offers a good UX for that use case that does not require a lot of data analysis.

Binance offers a very complete API to manage and even automate your digital finances.

If you would like to read about the subject follow this link:

Friendly reminder:
Remember never to share your username, password, or crypto keys with anyone, much less with any application without first studying and understanding what its code does, ever.

Thanks for your comment!