This is an unofficial API for coinut.com, sponsored by CoinRoster
Please note that this repository is a work in progress. The API is unstable and should not be considered production ready.
Install node.js, preferably with nvm.
npm install coinut
- to install all dependencies
- 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.
const coinut = new Coinut(username, apiKey);
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);
});
coinut.getOrders()
.then(orders => {
console.log('Orders:', orders);
})
.catch(error => {
console.error('Error connecting to Coinut:', error.message);
});
);
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 reportsnpm run lint
- only lints the code (no message displayed on success, as per Unix standard)npm run clean
- deletes the dist and coverage folders
- Ashwin Balamohan (@abmohan)
See the LICENSE file for license rights and limitations (MIT).