getClaimable

Returns the amount of funds a user can claim in a market after it's finalized.

Example

const claimable = await flux.getClaimable(
0, // marketId
"alice" // accountId
);

Parameters

Parameter

Type

Description

Required

marketId

number

The id of a specific market

True

accountId?

string

The accountId the claimable amount needs to be calculated for. Will default to the signed in account.

False

Returns

Name

Type

Description

claimable

Promise<number>

Returns a promise that resolves the total amount claimable, denominated in Fdai(1e18)