Skip to content

A (very) simple javascript wrapper for the (very) simple bitcoin.de api

Notifications You must be signed in to change notification settings

mcmunder/bitcoin-de-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitcoin-de-api

A (very) simple Node.js wrapper for the (very) simple bitcoin.de api.

NPM

Install

npm install --save bitcoin-de-api

Run tests

npm run test

Test runs will have different outputs depending on whether or not an API_KEY was set in .env (see 'Usage' below).

Usage

Create a .env file at the root of your project and add your API_KEY:

API_KEY=your_api_key_goes_here_without_quotes

Add .env to your .gitignore file! Don't publish your secrets! See dotenv for more information.

const api = require('bitcoin-de-api')
const dotenv = require('dotenv')

dotenv.config() // parses .env and sets environnment variables
const apiKey = process.env.API_KEY

api.getTrades(apiKey, since) // since parameter is optional
  .then(data => {
    // do stuff with the data here
    console.log(data)
  })
  .catch( err => {
    console.error(err)
  })

API

method returns
getTrades() promise
getOrderBook() promise
getRate() promise

Copyright and license

Copyright 2016 Matthias Munder.
Licensed under the MIT license.

js-standard-style

About

A (very) simple javascript wrapper for the (very) simple bitcoin.de api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published