coinbase-pro-node
Unofficial Node.js API for Coinbase Pro written in TypeScript and covered by tests.
Last updated a month ago by bennyn .
UNLICENSED · Repository · Original npm · Tarball · package.json
$ cnpm install coinbase-pro-node 
SYNC missed versions from official npm registry.

Coinbase Pro API

Unofficial Node.js API for Coinbase Pro written in TypeScript and covered by tests.

Benefits

Why should you consider using this unofficial Coinbase Pro Node.js API in addition to its official counterpart?

  • Source code is written 100% in TypeScript
  • Test setup enforces 100% code coverage
  • WebSocket reconnection is built-in
  • HTTP requests and/or responses are easy to customize
  • Good pull requests are always welcome

Usage

Node.js

Setup

const {CoinbasePro} = require('coinbase-pro-node');

// API Keys can be generated here:
// https://pro.coinbase.com/profile/api
const auth = {
  apiKey: '',
  apiSecret: '',
  passphrase: '',
};
const client = new CoinbasePro(auth);

REST example

const tradingAccounts = await client.rest.account.listAccounts();
const message = `You can trade "${tradingAccounts.length}" different pairs.`;
console.log(message);

WebSocket example

client.on(WebSocketClient.TOPIC.ON_MESSAGE, event => {
  console.log(`Received event of type "${event.type}".`);
});

await client.ws.connect();

client.ws.subscribeToTickers(['BTC-USD', 'ETH-EUR']);

Current Tags

  • 0.7.0                                ...           latest (a month ago)

8 Versions

  • 0.7.0                                ...           a month ago
  • 0.6.0                                ...           a month ago
  • 0.5.0                                ...           a month ago
  • 0.4.0                                ...           a month ago
  • 0.3.0                                ...           a month ago
  • 0.2.0                                ...           2 months ago
  • 0.1.0                                ...           2 months ago
  • 0.0.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 100
Dependencies (7)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |