Skip to content

strelov1/binance-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binance Task

Prerequisites:

Tasks:

  • Log to console current non 0 asset balances available on the SPOT account (testnet)
  • Open a single userData websocket (with all the requirement logic to keep the listenKey active)
  • Keep your local asset balances state up to date based on the data coming from userData
  • Log the asset balances again on every balance change
  • Open 10 *@trade websockets for the 10 pairs with the highest volume in the last 24h on the SPOT exchange (mainnet)
  • Determinate the 10 pairs dynamically (no hard-coded pairs)
  • Measure event time => client receive time latency and log (min/mean/max) to console every 1 minute

Install

  • Run init script

    make init
  • Setup apiKey and apiSecret to src/secrets.js

Using

  • Show actual balance

    ./bin/balance.js
  • Show trades with the highest volume pairs in the last 24h

    ./bin/trades.js
  • Create order (to demonstrate the balance update)

    ./bin/order.js