📘
Runescape3-api
  • Introduction
  • Documentation
    • Bestiary
    • Hiscores
    • Runemetrics
    • Grand Exchange
Powered by GitBook
On this page
  • Usage
  • get_catalogue(categoryId: int) -> dict
  • get_runedate() -> dict
  • get_items(categoryId: int, searchString: str, page: int = 1) -> dict
  • get_item_detail(itemId: int) -> dict
  • get_item_graph(itemId: int) -> dict

Was this helpful?

  1. Documentation

Grand Exchange

Usage

from rs3_api import GrandExchange
from rs3_api.models import GECategories
grand_exchange = GrandExchange()

get_catalogue(categoryId: int) -> dict

Gets the number of items determined by the first letter in category.

Parameters

Type

categoryId

int

response = grand_exchange.get_catalogue(GECategories.FAMILIARS)
print(response)
# GECategories is an enum with all available categories.
{ 
# Key = starting letter
# Value = Amount of items starting with key letter in chosen category
'#': 0,
'a': 6,
'b': 15,
'c': 1,
'd': 3,
'e': 2,
'f': 3,
'g': 5,
'h': 3,
'i': 5,
'j': 0,
'k': 1,
'l': 2,
'm': 5,
'n': 1,
'o': 1,
'p': 5,
'q': 0,
'r': 3,
's': 27,
't': 2,
'u': 1,
'v': 5,
'w': 2,
'x': 0,
'y': 0,
'z': 0
}

get_runedate() -> dict

Return the runedate of when the grand exchange was last updated

response = grand_exchange.get_runedate()
print(response)
{'lastConfigUpdateRuneday': 7378}

get_items(categoryId: int, searchString: str, page: int = 1) -> dict

Gets twelve items determined by category and first letters of search string

Parameters

Type

categoryId

int

searchString

str

page

int

1

response = grand_exchange.get_items(GECategories.MELEE_ARMOUR_MID_LEVEL, 'Rune')
print(response)
{
    "total": 220,
    "items": [
        {
            "icon": "https://secure.runescape.com/m=itemdb_rs/1652274347537_obj_sprite.gif?id=11838",
            "icon_large": "https://secure.runescape.com/m=itemdb_rs/1652274347537_obj_big.gif?id=11838",
            "id": 11838,
            "type": "Melee armour - mid level",
            "typeIcon": "https://www.runescape.com/img/categories/Melee armour - mid level",
            "name": "Rune armour set (lg)",
            "description": "Grand Exchange set containing a rune full helm, platebody, legs and kiteshield.",
            "current": {"trend": "neutral", "price": "113.0k"},
            "today": {"trend": "negative", "price": "- 268"},
            "members": "false",
        },
        #.. 1-11 more items
        # Max 12 items per page
    ],
}

get_item_detail(itemId: int) -> dict

Returns current price and price trends information on tradeable items in the Grand Exchange, the category, item image and examine for the given item

Parameters

Type

itemId

int

response = grand_exchange.get_item_detail(21787) # 21787 Steadfast Boots
print(response)
{
    "icon": "https://secure.runescape.com/m=itemdb_rs/1652274347537_obj_sprite.gif?id=21787",
    "icon_large": "https://secure.runescape.com/m=itemdb_rs/1652274347537_obj_big.gif?id=21787",
    "id": 21787,
    "type": "Miscellaneous",
    "typeIcon": "https://www.runescape.com/img/categories/Miscellaneous",
    "name": "Steadfast boots",
    "description": "A pair of powerful-looking boots.",
    "current": {"trend": "neutral", "price": "3.8m", "price_num" 3800000},
    "today": {"trend": "neutral", "price": 0, "price_num": 0},
    "members": "true",
    "day30": {"trend": "negative", "change": "-17.0%"},
    "day90": {"trend": "negative", "change": "-28.0%"},
    "day180": {"trend": "negative", "change": "-37.0%"},
}

get_item_graph(itemId: int) -> dict

Graph shows the prices each day of a given item for the previous 180 days. When no price information is available, then a value of zero is returned.

Parameters

Type

itemId

int

response = get_item_graph(21787)
print(response)
{
    "daily": [
        {
            "epoch": datetime.datetime(
                2021, 11, 15, 0, 0, tzinfo=datetime.timezone.utc
            ),
            "price": 6025392,
        },
        # .. 179 more entries
    ],
    "average": [
        {
            "epoch": datetime.datetime(
                2021, 11, 15, 0, 0, tzinfo=datetime.timezone.utc
            ),
            "price": 6221371,
        },
        # 179 more entries
    ],
}
PreviousRunemetrics

Last updated 3 years ago

Was this helpful?