node-quites-lib
Official library for working with API Quites
Install
npm init
npm i node-quites-lib
Basic Usage
const Quites = require("node-quites-lib");
const client = new Quites();
client.getList().then(data => console.log(data));
client.on("message", message => {
console.log(message);
});
Methods
-
client.getQuotes(...param);
- Get quotes for a specific cryptocurrency pair.
- Options:
- param (Any available cryptocurrency in our API)
-
client.convert({ from, to, amount });
- Convert from one cryptocurrency to another.
- Options:
- from (What cryptocurrency to convert from)
- to (What cryptocurrency to convert to)
- amount (Optional. The amount of received cryptocurrency)
-
client.getList({ pair, above, below });
- Get a list of available cryptocurrency pairs.
- Options:
- above (Optional. Sorting cryptocurrencies by a price higher than the specified one)
- below (Optional. Sorting cryptocurrencies at a price below the specified one)
Examples
client.getQuotes("BTC", "eth", "Xrp").then(data => console.log(data));
client.convert({ from: "BTC", to: "ETH", amount: 100 }).then(data => console.log(data));
client.getList({ above: 10, below: 20 }).then(data => console.log(data));