Ask five central banks for USD/INR and you'll get five slightly different numbers. They fix at different times of day, some publish a mid rate and others buying and selling rates, and some publish INR only through a cross rate.
Frankfurter v2 picks a source for you when you ask for a pair, or lets you choose a provider explicitly. Sometimes you want to see them all side by side: for a reconciliation, a dispute, or just to understand why two systems disagree.
Every official rate for a pair, in one call
import os , requests
r = requests . get ( "https://allratestoday.com/api/v1/central-banks/rates" , params = { "source" : "USD" , "target" : "INR" } , headers = { "Authorization" : f "Bearer {os.environ['ART_KEY']}" } , ) print ( r . json ( ) )
Enter fullscreen mode
Exit fullscreen mode
This returns each covered institution's latest official rate for the pair, with the institution, its publication date and the rate type.…