Fetch an Account's P&L

Fetch the historical P&L of a given account

This query can be used to fetch the historical per position P&L of a Notional user:

{
  accounts(where:{id: "0x4e8014ff5bace498dab1a9e2b5c3f4240bc059b6"}) {
    id
    balances {
      id
      token { symbol } 
      snapshots(orderBy:blockNumber, orderDirection:desc) {
        id
        currentBalance
        _accumulatedBalance
        _accumulatedCostRealized
        _accumulatedCostAdjustedBasis
        adjustedCostBasis
        currentProfitAndLossAtSnapshot
        totalILAndFeesAtSnapshot
        totalProfitAndLossAtSnapshot
        totalInterestAccrualAtSnapshot
        profitLossLineItems {
          id
          tokenAmount
          bundle {bundleName}
          underlyingAmountRealized
          underlyingAmountSpot
          realizedPrice
          spotPrice
        }
      }
    }
  }
}

Last updated