Commodity Prices
Query current commodity market prices and compare across regions.
Consult Price​
GET https://api.yodi.tg/v1/climate/prices?commodity={name}®ion={region}
Query Parameters​
| Parameter | Type | Description |
|---|---|---|
commodity | string | Commodity name (e.g., maize, rice, millet) |
region | string | Region code (e.g., maritime, savanes) |
Example Request​
curl -X GET "https://api.yodi.tg/v1/climate/prices?commodity=maize®ion=maritime" \
-H "x-api-key: YOUR_API_KEY"
Example Response​
{
"message": "PRICE_CHECKED",
"error": false,
"data": {
"commodity": "maize",
"region": "maritime",
"price": 250,
"unit": "FCFA/kg",
"lastUpdated": "2025-07-16T08:00:00Z"
},
"status": 200
}
Compare Prices​
GET https://api.yodi.tg/v1/climate/prices/compare?commodity={name}®ions={r1},{r2}
Query Parameters​
| Parameter | Type | Description |
|---|---|---|
commodity | string | Commodity name |
regions | string | Comma-separated region codes |
Example Request​
curl -X GET "https://api.yodi.tg/v1/climate/prices/compare?commodity=rice®ions=maritime,savanes,kara" \
-H "x-api-key: YOUR_API_KEY"
Example Response​
{
"message": "PRICES_COMPARED",
"error": false,
"data": {
"commodity": "rice",
"regions": [
{ "region": "maritime", "price": 350, "unit": "FCFA/kg" },
{ "region": "savanes", "price": 380, "unit": "FCFA/kg" },
{ "region": "kara", "price": 365, "unit": "FCFA/kg" }
]
},
"status": 200
}