runelite
This is a typed wrapper of real-time grand exchange prices, brought to you by a partnership between RuneLite and the RuneScape wiki team. Please be aware that this is a fairly new project, and the endpoints may have downtime, and the prices may not be 100% accurate. Read more here.
Acceptable use policy
The wiki team reserve the right to limit access to anyone, if their usage is so frequent that it threatens the stability of the entire runeliteAPI. Please read the acceptable use policy on the wiki.
To ensure this package complies with the use policy, all requests must specify a meaningful user agent.
Table of contents
Installing
npm install runelite
Importing the package
Using import
import * as runeliteAPI from 'runelite';
Using require
const runeliteAPI = require('runelite');
Usage
Latest Price
Get the latest high and low prices for the items that we have data for, and the Unix timestamp when that transaction took place.
const useragent = "https://www.npmjs.com/package/runelite useragent/example";
const latest = await runeliteAPI.latest({
useragent,
});
console.log(latest)
console.log(latest["25849"]);
You may also request specific items:
const latest = await runeliteAPI.latest({ id: 4151, useragent });
const transaction = request["4151"];
console.log(transaction);
Mapping
Gives a list of objects containing the name, id, examine text, members status, lowalch, highalch, GE buy limit, icon file name (on the wiki).
const mapping = await runeliteAPI.mapping({ useragent });
console.log(mapping);
console.log(mapping["4151"]);
Prices
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 5 or 60 minute block the data is from.
const data = await runeliteAPI.prices({ useragent, timestep: "5m" });
console.log(data);
console.log(data["25849"]);
You may optionally provide a timestamp to return prices for. If provided, will display (in this example) 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
const data = await runeliteAPI.prices({ useragent, timestamp: 1634688300, timestep: "5m" });
Time-series
Gives a list of the high and low prices of item with the given id at the given interval, up to 300 maximum.
Available intervals are 5m
, 1h
and 6h
const timeseries = await runeliteAPI.timeseries({ id: 4151, timestep: "5m", useragent });
console.log(timeseries);
console.log(timeseries[0]);
license
MIT