CurrencyConverter
Conversion is as easy as a few lines of code!
This Lib is deprecated. Use CurrencyQuote Lib
Currency values are refreshed every 60 minutes.

FREE

    Maximum of 100 requests/hr
    Shared with all users who are acccessing it for free.
    Downtime when there's a need to restart the server for bug fixes and enhancements

PAID

Get your API key and run in /setup
1
Libs.CurrencyConverter.setupApiKey(API_KEY);
Copied!

Example bot @DemoCurrencyConverterBot

Example code

In any command:
1
let amount = 1;
2
let onSucces = '/onconvert';
3
let conversation = 'USD_EUR' // others: USD_BTC, BTC_USD, CNY_BTC and etc...
4
Libs.CurrencyConverter.convert(conversation, amount, onSucces);
Copied!

In command '/onconvert':

1
// result stored in params
2
Bot.sendMessage(params);
Copied!
Last modified 3mo ago