Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 1.95 KB

README.md

File metadata and controls

65 lines (51 loc) · 1.95 KB

bittrex-node

wercker status Twitter

A full-featured Bittrex API client for Node.js

  • Supports all documented v1.1 endpoints
  • 100% unit-test coverage
  • Heavily documented
  • Promise based with async/await

If you're using the Bittrex REST API, I can assure you this is the only library worth using. Here's why:

  • It doesn't make you parse the Bittrex response and look for errors
  • It properly parses all timestamps to JavaScript Date objects
  • It uses proper JavaScript and Node conventions
  • It throws proper errors when parameters are missing
  • It uses a single https client with Keep-Alive enabled
  • It's faster than every other node Bittrex library

Initialize Client

const { BittrexClient } = require('bittrex-node')

let client = new BittrexClient({
  apiKey: '12345',
  apiSecret: 'abcde'
})

Public Methods

await client.markets()
await client.currencies()
await client.ticker('BTC-ETH')
await client.marketSummaries()
await client.marketSummary('BTC-ETH')
await client.marketHistory('BTC-ETH')
await client.orderBook('BTC-ETH', { type: 'both' })

Market Methods

await client.buyLimit('BTC-ETH', { quantity: 2.1, price: 0.1 })
await client.sellLimit('BTC-ETH', { quantity: 2.1, price: 0.1 })
await client.cancelOrder('1234-5678')
await client.openOrders('BTC-ETH')

Account Methods

await client.balances()
await client.balance('BTC')
await client.depositAddress('BTC')
await client.withdraw('BTC', { quantity: 1.2, address: 'abcde' })
await client.order('30594e6e-ba54-4914-96f3-5b9d5de2468e')
await client.orderHistory('BTC-ETH')
await client.withdrawalHistory('BTC')
await client.depositHistory('BTC')