Action: Crypto price¶
Get the price of any cryptocurrency listed in the VisualMaker wallet using the following format:
#ActionID.fiat_currency.cryptocurrency#
- Replace
ActionID
with the action ID of this action (Crypto price
). - Replace
fiat_currency
with the name of a fiat currency, such asUSD
orEUR
. - Replace
cryptocurrency
with a cryptocurrency, such asBTC
orETH
.
You can write the currency names in uppercase or lowercase.
Supported fiat currencies:¶
- AED, AUD, CAD, CHF, CNY, EUR, GBP, IDR, INR, JPY, NGN, PHP, RUB, USD
Supported cryptocurrencies:¶
- AVAX, BCH, BNB, BTC, DAI, DASH, DGB, DOGE, ETH, LTC, NOT, POL, SHIB, SOL, TON, TRX, USDC, USDT, XMR
How to configure the action?¶
1. Create the action¶
- Go to your bot and enter the editor by pressing
🛠 Edit
. - Select the button or command where you want to add this action, or create a new one.
- Go to
Actions 🌟
→🎯 New action
→⚖️ Crypto price
. - Press
Configure 🛠
to set it up.
2. Configure the options¶
This action has no options.
3. Activate the action¶
Press ✅ Activate
to activate this action and make it functional.
What does the action return through its ID?¶
It returns the price of the specified cryptocurrency in the chosen fiat currency, expressed as a numeric value.
Practical example: Get the price of TON in USD and EUR¶
In this example, we will retrieve the price of TON
in USD
and EUR
and send it to the user.
1. Create a new button¶
- Enter the editor mode by pressing
🛠 Edit
on your bot. - Press
✳️ New button | command
. - Enter the button name, for example:
TON price
. - Press
Actions 🌟
to configure the actions for this button.
2. Add the necessary actions¶
a) Action 1: Crypto price¶
- Press
🎯 New action
and select⚖️ Crypto price
. - This action requires no configuration; simply activate it by pressing
✅ Activate
. - Copy the Action ID of this action, as you will need it shortly.
b) Action 2: Send message¶
- Press
🎯 New action
→✉️ Send message
. -
Press
Configure 🛠
→💬 Set message 💬
and enter:TON price: USD: {#ActionID.USD.TON#} EUR: {#ActionID.EUR.TON#}
Replace
ActionID
with the Action ID of theCrypto price
action that you just copied. -
Return to the actions menu and activate this action by pressing
✅ Activate
.
Final result¶
- The user taps the
TON price
button. - The bot returns the price of
TON
inUSD
andEUR
.