Function screeps::game::market::get_history

source ·
pub fn get_history(resource: Option<ResourceType>) -> Vec<OrderHistoryRecord>
Expand description

Get information about the price history on the market for the last 14 days for a given resource as an Array of OrderHistoryRecords, or for all resources if None. Warning: returns an empty Object instead of an array if there is no history for the resource, verifying the type is recommended before use if the market might be empty.

Screeps documentation