African market data API — commodity prices, exchange rates, and economic indicators
# Sokoni — African Market Data API
Real-time commodity prices, exchange rates, and economic indicators across African markets. Sokoni (Swahili for "market") provides structured, developer-friendly access to market data.
## Quick Start
```bash
git clone
github.com
cd sokoni
npm install
npm run dev
# API at
localhost
```
## API
```
GET /commodities All prices (filter by ?category=&location=&minPrice=&maxPrice=)
GET /commodities/:id Single commodity
GET /rates Exchange rates
GET /rates/:pair Single rate (e.g. USD/KES)
GET /search?q=maize Search commodities
GET /summary Market overview
```
## Example
```bash
# Get grain prices in Kenya
curl
localhost
# Check USD to KES rate
curl
localhost
```
## Data Coverage
- **Grains**: Maize, wheat, rice, beans (Kenya, Uganda, Tanzania, Nigeria)
- **Livestock**: Beef, goat, chicken, milk (East Africa)
- **Produce**: Tomatoes, onions, potatoes, cassava (Regional)
- **Fuel**: Petrol, diesel prices (Kenya)
- **Minerals**: Gold (Regional)
- **Currencies**: 9 exchange rate pairs across major African economies
## Stack
- Hono (lightweight HTTP framework)
- TypeScript
- Designed for Cloudflare Workers
## Status
Active development. Data sources are curated and updated regularly. Future versions will include live scraping from African exchange APIs.