Loading Market Information
List Available Markets
The Aver API keeps an index of all markets on the blockchain and categorizes them so that they can be easily browsed or searched.
You can use methods within the AverClient object to obtain lists of markets, including the market's pubkey - a unique identifier for where you can find that market on-chain.
Below, we have loaded markets too (which you can understand in detail in the Loading an AverMarket Object section below)
Loading an AverMarket object
Once you've found the market (or markets) you wish to interact with, you can load an AverMarket object.
This object is a client-side representation of an on-chain market, which can be easily synchronized with on-chain data, and used to represent and interact with the market.
The AverMarket objects includes:
Descriptive information - properties, names, times related to the market
Indexing of other accounts where data related to this market is stored
Parameters and rules specifying how the market operates, limits, etc.
Orderbooks and order information for all open orders for each outcome in the market
It's possible to read an enormous amount of information from the AverMarket object to enable various business logic to determine actions.
For each outcome in the market:
Level I orderbook data (best bid/buy and ask/sell prices and quantities)
Level II orderbook data (price-aggregated orders, counts, size)
Level III orderbook data (individual orders)
It's also possible to read relevant properties which may impact trading logic like parameters, conditions, cease trading times, min and max order limits, etc.
You can read more about the properties and methods within the AverMarket object here.
Last updated