Ionomy API Client for Node JS
Ionomy exchange was quick to support and list Hive. That was the first time I heard about them. They don't have much liquidity yet. So, with the recent volatile market, there are many arbitrage opportunities if you act quickly enough.
To test my theory I went on to look for any available client library for them but found none. So, I wrote one modeled after another library named bittrex-node.
This is my first library published to NPM. :)
Repository
https://github.com/CodeBull/ionomy-node
Usage
Get your API key and secret from https://ionomy.com/en/account/api. You need to enable 2FA before generating a key.
Installation
npm i ionomy-node
Initialize Client
const Ionomy = require('ionomy-node');
const client = new Ionomy({
apiKey: 'abcdapikey',
apiSecret: 'abcdapisecret',
});
Public Methods
await client.markets();
Returns an array of all the available markets.
await client.currencies();
Returns an array of all the available currencies.
await client.orderBook({ market: 'btc-hive', type: 'both' });
Returns the buy/sell/both order book(s) of the provided market.
await client.marketSummaries();
Returns an array of summary of all available markets.
await client.marketSummary('btc-hive');
Returns market summary of the provided market.
await client.marketHistory('btc-hive');
Returns an array of buy and sell history of the provided market.
Market Methods
await client.limitBuy({ market: 'btc-hive', amount: '100', price: '0.00005' });
Places a limit buy order.
await client.limitSell({ market: 'btc-hive', amount: '100', price: '0.00005' });
Places a limit sell order.
await client.cancelOrder('5b8e8c980e454f2b807863ee');
Cancels an order with the provided ID.
await client.openOrders('btc-hive');
Returns all open orders in the provided market.
Account Methods
await client.balances();
Returns balance of every currency.
await client.balance('hive');
Returns balance of the provided currency.
await client.depositAddress('hive');
Returns the deposit address of the provided currency.
await client.depositHistory('hive');
Returns deposit history of the provided currency.
await client.withdraw({ currency: 'hive', amount: '100', address: 'reazuliqbal' });
Places a withdrawal request of the provided currency.
await client.withdrawalHistory('hive');
Returns withdrawal history of the provided currency.
await client.order('5b8e8c980e454f2b807863ee');
Returns order details of the provided order ID.
await client.orderHistory('btc-hive');
Returns your order history of the provided market.
Please report any issue here in the comments or on the Github issues.
Code screenshot generated using Carbon.
I am running a Hive Witness as @BDCommunity.
Please vote for @BDCommunity as a witness.
Leave Ionomy API Client for Node JS to:
Read more #hive-139531 posts
Best Posts From Reazul Iqbal
We have not curated any of reazuliqbal's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Reazul Iqbal
- Self-managed MongoDB Replica Set on Ubuntu
- Open sourcing BeeChat Client And Developer Documentation
- I am no longer a part of the BDVoter Team
- Ionomy API Client for Node JS
- HE Explorer - Hive-Engine Explorer
- Hive Account Recovery GUI
- How To Buy and Use Splinterlands CREDITS Efficiently
- How to Build and Install Hive Keychain for Firefox
- Claim and Create Hive and Steem Accounts
- 150 Untamed Booster Packs Opening
- SE Explorer - Steem-Engine Explorer
- Development Update - CREDITS, Dark Mode, Price History Tool and More
- How to Use Steem Keychain Login in Your Node JS Website/API
- MonsterMarket.io - Added Starter Set, New Filters, Referral System, and SteemConnect Login
- MonsterMarket.io Features Improvements
- MonsterMarket.io Development Update
- Probably the newest Dolphin of Steem Blockchain 😉
- Some Splinterlands Tools and Personal Achievements
- Script to Estimate Costs of Splinterlands Deck
- Script to Check Splinterlands Pack Openings Value