Giter Club home page Giter Club logo

npm-cryptsy-api's Introduction

This is an asynchronous node js client for the cryptsy.com API.

It exposes all the API methods found here: https://www.cryptsy.com/pages/api

In addition, it exposes a getmarketid method, which accepts a string that describes the desired market in the format 'LTCBTC,' where LTC is the primary currency and BTC is the secondary. All methods are asynchronous, and called in the format client.method(arg1, arg2..., callback) where callback is a function that handles the returned data. The arguments must be passed in order as listed on the API docs linked above.

Example Usage:

var market = 'LTCBTC';
var cryptsy = require('cryptsy-api');
var client = new cryptsy('my_public_key', 'my_private_key');

// Get the market ID for the NBL<-->BTC market
client.getmarketid(market, function(market_id) {
	// Display user's trades in that market
	client.mytrades(market_id, null, function(trades) {
		console.log('Your trades in the ' + market + ' market:');
		if(trades.length)
		{
			for(var i in trades)
				console.log('[ID: ' + trades[i].tradeid + ' Date: ' + trades[i].datetime + ' Type: ' + trades[i].tradetype + ' Quantity: ' + trades[i].quantity + ']');
		}
		else
			console.log('You don\'t have any trades in the ' + market + ' market!');
	});
});

Credit:

This package was first modeled after the mtgox-apiv2 npm package located here: https://github.com/ameen3/node-mtgox-apiv2.

The methods were modeled after the python client located here: https://github.com/ScriptProdigy/CryptsyPythonAPI.

Feeling generous? Send me a fraction of a bitcoin!

1K1MjEj33GK9V6qn1jbj6wN2EP2hzzwbnx

npm-cryptsy-api's People

Contributors

nothingisdead avatar puttputt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.