GraphQL Queries

GraphQL URIs

Mainnet

Testnet

Examples

You can find all the available queries in the Docs section on the right of the playground:

Here is an example of querying a CW20 ADO for information:

query CW20($contractAddress: String!) {
  ADO {
    cw20(address: $contractAddress) {
      address
      marketingInfo {
        description
        logo
        marketing
        project
      }
      minter {
        cap
        minter
      }
    }
  }
}

Result

You can also try the query by running the following in your terminal:

curl 'https://api.andromedaprotocol.io/graphql/testnet' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Connection: keep-alive' \
-H 'DNT: 1' \
-H 'Origin: https://api.andromedaprotocol.io' \
--data-binary '{"query":"query CW20($contractAddress: String!) {\n  ADO {\n    cw20(address: $contractAddress) {\n      address\n      marketingInfo {\n        description\n        logo\n        marketing\n        project\n      }\n      minter {\n        cap\n        minter\n      }\n    }\n  }\n}\n","variables":{"contractAddress":"andr10n3zrq9z7e5qmqhryazxmgjx7tkjumyudtv34j6vzlpst5r8g9xsex8zav"}}' --compressed

Query chain Ids for all chains:

query chainConfigs{
  chainConfigs{
    allConfigs{
      chainId
    }
  }
}

Result

curl 'https://api.andromedaprotocol.io/graphql/testnet' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Connection: keep-alive' \
-H 'DNT: 1' \
-H 'Origin: https://api.andromedaprotocol.io' \
--data-binary '{"query":"query chainConfigs{\n  chainConfigs{\n    allConfigs{\n      chainId\n    }\n  }\n}","variables":{"contractAddress":"andr10n3zrq9z7e5qmqhryazxmgjx7tkjumyudtv34j6vzlpst5r8g9xsex8zav"}}' --compressed

You can find more GQL query formats here.

Last updated