Skip to content
Evan Edwards edited this page Feb 20, 2020 · 2 revisions

Documentation

Exchange Class

Initialized as exchange = GrandExchange.Exchange()

retrieve()

Retrieves the dictionary containing the OSBuddy exchange data. Returns a dictionary.

exchange.retrieve()

get_item(item_name)

Returns an an object of the Item class. Takes an item name in string format as input.

Item Class

Initialized as ely = exchange.get_item("Elysian spirit shield")

The item name must match the exact name in game, or it will raise an exception.

prettify()

Prints a nice table containing the data.

Input: ely.prettify()

Output:

+-------+-----------------------+-----------+---------------+---------------+----------------+----------------+-----------------+-------------------+--------------------+
|    ID | Name                  | Members   |   Store Price |   Buy Average |   Buy Quantity |   Sell Average |   Sell Quantity |   Overall Average |   Overall Quantity |
+=======+=======================+===========+===============+===============+================+================+=================+===================+====================+
| 12817 | Elysian spirit shield | True      |       2000000 |     817261007 |              2 |      818497997 |               2 |         817879502 |                  4 |
+-------+-----------------------+-----------+---------------+---------------+----------------+----------------+-----------------+-------------------+--------------------+

item_data()

Returns a dictionary containing the raw item data.

ely.item_data()

Individual parameters

Item.parameter

  • Item.id

The ID of the item.

  • Item.name

The name of the item.

  • Item.members

Whether the item is members or not (True/False.)

  • Item.sp

The store price of the item.

  • Item.buy_average

The buy average of the item.

  • Item.buy_quantity

The buy quantity of the item.

  • Item.sell_average

The sell average of the item.

  • Item.sell_quantity

The sell quantity of the item.

  • Item.overall_average

The overall average sell/buy price of the item.

  • Item.overall_quantity

The overall sell/buy quantity of the item.

Clone this wiki locally