Jetton prices API
In this article, we will discuss different ways to retrieve Jetton’s historical prices on Decentralized Exchanges, DEXes.
Each swap operation, whether between a native asset (Toncoin) and Jetton or between two distinct Jettons, has its price, a fixed exchange rate of one asset to another. This price is calculated by the internal DEX math algorithm, called AMM. Some services require information about previous swaps on the blockchain to use it in their internal business logic or to simply show statistics to users.
Here is a smart contract snippet in Tolk illustrating how you can send the ‘provide’ message: