Politics and War Wiki

This endpoint is deprecated and planned to potentially be removed by December 2023. It is recommended to switch to v3 of the API.

Overview[]

The Trade Price API provides information about a given resource.

Access URL[]

baseurl/tradeprice/?resource={resource name}&key={API key}

If no resource, or an incorrect resource, is provided then it defaults to steel like so

baseurl/tradeprice/?resource=steel&key={API key}

Returned JSON[]

Below is the JSON for the request of with the following notes to consider:

baseurl/tradeprice/?resource=steel&key=a3432b46ff8967
  • This is the only API not returned in a minified form.
  • The "highestbuy" object represents the best offer from the buy offers side of the market.
  • The "lowestbuy" object represents the best sell side offer.
{
    'resource': 'steel', 
    'avgprice': '3038', 
    'marketindex': '21,778', 
    'highestbuy': {
        'date': '2018-12-17 17:28:59', 
        'nationid': '35557', 
        'amount': '1497', 
        'price': '3001', 
        'totalvalue': 4492497
    }, 
    'lowestbuy': {
        'date': '2018-12-17 17:36:36', 
        'nationid': '85827', 
        'amount': '602', 
        'price': '3087', 
        'totalvalue': 1858374
    }
}