Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewbarba/bittrex-node
Bittrex API Client for Node.js
https://github.com/andrewbarba/bittrex-node
async-await axios bittrex cryptocurrency https nodejs
Last synced: about 2 months ago
JSON representation
Bittrex API Client for Node.js
- Host: GitHub
- URL: https://github.com/andrewbarba/bittrex-node
- Owner: AndrewBarba
- License: mit
- Created: 2018-07-25T18:13:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:47:33.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T10:06:31.799Z (about 2 months ago)
- Topics: async-await, axios, bittrex, cryptocurrency, https, nodejs
- Language: JavaScript
- Size: 120 KB
- Stars: 14
- Watchers: 3
- Forks: 10
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# bittrex-node
[![wercker status](https://app.wercker.com/status/feb7e7d87d5a4a29ea9c04b4a1350a44/s/master "wercker status")](https://app.wercker.com/project/byKey/feb7e7d87d5a4a29ea9c04b4a1350a44)
[![Twitter](https://img.shields.io/badge/twitter-@andrew_barba-blue.svg?style=flat)](http://twitter.com/andrew_barba)A full-featured Bittrex API client for Node.js
- [x] Supports all documented v1.1 endpoints
- [x] 100% unit-test coverage
- [x] Heavily documented
- [x] Promise based with async/awaitIf 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
```javascript
const { BittrexClient } = require('bittrex-node')let client = new BittrexClient({
apiKey: '12345',
apiSecret: 'abcde'
})
```## Public Methods
```javascript
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
```javascript
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
```javascript
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')
```