Function mango_v4_client::perp_pnl::fetch_top
source · pub async fn fetch_top(
context: &MangoGroupContext,
fallback_config: &FallbackOracleConfig,
account_fetcher: &impl AccountFetcher,
perp_market_index: PerpMarketIndex,
direction: Direction,
count: usize
) -> Result<Vec<(Pubkey, MangoAccountValue, I80F48)>>
Expand description
Returns up to count
accounts with highest abs pnl (by direction
) in descending order.
Note: keep in sync with perp.ts:getSettlePnlCandidates