Integrate Coinremitter In Node JS
Built on Chrome's V8 JavaScript engine, Node.js is a JavaScript runtime. It allows developers to run JavaScript on the server side, creating scalable and efficient network applications. Node.js uses an event-driven, non-blocking I/O model, making it well-suited for real-time, data-intensive applications. It is open-source and supported by a large community of web developers.
Seeing Node.js’ futuristic applications, integrating a reliable platform for processing errorless crypto transactions became necessary. With the help of the Node.js open-source plugin, merchants can directly receive crypto payments on their Node.js websites. Follow the process shown below to integrate Coinremitter into your Node.js website:
You can install Coinremitter package using npm in your project using :
npm i coinremitter-api
You need to include package wherever you want to use this like,
const coinremitter = require('coinremitter-api');
Now, you can access all the methods of package by creating object of class like ,
const obj = new coinremitter('YOUR_API_KEY','PASSWORD','BTC');
You can get your wallet balance by using the “get_balance” call.
balance = obj.getBalance();
It will return either a positive response or an answer to an error if anything goes wrong.
Below you can check the successful response:
{
"flag": 1,
"msg": "Get balance successfully !",
"action": "get-balance",
"data": {
"balance": 1.55882809,
"wallet_name": "wp-withd",
"coin_name": "Bitcoin"
}
}