How to get exchange rates from Monobank to MyChat?

Today, Dmytro Dubilet (a co-founder of online bank "Monobank") have published a post on his Telegram channel about Monobank Open API, and we decided to make a simple integration with our MyChat enterprise messenger.

You open the dialogue with the bot Elisa, and write any word such as "exchange", "currency". The bot connects to Monobank and displays two currency pairs — hryvnia-dollar or hryvnia-euro with exchange rates and currency sales. No registrations or SMS needed :)

Exchange rates in MyChat Client

Technically, it is all done via the script on the server. MyChat Server intercepts the message for the bot, sees that a user wants to know about the exchange rates, and sends a simple HTTP GET query. Then, the server processes a received JSON file getting the currency pairs you need.

After processing, it sends the reply in a good view.

The script text is linked on the event OnPrivateMessage:

A script for exchange rates from Monobank to MyChat Client

Hope it will be helpful!

Служба поддержки