Skip to content

Files

Latest commit

1624c78 · Jan 13, 2016

History

History
This branch is 83 commits ahead of Sfippa/api-client-v1-node:master.

exchange

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 20, 2015
Jan 13, 2016
Jan 13, 2016

README.md

Blockchain ExchangeRates Module

Get this current bitcoin exchange rates. View full API documentation.

Importing

var exchange = require('blockchain.info/exchange');

Methods

All method options can include an apiCode property to prevent hitting request limits.

getTicker

Usage:

exchange.getTicker(options);

Gets the market price of BTC compared to world currencies. Without any options specified, it responds with a JSON object that has currency codes as keys.

Options (optional):

  • currency - specify which currency to get data for (currency code, string)

toBTC

Usage:

exchange.toBTC(amount, options);

Converts an amount of a given currency to BTC. Responds with a number in string format.

Parameters:

  • amount - the amount to convert (satoshi, number)
  • currency - the code of the currency to convert from (currency code, string)