The interface and request parameters for querying token exchange rates are actually the same as those for adding liquidity to the pool.
Through the following interface, you can obtain the current exchange rate of the selected token and the total number of pools in the liquidity pool. The main purpose of this interface in the exchange process is to:
Display the exchange rate to users
Calculate the estimated amount that can be exchanged
exportinterfaceSwapTickInfo { tick1_volume:string; // Total amount of send_tick tokens in the pool tick2_volume:string; // Total amount of receive_tick tokens in the pool tick1_per_tick2:string; // Amount of send_tick per 1 receive_tick tick2_per_tick1:string; // Amount of receive_tick per 1 send_tick token:string; // User credential, to be passed as is to the get_swap_psbt2 interface platform_service_fee_percent?:string; // Buy - Platform service fee liquider_service_fee_percent?:string; // Buy - LP profit platform_service_fee_sell_percent?:string; // Sell - Platform service fee liquider_service_sell_percent?:string; // Sell - LP profit}