GET /v1/ens/tx/status
ENS: Transaction Status
Check the on-chain status of an Ethereum transaction. Use this to poll commit and register transactions during the ENS registration flow.
Base URL:
https://api.robotdomainsearch.com— ENS endpoints are proxied through the main API at/v1/ens/*.
Endpoint
GET https://api.robotdomainsearch.com/v1/ens/tx/status
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hash |
string | Yes | Ethereum transaction hash (0x + 64 hex chars) |
Request
curl "https://api.robotdomainsearch.com/v1/ens/tx/status?hash=0x1234abcd..."
Response (Pending)
When the transaction has been broadcast but not yet included in a block:
{
"tx_hash": "0x1234abcd...",
"status": "pending"
}
Response (Confirmed)
When the transaction has been included in a block and succeeded:
{
"tx_hash": "0x1234abcd...",
"status": "confirmed",
"block_number": 19234567,
"gas_used": 46532,
"effective_gas_price": "25000000000"
}
Response (Failed)
When the transaction was included in a block but reverted:
{
"tx_hash": "0x1234abcd...",
"status": "failed",
"block_number": 19234567,
"gas_used": 21000,
"effective_gas_price": "25000000000"
}
Response Fields
| Field | Type | Description |
|---|---|---|
tx_hash |
string | Transaction hash |
status |
string | "pending", "confirmed", or "failed" |
block_number |
integer | Block number (only when confirmed/failed) |
gas_used |
integer | Gas consumed (only when confirmed/failed) |
effective_gas_price |
string | Effective gas price in wei (only when confirmed/failed) |
Polling Pattern
Poll the endpoint with a reasonable interval until the transaction confirms:
import requests
import time
def wait_for_tx(tx_hash, timeout=300, interval=5):
"""Poll tx status until confirmed or timeout."""
elapsed = 0
while elapsed < timeout:
r = requests.get(
"https://api.robotdomainsearch.com/v1/ens/tx/status",
params={"hash": tx_hash}
)
result = r.json()
if result["status"] == "confirmed":
print(f"Confirmed in block {result['block_number']}")
return result
elif result["status"] == "failed":
raise Exception(f"Transaction failed in block {result['block_number']}")
time.sleep(interval)
elapsed += interval
raise Exception("Transaction polling timed out")
# Example usage
wait_for_tx("0x1234abcd...")
async function waitForTx(txHash, timeout = 300000, interval = 5000) {
const start = Date.now();
while (Date.now() - start < timeout) {
const r = await fetch(
`https://api.robotdomainsearch.com/v1/ens/tx/status?hash=${txHash}`
);
const result = await r.json();
if (result.status === "confirmed") return result;
if (result.status === "failed") throw new Error("Transaction failed");
await new Promise(resolve => setTimeout(resolve, interval));
}
throw new Error("Transaction polling timed out");
}
Recommended polling interval: 5 seconds. Ethereum blocks are produced roughly every 12 seconds.
Errors
| Code | Error | Description |
|---|---|---|
| 400 | missing_parameter |
hash query parameter is required |
| 400 | tx_status_failed |
Invalid transaction hash format |
| 405 | method_not_allowed |
Only GET is allowed |
Transaction Hash Format
Must be a valid 32-byte Ethereum transaction hash: 0x followed by exactly 64 hexadecimal characters.
Related
- ENS: Registration — full commit/reveal registration flow
- ENS: Renewal — renew existing names
📄 Raw markdown: /docs/api/ens-tx-status.md