Clipper - Deposit/Swap > $10 Polygon Main Pool
Curated by

Clipper
Call-to-Action
https://clipper.exchange/ID Type
EVM ADDRESS
Cred Type
GRAPHQL
Last Update Time
06/14/2023, 07:16:44
Endpoint
https://api.thegraph.com/***Query
query info($address: String!) {
  # Deposit >$10 Polygon main pool
  deposits(where: {
    depositor: $address,
    amountUsd_gte: 9.5,
    timestamp_gte: 1678233600,
    timestamp_lte: 1680307199 
  }) {
    id
  }
  # Swap >$10 Polygon main pool
  swaps(
    where: {
      origin: $address,
      amountInUSD_gte: 9.5,
      swapType: POOL,
      timestamp_gte: 1678233600,
      timestamp_lte: 1680307199
    }
  ) {
    id
  }
}Expression
function(data) {
    if (data.errors) return 0
    // if user doesn't have either a core pool deposit or a core swap, then it's not eligible
    if (!data.deposits.length || !data.swaps.length) return 0
    // only eligible if user has both conditions
    return 1
}