How to get rates with API?

Hi developers!
Could you please help me with getting ongoing rates with API?
Ive looked at APIs page but didn`t find anything.

1 Like

What you’d most likely want is our quote function which will give you the return amount of token X given the number of token Y. Here is an example from the docs page.

Request url to quote 10 000 USDT → WBTC

https://api.1inch.exchange/v2.0/quote?fromTokenAddress=0xdac17f958d2ee523a2206206994597c13d831ec7&toTokenAddress=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&amount=10000000000

2 Likes

Thanks a lot! :raised_back_of_hand:

1 Like