coinbase-pro-node
Unofficial Node.js API for Coinbase Pro written in TypeScript and covered by tests.
Last updated 3 days 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.11                                ...           latest (3 days ago)

19 Versions

  • 0.7.11                                ...           3 days ago
  • 0.7.10                                ...           7 days ago
  • 0.7.9                                ...           24 days ago
  • 0.7.8                                ...           a month ago
  • 0.7.7                                ...           a month ago
  • 0.7.6                                ...           a month ago
  • 0.7.5                                ...           a month ago
  • 0.7.4                                ...           2 months ago
  • 0.7.3                                ...           2 months ago
  • 0.7.2                                ...           2 months ago
  • 0.7.1                                ...           2 months ago
  • 0.7.0                                ...           3 months ago
  • 0.6.0                                ...           3 months ago
  • 0.5.0                                ...           3 months ago
  • 0.4.0                                ...           3 months ago
  • 0.3.0                                ...           3 months ago
  • 0.2.0                                ...           4 months ago
  • 0.1.0                                ...           4 months ago
  • 0.0.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 71
Last Day 0
Last Week 39
Last Month 109
Dependencies (7)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |