New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coinspot-async-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinspot-async-api

An async api for coinspot

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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!

Keywords

FAQs

Package last updated on 01 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc