
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
crypto-exchange-manager
Advanced tools
Client for multiple exchanges, supporting tickers informations, as well as additio features as I implement them.
If you only need tickers (different currencies' values) you can use https://github.com/donbobvanbirt/coin-ticker which is dedicated to ticks information. crypto-manager was first a rewrite of this package so give the original module some love ;)
$ npm install crypto-exchange-manager
Require:
const cryptoManager = require('crypto-exchange-manager'); // return an array of available exchanges
Get available asset pairs by exchange:
Use the (always implemented) getPairs() method
const cryptoManager = require('crypto-exchange-manager');
const polynex = new cryptoManager['polynex']();
polynex.getPairs()
.then((pairs) => {
console.log(pairs);
})
// =>
// [
// 'BCN_BTC',
// 'BELA_BTC',
// ...
// ]
Get Ticker Data:
Use the (always implemented) tick() method
const cryptoManager = require('crypto-exchange-manager');
const polynex = new cryptoManager['polynex']();
polynex.tick('BCN_BTC')
.then((tick) => {
console.log(tick); // {...}
})
Will return an object containing the following values (all values are string) :
{
last: // the last traded price
ask: // current ask
bid: // current bid
low: // 24 hour low
high: // 24 hour high
vol: // 24 hour volume
timestamp: // precise time
exchange: // the current exchange, i.e. 'bitfinex'
pair: // the asset pair, i.e. 'BTC_USD'
rawData: // the original, unformatted object received from the exchange api. Differs by exchange.
}
Authenticate user
Currently supported :
- bifinex
- coinbase
const cryptoManager = require('crypto-exchange-manager');
const bifinex = new cryptoManager['bifinex']({
key: '123',
secret: '123'
});
get wallet
Currently supported :
- bifinex
- coinbase
const cryptoManager = require('crypto-exchange-manager');
const bifinex = new cryptoManager['bifinex']({
key: '123',
secret: '123'
});
bifinex.getWallet().then(result => {
console.log(result);
})
Will return an array of currencies with their value in the wallet.
[
{currency: 'ETH', wallet: '1.8'}
]
get book
Currently supported :
- bifinex
- coinbase
const cryptoManager = require('crypto-exchange-manager');
const bifinex = new cryptoManager['bifinex']({
key: '123',
secret: '123'
});
bifinex.getBook().then(result => {
console.log(result);
})
Will return an array of movement in / out of the account of the user for a specific currency. Native value and currency are values in USD (calculated with historical values).
[
{
currency: 'ETH',
value: '1.8',
completed: true,
timestamp: '154787488',
nativeCurrency: 'USD',
nativeValue: 500,
}
]
Utils
Convert values of currency (live or historical).
convertToUSDIfPossible({
value : 1,
currency : 'ETH',
timestamp : '1519293784' (optionnal)
})
FAQs
Wrapper for cryptocurrencies exchanges apis.
The npm package crypto-exchange-manager receives a total of 8 weekly downloads. As such, crypto-exchange-manager popularity was classified as not popular.
We found that crypto-exchange-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.