Real-time API for Iranian Rial exchange rates

BON-BAST.com's API offers accurate and reliable gold prices and Iranian Rial (IRR) exchange rates for businesses. With seamless integration and guaranteed delivery, BON-BAST.com's exchange rates is the trusted choice for hundreds of organizations worldwide.

  • Access IRR exchange rates for 28+ currencies and gold prices
  • Easily integrate data into your website
  • Accurate & reliable rates that are trusted globally
  • Flexible packages to meet your business needs

Format & Delivery

  • API is accessed via HTTP POST
  • JSON format

Plans & Pricing

Basic Plan

$480 / year

  • Live rates
  • Maximum 10,000 monthly queries

Premier Plan

$960 / year

  • Live rates
  • Maximum 100,000 monthly queries

Ultimate Plan

$1920 / year

  • Live rates
  • Unlimited queries

Currently, we accept payments only via cryptocurrencies.

Please send your desired plan and the cryptocurrency you wish to use for payment to [email protected] so we can provide you with our wallet address. After payment, your username and API Key will be sent to you.

Important: If you do not receive an email within 12 hours after submitting your request, please check your spam folder.
To ensure our emails do not go to your spam folder, please add our email address to your contact list.


Parsing JSON in PHP:

$data = array('hash' => 'Your Secret Key');
$opts = array('http' =>
    array(
        'method'  => 'POST',
    	'header'  => "Content-type: application/x-www-form-urlencoded",
        'content' => http_build_query($data)
    )
);

$context  = stream_context_create($opts);

$content = file_get_contents('https://www.bon-bast.com/api/USER_NAME', false, $context);
$json = json_decode($content, true);

print $content;

print "USD(Sell) = $json[usd1]";
print "USD(Buy) = $json[usd2]";
      	

Parsing JSON in Python:

URL = "https://www.bon-bast.com/api/USER_NAME"
params = {'hash':'Your Secret Key'}
data = urllib.parse.urlencode(params)
req = urllib.request.Request(url=URL)
req.data = data.encode('utf8')
req.add_header('Content-Type', 'application/x-www-form-urlencoded')
r = urllib.request.urlopen(req)
prices = json.load(r)
print("USD(Sell) = %s , USD(Buy) = %s" %(prices['usd1'],prices['usd2']))