> For the complete documentation index, see [llms.txt](https://docs.dexlab.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexlab.space/products/supertools-for-xpla/cw20-token-creation/query-contract.md).

# 2️⃣ Query Contract

Querying a CW20 token means gathering information related to that token directly from the blockchain.

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2F2A1o4fdMTA0tyIeT2RR7%2FQuery.png?alt=media&amp;token=343b59e5-1417-4c81-9062-a25ed411bcb0" alt=""><figcaption></figcaption></figure>

Type down your CW20 token contract address. [How to Get My CW20 Token Contract Address](/products/supertools-for-xpla/cw20-token-creation/how-to-get-my-cw20-token-contract-address.md)

Then query response appears on the right side.

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2Ftc3TZFPMODJjhaCO12O7%2FScreen%20Shot%202023-05-03%20at%2016.17.24%20PM.png?alt=media&amp;token=212b4c9b-ce15-494c-9fdc-1033ad6fcfe5" alt="" width="375"><figcaption></figcaption></figure>

**All Accounts**, **Minter**, and **Marketing** queries do not require additional parameters other than the CW20 contract address. Required parameters for other queries are shown below.

* **Balance** of a specific address
  * Owner Address
* **Allowance** is an amount allowed by some address to another address for spending or burning.
  * Allower address
  * Spender address
* **All Allowance** is the list of all allowances an address has provided.
  * Allower Address
* **All Accounts** that have the token.
* **Minter** address for the token contract.
* **Marketing** information is provided by the token.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dexlab.space/products/supertools-for-xpla/cw20-token-creation/query-contract.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
