Skip to main content

apiverve_commodityprices 1.2.7 copy "apiverve_commodityprices: ^1.2.7" to clipboard
apiverve_commodityprices: ^1.2.7 copied to clipboard

Commodity Prices returns the World Bank Pink Sheet's monthly average price for 58 agricultural, fertilizer and base metal commodities: copper, aluminum, nickel, zinc, tin, iron ore, wheat, maize, rice [...]

Commodity Prices API - Dart/Flutter Client #

Commodity Prices returns the World Bank Pink Sheet's monthly average price for 58 agricultural, fertilizer and base metal commodities: copper, aluminum, nickel, zinc, tin, iron ore, wheat, maize, rice, soybeans, coffee, cocoa, sugar, cotton, palm oil, urea and more. Each price comes with the previous month, the monthly change, the year-over-year change and the 12-month range, with monthly history back to 1960.

pub package License: MIT

This is the Dart/Flutter client for the Commodity Prices API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_commodityprices: ^1.2.7

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_commodityprices/apiverve_commodityprices.dart';

void main() async {
  final client = CommoditypricesClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'commodity': 'copper',
      'group': 'base_metals',
      'unit': 'lb',
      'month': '2024-06',
      'history': 12
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "count": 1,
    "month": "2026-10",
    "prices": [
      {
        "commodity": "copper",
        "name": "Copper",
        "group": "base_metals",
        "month": "2026-10",
        "price": 14508,
        "currency": "USD",
        "unit": "metric_ton",
        "publishedUnit": "metric_ton",
        "previousMonth": "2026-09",
        "previousPrice": 14474,
        "change": 34,
        "changePercent": 0.23,
        "changeDirection": "up",
        "yearAgoPrice": 10740,
        "yearOverYearPercent": 35.08,
        "high12m": 14508,
        "high12mMonth": "2026-10",
        "low12m": 10812,
        "low12mMonth": "2025-11"
      }
    ]
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
120
points
90
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Commodity Prices returns the World Bank Pink Sheet's monthly average price for 58 agricultural, fertilizer and base metal commodities: copper, aluminum, nickel, zinc, tin, iron ore, wheat, maize, rice, soybeans, coffee, cocoa, sugar, cotton, palm oil, urea and more. Each price comes with the previous month, the monthly change, the year-over-year change and the 12-month range, with monthly history back to 1960.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_commodityprices