File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import Binance from 'index'
2+
3+
4+ const client = Binance ( {
5+ } )
6+
7+ async function main ( ) {
8+ const spotOb = await client . book ( { symbol : 'BTCUSDT' } )
9+ console . log ( 'Spot Orderbook:' , spotOb )
10+
11+ const futuresOb = await client . futuresBook ( { symbol : 'BTCUSDT' } )
12+ console . log ( 'Futures Orderbook:' , futuresOb )
13+ }
14+
15+ main ( )
16+ // node --require @babel/register examples/fetch-orderbook.js
Original file line number Diff line number Diff line change 1+ import Binance from 'index'
2+
3+
4+ const client = Binance ( {
5+ } )
6+
7+ async function main ( ) {
8+ const spotPrices = await client . prices ( )
9+ console . log ( 'Spot Prices:' , spotPrices )
10+
11+ const futuresPrices = await client . futuresPrices ( )
12+ console . log ( 'Futures Prices:' , futuresPrices )
13+ }
14+
15+ main ( )
16+ // node --require @babel/register examples/fetch-prices.js
You can’t perform that action at this time.
0 commit comments