{"format":"opendoc-document","version":1,"url":"https://docs.storm.tg/developers/operations/getqueryid","title":"Get the next query ID","description":"GET /v3-node-0/smartaccount/{address}/queryID: Returns the next available query ID for a smart account","kind":"api-operation","locale":"en","inLanguage":"en","lastModified":"2026-10-09T14:26:32+03:00","revision":"d36475e7b456c737fae6933fa27b7e1bc2687f2c19291b05725ab2c4e8f79d7a","section":{"title":"For Developers","url":"https://docs.storm.tg/developers"},"representations":{"html":"https://docs.storm.tg/developers/operations/getqueryid","markdown":"https://docs.storm.tg/developers/operations/getqueryid.md","json":"https://docs.storm.tg/developers/operations/getqueryid.json"},"translations":{"en":"https://docs.storm.tg/developers/operations/getqueryid"},"operation":{"id":"GetQueryID","method":"GET","path":"/v3-node-0/smartaccount/{address}/queryID","summary":"Get the next query ID","description":"Returns the next available query ID for a smart account","tags":["Smart accounts"],"deprecated":false,"parameters":[{"name":"address","location":"path","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string","required":true,"description":"Smart account address","example":"string"}],"bodies":[],"responses":[{"status":"200","description":"OK","mediaType":"application/json","properties":[{"name":"executor_query_id","type":"integer","required":false,"description":"ExecutorQueryID is the current executor query-id counter for the SA — the\nnext bundle leases at or above it (reconciled against the on-chain used set).","example":"0","schema":{"type":"integer","types":["integer"],"description":"ExecutorQueryID is the current executor query-id counter for the SA — the\nnext bundle leases at or above it (reconciled against the on-chain used set).","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"max_live_query_id","type":"integer","required":false,"description":"MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted\nwhen it has none.","example":"0","schema":{"type":"integer","types":["integer"],"description":"MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted\nwhen it has none.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"query_id","type":"integer","required":false,"example":"0","schema":{"type":"integer","types":["integer"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/Trading.api.QueryResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"executor_query_id","type":"integer","required":false,"description":"ExecutorQueryID is the current executor query-id counter for the SA — the\nnext bundle leases at or above it (reconciled against the on-chain used set).","example":"0","schema":{"type":"integer","types":["integer"],"description":"ExecutorQueryID is the current executor query-id counter for the SA — the\nnext bundle leases at or above it (reconciled against the on-chain used set).","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"max_live_query_id","type":"integer","required":false,"description":"MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted\nwhen it has none.","example":"0","schema":{"type":"integer","types":["integer"],"description":"MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted\nwhen it has none.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"query_id","type":"integer","required":false,"example":"0","schema":{"type":"integer","types":["integer"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"executor_query_id\": 0,\n  \"max_live_query_id\": 0,\n  \"query_id\": 0\n}","headers":[]},{"status":"400","description":"Bad Request","mediaType":"application/json","properties":[{"name":"code","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"error","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"externalQueryId","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"msg","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/Trading.api.ErrorResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"code","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"error","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"externalQueryId","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"msg","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"code\": \"string\",\n  \"error\": \"string\",\n  \"externalQueryId\": \"string\",\n  \"msg\": \"string\"\n}","headers":[]},{"status":"404","description":"Not Found","mediaType":"application/json","properties":[{"name":"code","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"error","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"externalQueryId","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"msg","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/Trading.api.ErrorResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"code","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"error","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"externalQueryId","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"msg","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"code\": \"string\",\n  \"error\": \"string\",\n  \"externalQueryId\": \"string\",\n  \"msg\": \"string\"\n}","headers":[]},{"status":"500","description":"Internal Server Error","mediaType":"application/json","properties":[{"name":"code","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"error","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"externalQueryId","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"msg","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/Trading.api.ErrorResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"code","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"error","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"externalQueryId","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"msg","type":"string","required":false,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"code\": \"string\",\n  \"error\": \"string\",\n  \"externalQueryId\": \"string\",\n  \"msg\": \"string\"\n}","headers":[]}],"security":[],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID' \\\n  --header 'Accept: application/json'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\"\n  },\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"⚡ About Storm Trade","url":"https://docs.storm.tg"},{"title":"For Developers","url":"https://docs.storm.tg/developers"},{"title":"Get the next query ID","url":"https://docs.storm.tg/developers/operations/getqueryid"}],"headings":[{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Get the next query ID\n\n`GET /v3-node-0/smartaccount/{address}/queryID`\n\nReturns the next available query ID for a smart account\n\n## Authorization\n\n\n\n## Parameters\n\n- path: address (string; required). Smart account address\n\nType: string\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID' \\\n  --header 'Accept: application/json'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\"\n  },\n});\nconsole.log(response.status, await response.text());\n```\n\n## Example · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.storm.tg/v3-node-0/smartaccount/{address}/queryID\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n## Response 200 · Trading.api.QueryResponse\n\n**200** application/json — OK\n\nSchema: Trading.api.QueryResponse\n\nType: object\n\nRequired fields: none\n\n- executor_query_id (integer; optional)\n\nexecutor_query_id example: 0\n\nexecutor_query_id.Type: integer\n\nexecutor_query_id.ExecutorQueryID is the current executor query-id counter for the SA — the\nnext bundle leases at or above it (reconciled against the on-chain used set).\n\n- max_live_query_id (integer; optional)\n\nmax_live_query_id example: 0\n\nmax_live_query_id.Type: integer\n\nmax_live_query_id.MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted\nwhen it has none.\n\n- query_id (integer; optional)\n\nquery_id example: 0\n\nquery_id.Type: integer\n\nExample\n\n\n\n```json\n{\n  \"executor_query_id\": 0,\n  \"max_live_query_id\": 0,\n  \"query_id\": 0\n}\n```\n\n## Response 400 · Trading.api.ErrorResponse\n\n**400** application/json — Bad Request\n\nSchema: Trading.api.ErrorResponse\n\nType: object\n\nRequired fields: none\n\n- code (string; optional)\n\ncode example: string\n\ncode.Type: string\n\n- error (string; optional)\n\nerror example: string\n\nerror.Type: string\n\n- externalQueryId (string; optional)\n\nexternalQueryId example: string\n\nexternalQueryId.Type: string\n\n- msg (string; optional)\n\nmsg example: string\n\nmsg.Type: string\n\nExample\n\n\n\n```json\n{\n  \"code\": \"string\",\n  \"error\": \"string\",\n  \"externalQueryId\": \"string\",\n  \"msg\": \"string\"\n}\n```\n\n## Response 404 · Trading.api.ErrorResponse\n\n**404** application/json — Not Found\n\nSchema: Trading.api.ErrorResponse\n\nType: object\n\nRequired fields: none\n\n- code (string; optional)\n\ncode example: string\n\ncode.Type: string\n\n- error (string; optional)\n\nerror example: string\n\nerror.Type: string\n\n- externalQueryId (string; optional)\n\nexternalQueryId example: string\n\nexternalQueryId.Type: string\n\n- msg (string; optional)\n\nmsg example: string\n\nmsg.Type: string\n\nExample\n\n\n\n```json\n{\n  \"code\": \"string\",\n  \"error\": \"string\",\n  \"externalQueryId\": \"string\",\n  \"msg\": \"string\"\n}\n```\n\n## Response 500 · Trading.api.ErrorResponse\n\n**500** application/json — Internal Server Error\n\nSchema: Trading.api.ErrorResponse\n\nType: object\n\nRequired fields: none\n\n- code (string; optional)\n\ncode example: string\n\ncode.Type: string\n\n- error (string; optional)\n\nerror example: string\n\nerror.Type: string\n\n- externalQueryId (string; optional)\n\nexternalQueryId example: string\n\nexternalQueryId.Type: string\n\n- msg (string; optional)\n\nmsg example: string\n\nmsg.Type: string\n\nExample\n\n\n\n```json\n{\n  \"code\": \"string\",\n  \"error\": \"string\",\n  \"externalQueryId\": \"string\",\n  \"msg\": \"string\"\n}\n```","text":"Get the next query ID Returns the next available query ID for a smart account GET /v3-node-0/smartaccount/{address}/queryID Smart accounts address Smart account address string 200 OK 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). integer max_live_query_id MaxLiveQueryID is the highest query-id among the SA's live bundles, omitted when it has none. integer query_id integer 400 Bad Request code string error string externalQueryId string msg string 404 Not Found code string error string externalQueryId string msg string 500 Internal Server Error code string error string externalQueryId string msg string","api":{"title":"Storm API reference","version":"3.0","documentation":"https://docs.storm.tg/developers/overview","playgroundServer":"https://api.storm.tg"}}