fragment PortfolioTokenBalanceParts on TokenBalance {
  id
  quantity
  denominatedValue {
    id
    currency
    value
  }
  token {
    ...SimpleTokenDetails
    id
    address
    chain
    symbol
    name
    decimals
    standard
    project {
      id
      name
      logo {
        id
        url
      }
      safetyLevel
      logoUrl
      isSpam
    }
  }
  tokenProjectMarket {
    id
    pricePercentChange(duration: DAY) {
      id
      value
    }
    tokenProject {
      id
      logoUrl
      isSpam
    }
  }
}

query PortfolioBalancesWeb(
  $ownerAddress: String!
  $chains: [Chain!]!
  $includeSmallBalances: Boolean = false
  $includeSpamTokens: Boolean = false
) {
  portfolios(
    ownerAddresses: [$ownerAddress]
    chains: $chains
    valueModifiers: [
      {
        ownerAddress: $ownerAddress
        includeSpamTokens: $includeSpamTokens
        includeSmallBalances: $includeSmallBalances
      }
    ]
  ) {
    id
    tokensTotalDenominatedValue {
      id
      value
    }
    tokensTotalDenominatedValueChange(duration: DAY) {
      absolute {
        id
        value
      }
      percentage {
        id
        value
      }
    }
    tokenBalances {
      ...PortfolioTokenBalanceParts
    }
  }
}
