Skip to content

ETS API Example Queries

The examples below demonstrate how to use the ETS API to query data from ETS smart contracts.

CTAGs

Get the last 10 CTAGs

 
{
  tags(first: 10, orderBy: timestamp, orderDirection: desc) {
    display
    timestamp
  }
}

Get the last 10 CTAGs created by a specific address

 
{
  tags(
    first: 10,
    orderBy: timestamp,
    orderDirection: desc,
    where: { creator: "0x0394f2afba072bfb020ba057bcc1e91e39ce05c1" }
  ) {
    display
    timestamp
  }
}

Get the revenue summary for #rainbow

{
  tags(where: {machineName: "rainbow"}) {
    creatorRevenue
    ownerRevenue
    relayerRevenue
    protocolRevenue
  }
}