Skip to content

API overview ​

NetworkBase URL
Mainnethttps://api.stxer.xyz
Testnethttps://testnet-api.stxer.xyz

Both networks serve the same paths. The live OpenAPI description is at /openapi.json, browsable at /docs.

Conventions ​

  • No keys. No authentication; please identify your client.
  • JSON request and response bodies (content-type: application/json), except traces, which are binary (application/octet-stream).
  • CORS is open (access-control-allow-origin: *), so browsers can call the API directly.
  • Clarity values are hex-serialized strings, without 0x in responses. STX balances and nonces in reads are decimal strings. Large integers (u64, u128) may arrive as numbers or strings; parse them as BigInt.
  • Ids: transaction ids and block hashes are 32-byte hex. Simulation ids are 32 hex characters.

Errors ​

Errors carry a plain-text body.

StatusMeaningWhat to do
400Malformed request: bad step, principal or contract id, or an AdvanceBlocks argument out of boundsFix the request
404Unknown route or resource, or no trace for that transactionCheck ids; see traces
409Body starts simulation_busy: — another submit is running on the sessionRetry the same request after a short wait
410Body starts simulation_outdated: — the session predates a simulator format changeStart a new session

Do not parse error text beyond those prefixes. Back off on 429 and 5xx.

Endpoints ​

MethodPathPage
POST/devtools/v2/simulationsSessions
POST/devtools/v2/simulations/{id}Sessions
GET/devtools/v2/simulations/{id}Sessions
GET/devtools/v2/simulations/{id}/tipSessions
POST/devtools/v2/simulations/{id}/readsSessions
POST/devtools/v2/simulations:instantInstant
GET/inspect/{block_height}/{block_hash}/{txid}Traces
GET/devtools/v2/simulations/{id}/inspect/{txid}Traces
GET/contracts/{contract_id}Contracts
GET/contracts/by-deploy/{txid}Contracts
POST/contracts:parseContracts