Connect and trade with cryptocurrency.
ccxt
is library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
Get it: npm install ccxt
Sample usage:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| let ccxt = require('ccxt')
let exchange = new ccxt.bitfinex({
apiKey: '4FlEDtxDl35gdEiobnfZ72vJeZteE4Bb7JdvqzjIjHq',
secret: 'D4DXM8DZdHuAq9YptUsb42aWT1XBnGlIJgLi8a7tzFH',
})
await exchange.loadMarkets()
console.log(exchange.symbols)
let symbol = exchange.symbols[0]
console.log(symbol)
let ticker = await exchange.fetchTicker(symbol)
console.log(ticker)
let orderbook = await exchange.fetchOrderBook(symbol)
console.log(orderbook)
let balance = await exchange.fetchBalance()
console.log(balance);
|
GIF FTW!