2.0.0 • Published 6 years ago

@hardyscc/bittrex-api v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Bittrex Javascript API

Sample Usage

const { Bittrex } = require('@hardyscc/bittrex-api')

const bittrex = new Bittrex({
  apikey: 'key',
  apisecret: 'secret'
})
;(async () => {
  const currency = 'ETH'

  console.log('Balance =>', await bittrex.getBalance(currency))

  console.log('Market Summary =>', await bittrex.getMarketSummary(currency))

  const {
    result: { buy, sell }
  } = await bittrex.getOrderBook(currency)
  console.log('Order Book Bid =>', buy)
  console.log('Order Book Ask =>', sell)

  console.log('Open Orders =>', await bittrex.getOpenOrders(currency))

  const respBuy = await bittrex.buy({
    coin: currency,
    quantity: 1,
    rate: 0.01
  })
  console.log('Buy =>', respBuy)

  if (respBuy.success) {
    console.log('Cancel Buy =>', await bittrex.cancel(respBuy.result.uuid))
  }

  const respSell = await bittrex.sell({
    coin: currency,
    quantity: 1,
    rate: 0.1
  })
  console.log('Sell =>', respSell)

  if (respSell.success) {
    console.log('Cancel Sell =>', await bittrex.cancel(respSell.result.uuid))
  }
})()
2.0.0

6 years ago

1.0.0

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago