getShareBalanceForUserForMarket

Returns a users balance for each outcome at which price in a specific market

Example

const shareBalance = await flux.getShareBalanceForUserForMarket(0, "my_account");

Parameters

Parameter

Type

Description

Required

marketId

number

The id of the market in question

True

accountId

string

The account id whose balance should be returned

True

Returns

Name

Type

Description

lastTradedPrices

Object

Promise that will resolve an array of balances

‚Äč

E.g.

[ {avg_price: 60, balance: 200, outcome: 0},

{avg_price: 40, balance: 200, outcome: 1}, ]