---
agentTools:
  projectIndex: https://parcel.readme.io/llms.txt
---

# Queries

Queries for Tokens

# token

Returns a single token.

```text
token(id, address, chain_id) {
  /* Token fields */
}
```

## Arguments

#### `address` String

The address of the token to return. Must be used in conjunction with `chain_id`.

#### `chain_id` Int

The identifier of the chain of the token to return. Must be used in conjunction with `address`.

#### `id` Int

The ID of the Token to return.

## Response

#### `Token.*` [Token](https://parcel.readme.io/reference/tokens-definitions)

Any requested field from the Token object.

## Example

#### Request

```graphql GraphQL (id)
query {
  token(id: 3) {
    id
    symbol
    address
    chain {
      id
      name
    }
  }
}
```
```graphql GraphQL (address, chain_id)
query {
  token(address: "0x3845badade8e6dff049820680d1f14bd3903a5d0", chain_id: 1) {
    id
    symbol
    address
    chain {
      id
      name
    }
  }
}
```

#### Response

```json
{
  "data": {
    "token": {
      "id": 3,
      "symbol": "SAND",
      "address": "0x3845badade8e6dff049820680d1f14bd3903a5d0",
      "chain": {
        "id": 1,
        "name": "Ethereum"
      }
    }
  }
}
```

***

# tokens

Returns all available tokens.

```text
tokens(game_id, symbols) {
  /* Token fields */
}
```

## Arguments

#### `game_id` Int

Game identifier for which to return compatible token objects.

#### `symbols` \[String!]

A list of symbols for which to return token objects.

## Response

#### `Token.*` \[[Token](https://parcel.readme.io/reference/tokens-definitions)!]

A list of Token objects returning any requested fields from the Token object.

## Example

#### Request

```graphql GraphQL (game_id)
query {
  tokens(game_id: 2) {
    id
    name
  }
}
```
```graphql GraphQL (symbols)
query {
  tokens(symbols: ["USDC", "MATIC", "WETH"]) {
    id
    name
  }
}
```

#### Response

```json JSON (game_id)
{
  "data": {
    "tokens": [
      {
        "id": 4,
        "symbol": "USDC"
      },
      {
        "id": 11,
        "symbol": "MATIC"
      },
      {
        "id": 6,
        "symbol": "WETH"
      },
      {
        "id": 3,
        "symbol": "SAND"
      },
      {
        "id": 5,
        "symbol": "DAI"
      },
      {
        "id": 1,
        "symbol": "ETH"
      }
    ]
  }
}
```
```json JSON (symbols)
{
  "data": {
    "tokens": [
      {
        "id": 13,
        "symbol": "WETH"
      },
      {
        "id": 6,
        "symbol": "WETH"
      },
      {
        "id": 4,
        "symbol": "USDC"
      },
      {
        "id": 11,
        "symbol": "MATIC"
      }
    ]
  }
}
```