Developer API

Guides

Gold prices in a Flutter app

Read gold prices by karat in Dart, keep them a few minutes, and show when they were updated.

GET /v1/gold returns every karat per gram in EGP, the gold pound, and the ounce in dollars. It works on the Free plan.

Read the prices

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

class GoldPrice {
  final String karat;
  final double buy, sell;
  GoldPrice(this.karat, this.buy, this.sell);
}

DateTime? _at;
List<GoldPrice> _cache = [];

Future<List<GoldPrice>> goldPrices(String key) async {
  // Prices change a few times an hour, so keep them 5 minutes.
  if (_at != null && DateTime.now().difference(_at!).inMinutes < 5) return _cache;
  final res = await http.get(Uri.parse('https://api.geneh.app/v1/gold'),
      headers: {'Authorization': 'Bearer $key'});
  final data = jsonDecode(res.body) as Map<String, dynamic>;
  _cache = [
    for (final p in data['prices'])
      if ((p['instrument'] as String).endsWith('k_g'))
        GoldPrice(p['instrument'], (p['buy'] as num).toDouble(), (p['sell'] as num).toDouble()),
  ];
  _at = DateTime.now();
  return _cache;
}

Keep your key safe

A key inside an app can be read by anyone who opens the app. For a public app, call the API from your own server and cache the answer there. Then one key serves every user and stays within your plan.

Always show updated_at next to the prices, so people know how fresh they are.

Gold prices

The week's prices in your inbox

The dollar, gold, silver and the top savings returns, every Sunday morning. Free, and you can unsubscribe any time.

We'll send you a link to confirm. No account needed.

Rates shown are for information only, and the rate you get at the branch or at checkout may differ. Confirm it with the bank or provider before you buy, sell or send. Geneh does not sell currency or gold and does not give investment advice.

Get it on Google PlayDownload on the App Store
© 2026 Daleenda For IT Developments. All rights reserved.Built and run by

We use cookies. Necessary ones always run. Choose what else Geneh may store.