getAvgPricesOnDate

Returns the weighted average price on a specific date for all outcomes

Example

const avgPrice = await flux.getAvgPricesOnDate(0);

Parameters

Parameter

Type

Description

Required

marketId

number

The id of the market in question

True

Returns

Name

Type

Description

lastTradedPrices

Array<Object>

Promise that will resolve an array of objects containing the average price per outcome

‚Äč

E.g.

[

{outcome: 0, avgPrice: 55},

{outcome: 1, avgPrice: 45} ]