Get the real-time API

BONBAST.com's API offers accurate and reliable gold prices and IRR exchange rates for businesses. With seamless integration and guaranteed delivery, BONBAST.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

$480 / year

  • Live rates
  • Maximum 10,000 monthly queries

Premier

$960 / year

  • Live rates
  • Maximum 100,000 monthly queries

Ultimate

$1920 / year

  • Live rates
  • Unlimited queries

After completing your purchase, please submit the following form or send your receipt to info@bonbast.com.
We will send your account details to your email address within one day.


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('http://bonbast.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 = "http://www.bonbast.com/api/USER_NAME"
params = {'hash':'Your Secret Key'}
data = urllib.urlencode(params)
req = urllib2.Request(URL)
req.add_data(data)
req.add_header('Content-Type', 'application/x-www-form-urlencoded')
r = urllib2.urlopen(req)
prices = json.load(r)
self.response.out.write("USD(Sell) = %s , USD(Buy) = %s" %(prices['usd1'],prices['usd2']))