Violet

Meso Market

On this page

Use core.meso_market to inspect the open Meso Market and submit buy or sell orders.

Market state required

Rates and listing counts are available only while the Meso Market is open. Read functions return nil when it is unavailable, and actions return false.

Actions validate their arguments and the current interface state. A true result means the action was submitted, not that it has completed.

Functions

core.meso_market.is_open() -> boolean

Returns whether the Meso Market is currently open and available.


core.meso_market.get_average_rate() -> number | nil

Returns the displayed average exchange rate.


core.meso_market.get_remaining_listings() -> number | nil

Returns the number of listings currently available to the character.


core.meso_market.get_sell_rate() -> number | nil

Returns the sell rate currently shown in the interface.


core.meso_market.get_buy_rate() -> number | nil

Returns the buy rate currently shown in the interface.


core.meso_market.buy(rate: number, count: number) -> boolean

Submits a buy order at rate for count units. Both values must be positive whole numbers within the current in-game limits.


core.meso_market.sell(rate: number, count: number) -> boolean

Submits a sell order at rate for count units. Both values must be positive whole numbers within the current in-game limits.

lua
if core.meso_market.is_open() then
    local rate = core.meso_market.get_buy_rate()
    if rate then
        local submitted = core.meso_market.buy(rate, 1)
    end
end