v2.0

Using Dinarlive

Everything you need to get started with Dinarlive in your project.

1

Rate limiting

Dinarlive is free and does not require an account or API key. Requests are limited to 10 per minute per IP address to keep the service stable for everyone.

If you need higher limits, cache prices in your own database and refresh them every few hours instead of calling the API on every page view.

GET /api/v2/get-price?id=5&location=erbil
Limit: 10 requests / minute / IP
2

Items

When you want to get the price of an item, you need to know its id.

Below are the ids of all items available on Dinarlive.

1

ئاڵتونی عەیارە 18

2

ئاڵتونی عەیارە 21

3

ئاڵتونی عەیارە 24

4

ئاڵتونی عەیارە 22

5

100 دۆلار

6

100 یۆرۆ

7

100 پاوەند

8

100 لیرەی تورکی

9

100،000 تمەنی ئێرانی

3

Getting the latest price

Now that you know the item ids, request the price like this.

To get the price you must also specify the location because prices vary by location. Available locations are baghdad, duhok, erbil, kirkuk, sulaymaniah.

value is the item price, and created_at is when this price was recorded; by this date you can tell how fresh this price is.

Endpoint

GET https://dinarlive.com/api/v2/get-price?id=5&location=baghdad

Sample JSON Response

{
  "value": 146750,
  "created_at": "2026-03-13 22:00:00"
}
4

Code examples

Below we have provided code some examples for requesting the price of dollar, for Baghdad city..

Python

import requests

url = "https://dinarlive.com/api/v2/get-price?id=5&location=baghdad"

response = requests.get(url)
data = response.json()
value = data["value"]
created_at = data["created_at"]

PHP

$url = 'https://dinarlive.com/api/v2/get-price?id=5&location=baghdad';
$response = file_get_contents($url);
$data = json_decode($response, true);
$value = $data['value'];
$created_at = $data['created_at'];

Dart

import 'package:http/http.dart' as http;
import 'dart:convert';

final url = Uri.parse('https://dinarlive.com/api/v2/get-price?id=5&location=baghdad');
final response = await http.get(url);
final data = jsonDecode(response.body);
final value = data['value'];
final created_at = data['created_at'];

JavaScript

const response = await fetch(
  'https://dinarlive.com/api/v2/get-price?id=5&location=baghdad'
);
const data = await response.json();
const value = data.value;
const created_at = data.created_at;

Tutorial complete!

For any questions, issues, or suggestions contact the developer.

Contact