JSPM

bitstamp-request

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q35892F
  • License MIT

Send requests to Bitstamp API the same way you use Mikeal's 'request' module

Package Exports

  • bitstamp-request

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bitstamp-request) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bitstamp-request

Send requests to the Bitstamp API in much the same way you use Mikeal's 'request' module. The key, signature, and nonce parameters are automatically added to every http POST request.

Install

npm install bitstamp-request

Usage

Initialize with the values associated with your account

var Bitstamp = require('bitstamp-request');
var b = new Bitstamp(bitstamp_customer_id, bitstamp_api_key, bitstamp_api_secret);

Now just make http POST requests

b.post('https://www.bitstamp.net/api/buy/', {amount: 100, price:201.50}, function(err, response){
    console.log(response.body);
})

Public api requests also supported

b.get('https://www.bitstamp.net/api/ticker/', function(err, response){
    console.log(response);
})