# Get the next query ID

`GET /v3-node-0/smartaccount/{address}/queryID`

Returns the next available query ID for a smart account

## Authorization



## Parameters

- path: address (string; required). Smart account address

Type: string

## Example · cURL

```bash
curl --request GET 'https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID' \
  --header 'Accept: application/json'
```

## Example · JavaScript

```javascript
const response = await fetch("https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID", {
  method: "GET",
  headers: {
    "Accept": "application/json"
  },
});
console.log(response.status, await response.text());
```

## Example · Python

```python
import requests

response = requests.request(
    "GET",
    "https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID",
    headers={"Accept":"application/json"},
    timeout=30,
)
print(response.status_code, response.text)
```

## Response 200 · Trading.api.QueryResponse

**200** application/json — OK

Schema: Trading.api.QueryResponse

Type: object

Required fields: none

- executor_query_id (integer; optional)

executor_query_id example: 0

executor_query_id.Type: integer

executor_query_id.ExecutorQueryID is the current executor query-id counter for the SA — the
next bundle leases at or above it (reconciled against the on-chain used set).

- max_live_query_id (integer; optional)

max_live_query_id example: 0

max_live_query_id.Type: integer

max_live_query_id.MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted
when it has none.

- query_id (integer; optional)

query_id example: 0

query_id.Type: integer

Example



```json
{
  "executor_query_id": 0,
  "max_live_query_id": 0,
  "query_id": 0
}
```

## Response 400 · Trading.api.ErrorResponse

**400** application/json — Bad Request

Schema: Trading.api.ErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

- msg (string; optional)

msg example: string

msg.Type: string

Example



```json
{
  "code": "string",
  "error": "string",
  "externalQueryId": "string",
  "msg": "string"
}
```

## Response 404 · Trading.api.ErrorResponse

**404** application/json — Not Found

Schema: Trading.api.ErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

- msg (string; optional)

msg example: string

msg.Type: string

Example



```json
{
  "code": "string",
  "error": "string",
  "externalQueryId": "string",
  "msg": "string"
}
```

## Response 500 · Trading.api.ErrorResponse

**500** application/json — Internal Server Error

Schema: Trading.api.ErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

- msg (string; optional)

msg example: string

msg.Type: string

Example



```json
{
  "code": "string",
  "error": "string",
  "externalQueryId": "string",
  "msg": "string"
}
```