Get token price
From UBot Studio
$get token price is a function that returns the current market price of a specified token on a specific blockchain chain.
Parameters
Chain: The blockchain where the token resides.
Token ID: The token for which you want to check the price. This can be the symbol of the token or its contract address.
Return Value
This function returns the current market price of the given token on the specified chain.
Example
log("DAI Token Price: {$get token price("BinanceSmartChain", "DAI")}") log("ETH Token Price: {$get token price("Avalanche", "ETH")}")
The output will be the current price of the selected Token for the specified chain.
Example Output:
DAI Token Price: $1.01
ETH Token Price: $3245.21