runelite
Version:
A real time grand exchange prices API wrapper (runelite).
60 lines (59 loc) • 2.94 kB
TypeScript
import * as Types from "./spec";
/**
* Get the latest high and low prices for the items that we have data for,
* and the Unix timestamp when that transaction took place
* @param useragent - (required) a User-Agent that describes what you're using it for,
* and if you're willing, some sort of contact info (like an email or Discord).
* @param id - (optional) Item ID. If provided, will only display the latest price for this item.
* @returns An associative array object.
* @see https://oldschool.runescape.wiki/w/RuneScape:Real-time_Prices
*/
export declare const latest: (options: {
id?: number;
useragent: string;
}) => Promise<Types.FullTransactionData>;
/**
* Gives a list of objects containing the name,
* id, examine text, members status, lowalch, highalch,
* GE buy limit, icon file name (on the wiki).
*
* The mapping is not updated often, so it is cached.
* @param useragent - (required) a User-Agent that describes what you're using it for,
* and if you're willing, some sort of contact info (like an email or Discord).
* @returns An associative array object.
* @see https://oldschool.runescape.wiki/w/RuneScape:Real-time_Prices
*/
export declare const mapping: (options: {
useragent: string;
}) => Promise<Types.FullMap>;
/**
* Gives 5 or 60 minute average of item high and low prices as well as the number traded
* for the items that we have data on. Comes with a Unix timestamp indicating the block the data is from.
* @param interval - (optional) Either "5m" or "60m". Defaults to "5m".
* @param useragent - (required) a User-Agent that describes what you're using it for,
* and if you're willing, some sort of contact info (like an email or Discord).
* @param timestep - (optional) timestep to return prices for.
* If provided, will display 5-minute averages for all items we have data on for this time.
* The timestamp field represents the beginning of the 5-minute period being averaged
* @returns An associative array object.
* @see https://oldschool.runescape.wiki/w/RuneScape:Real-time_Prices
*/
export declare const prices: (options: {
timestep?: "5m" | "1h";
timestamp?: number | string;
useragent: string;
}) => Promise<Types.TimeSeriesData>;
/**
* Gives a list of the high and low prices of item with the given id at the given interval, up to 300 maximum.
* @param useragent - (required) a User-Agent that describes what you're using it for,
* and if you're willing, some sort of contact info (like an email or Discord).
* @param id - (required) Item id to return a time-series for.
* @param timestep - (required) Timestep of the time-series. Valid options are "5m", "1h" and "6h".
* @returns A timeseries array.
* @see https://oldschool.runescape.wiki/w/RuneScape:Real-time_Prices
*/
export declare const timeseries: (options: {
timestep: "5m" | "1h" | "6h";
id: number | string;
useragent: string;
}) => Promise<Types.TimeSeriesDataPoint[]>;