Commodity Pricing API

API Endpoint Specifications

  • Endpoint Path: /api/1/commodity-pricing
  • Type of Data: JSON & 20/minute
  • Data Source: USA GOV
  • Request Limit: 500 request/month
  • Script & Integration: Code to integrate with cURL, JS, Python, Ruby, Php, Node.js, Java, .NET, Rust, Go, Typescript
Commodity Pricing API Endpoint Basic Info

API Endpoint Path

required

Commodity Pricing API

api/1/commodity-pricing


Call Method

Required

POST

Type of Data Return

JSON

Output structured JSON data on multi commodity pricing


Available API Arguments & Parameters

token

required

BUYFROMLO API token. Free and paid subscription API are available: /api/1/commodity-pricing-data-generator, and accessible to on-site APP on /app/1/commodity-pricing-data-generator as well

commodityname

required

Input a commodity name. Current options: arabica_coffee, robusta_coffee, global_sugar, global_wheat, global_oat, global_potato, global_cocoa, global_cheese, kenyan_tea, global_soybean, thai_rice, global_milk, global_corn, global_palmOil, global_soybeanOil, global_sunflowerOil, global_oliveOil, global_cotton, global_wool, europe_brent_oil, usa_wti, ethanooil, copper, zinc, nickel, alunium, gold, silver



Commodity Pricing API

api/1/commodity-pricing


Code Integration and Response

Python Code Sample


import requests

apiendpoint = "https://api.buyfromlo.com/api/1/commodity-pricing"

## Required Arguments & Parameters ##
token = "your buyfromlo token"
commodityname = "Enter a commodity name referring to the options"

data={"commodityname": commodityname}
headers={"Authorization": "Bearer " + token}

## Call the api ##
response = requests.post(apiendpoint, json=data, headers=headers)
print(response.status_code)
print(response.json())
                        

JSON Response Sample


{
    "Date":"",
    "commodity name + value":""
}