0.1.2 • Published 6 years ago

coinspot-async-api v0.1.2

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

CoinSpot Async API

Introduction

An API for CoinSpot that uses promises and ES6 classes to communicate with CoinSpot.

How To Use

const coinspot = require("coinspot-async-api");

const client = coinspot(API_KEY_1, API_SECRET_1);
const client_1 = coinspot(API_KEY_2, API_SECRET_2);

client.balances().then(data => {
	console.log(data);
});

client.buy("BTC", 1, 20000).then(data => {
	console.log(data);
});

API

marketrates

Method returns the current buy/sell price that coinspot will trade coins at.

Calling the method with no value returns all the coin prices.

client.marketrates().then(data => {
	console.log(data);
});

// Returns all the current market prices

Calling the method with a single parameter returns that coins market price.

client.marketrates("BTC").then(data => {
	console.log(data);
});

// { "BTC" : { buy: 20000.00, sell: 20000.00 } }

Calling the method with an array of coins will return the prices for all the selected coins.

client.marketrates(["BTC", "ETH"]).then(data => {
	console.log(data);
});

// { "BTC" : { buy: 20000.00, sell: 20000.00 },
//   "ETH" : { buy: 20000.00, sell: 20000.00 } }

Supported Endpoins

FunctionEndpoint
sendcoin"/api/my/coin/send"
coindeposit"/api/my/coin/deposit"
quotebuy"/api/quote/buy"
quotesell"/api/quote/sell"
balances"/api/my/balances"
orders"/api/orders"
myorders"/api/my/orders"
spot"/api/spot"
buy"/api/my/buy"
sell"/api/my/sell"

Contributing

Feel free to open issues and send in those PRs. Thanks!

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago