getMarketPrices

Returns the current market price and corresponding depth for each outcome of a specific market

Example

const marketPrices = await flux.getMarketPrices(0);

Parameters

Parameter

Type

Description

Required

marketId

number

The id of the market in question

True

Returns

Name

Type

Description

marketPrices

Object<outcomeId, Object>

Promise that will resolve an object that maps outcomes to market price and depth.

Depth is denominated in shares. So depth * price = spendable.

E.g.

{

"0": { marketPrice: 39, depth: 400 },

"1": { marketPrice: 60, depth: 100 },

}