Socket
Socket
Sign inDemoInstall

coinut

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coinut

Unofficial JavaScript API for coinut.com


Version published
Weekly downloads
1
Maintainers
1
Install size
7.89 MB
Created
Weekly downloads
 

Readme

Source

CoinutJS

CircleCI Coverage Status

This is an unofficial API for coinut.com, sponsored by CoinRoster

Work In Progress!

Please note that this repository is a work in progress. The API is unstable and should not be considered production ready.

Getting Started

Setup

Install node.js, preferably with nvm.

Installation

npm install coinut - to install all dependencies

Usage

  • All functions return promises that resolve to the raw JSON objects returned by the Coinut API
  • The Coinut API uses snake_case. These values are returned as-is and are not converted to camelCase

See examples for code snippets that can be run directly from the terminal.

Instantiation
const coinut = new Coinut(username, apiKey);
Balance
coinut.getBalance()
  .then(responseData => {
    console.log('Balance:', responseData.balance);
    console.log('Free Margin:', responseData.free_margin);
    console.log('Margin:', responseData.margin);
  })
  .catch(error => {
    console.error('Error connecting to Coinut:', error.message);
  });
Retrieve Open Orders
coinut.getOrders()
  .then(orders => {
    console.log('Orders:', orders);
  })
  .catch(error => {
    console.error('Error connecting to Coinut:', error.message);
  });
);

Development

The following npm scripts have been configured:

  • npm build - compiles the src folder (ES6 code) into the dist folder (ES5 code, including source maps)
  • npm test - lints the code, runs all unit tests and creates code coverage reports
  • npm run lint - only lints the code (no message displayed on success, as per Unix standard)
  • npm run clean - deletes the dist and coverage folders
Contributors

License

See the LICENSE file for license rights and limitations (MIT).

Keywords

FAQs

Last updated on 21 Jun 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc