{"openapi":"3.1.0","info":{"title":"Interchained Vision API","description":"Production-grade ITC blockchain explorer + ITSL token registry & deployer.","version":"0.1.0"},"paths":{"/api/health":{"get":{"tags":["health"],"summary":"Health","description":"Fully synchronous health check — reads SQLite directly with sqlite3,\nbypassing the async event loop so it always responds instantly.","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/network":{"get":{"tags":["stats"],"summary":"Network Stats","operationId":"network_stats_api_stats_network_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/price":{"get":{"tags":["stats"],"summary":"Price","operationId":"price_api_stats_price_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats/indexer":{"get":{"tags":["stats"],"summary":"Indexer Status","description":"Synchronous endpoint — bypasses the async event loop entirely\nso it always responds even when the indexer saturates the loop.","operationId":"indexer_status_api_stats_indexer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blocks/tip":{"get":{"tags":["blocks"],"summary":"Tip","operationId":"tip_api_blocks_tip_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blocks":{"get":{"tags":["blocks"],"summary":"List Blocks","operationId":"list_blocks_api_blocks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"before_height","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Height"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/block/{id}":{"get":{"tags":["blocks"],"summary":"Get Block","operationId":"get_block_api_block__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tx/{txid}":{"get":{"tags":["transactions"],"summary":"Get Transaction","operationId":"get_transaction_api_tx__txid__get","parameters":[{"name":"txid","in":"path","required":true,"schema":{"type":"string","title":"Txid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tx/broadcast":{"post":{"tags":["transactions"],"summary":"Broadcast","description":"Broadcast a raw transaction. Body: {\"hex\": \"...\"}","operationId":"broadcast_api_tx_broadcast_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}":{"get":{"tags":["addresses"],"summary":"Address Stats","operationId":"address_stats_api_address__addr__get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}/txs":{"get":{"tags":["addresses"],"summary":"Address Txs","operationId":"address_txs_api_address__addr__txs_get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}/utxos":{"get":{"tags":["addresses"],"summary":"Address Utxos","operationId":"address_utxos_api_address__addr__utxos_get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/{addr}/tokens":{"get":{"tags":["addresses"],"summary":"Address Tokens","description":"List ITSL token balances for this address.","operationId":"address_tokens_api_address__addr__tokens_get","parameters":[{"name":"addr","in":"path","required":true,"schema":{"type":"string","title":"Addr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address-index/status":{"get":{"tags":["addresses"],"summary":"Address Index Status","description":"Expose the address-index backfill progress so the UI can render\na \"still indexing\" state for empty pre-backfill addresses.","operationId":"address_index_status_api_address_index_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mempool/summary":{"get":{"tags":["mempool"],"summary":"Summary","operationId":"summary_api_mempool_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mempool/txs":{"get":{"tags":["mempool"],"summary":"List Txs","operationId":"list_txs_api_mempool_txs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mempool/projected":{"get":{"tags":["mempool"],"summary":"Projected","operationId":"projected_api_mempool_projected_get","parameters":[{"name":"blocks","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Blocks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens":{"get":{"tags":["tokens"],"summary":"List Tokens","operationId":"list_tokens_api_tokens_get","parameters":[{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(created|supply|transfers|name|symbol)$","default":"created","title":"Sort"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Direction"}},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token/{token_id}":{"get":{"tags":["tokens"],"summary":"Get Token","operationId":"get_token_api_token__token_id__get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenMeta"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token/{token_id}/history":{"get":{"tags":["tokens"],"summary":"Token History","operationId":"token_history_api_token__token_id__history_get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token/{token_id}/balance/{address}":{"get":{"tags":["tokens"],"summary":"Token Balance","operationId":"token_balance_api_token__token_id__balance__address__get","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deploy/estimate":{"post":{"tags":["deploy"],"summary":"Estimate Fee","operationId":"estimate_fee_api_deploy_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deploy":{"post":{"tags":["deploy"],"summary":"Deploy Token","operationId":"deploy_token_api_deploy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenDeployResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search":{"get":{"tags":["search"],"summary":"Search","operationId":"search_api_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sse":{"get":{"tags":["realtime"],"summary":"Sse","operationId":"sse_api_sse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/feed/blocks.xml":{"get":{"tags":["feeds"],"summary":"Blocks Feed","operationId":"blocks_feed_api_feed_blocks_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["webhooks"],"summary":"Add Webhook","operationId":"add_webhook_api_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSub"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/{sub_id}":{"delete":{"tags":["webhooks"],"summary":"Remove Webhook","operationId":"remove_webhook_api_webhooks__sub_id__delete","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AddressBalance":{"properties":{"confirmed_sats":{"type":"integer","title":"Confirmed Sats"},"unconfirmed_sats":{"type":"integer","title":"Unconfirmed Sats"}},"type":"object","required":["confirmed_sats","unconfirmed_sats"],"title":"AddressBalance"},"AddressStats":{"properties":{"address":{"type":"string","title":"Address"},"valid":{"type":"boolean","title":"Valid"},"balance":{"$ref":"#/components/schemas/AddressBalance"},"tx_count":{"type":"integer","title":"Tx Count"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_special":{"type":"boolean","title":"Is Special","default":false},"first_seen_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Seen Height"},"last_seen_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Seen Height"},"electrumx_available":{"type":"boolean","title":"Electrumx Available","default":true}},"type":"object","required":["address","valid","balance","tx_count"],"title":"AddressStats"},"Block":{"properties":{"height":{"type":"integer","title":"Height"},"hash":{"type":"string","title":"Hash"},"confirmations":{"type":"integer","title":"Confirmations"},"version":{"type":"integer","title":"Version"},"version_hex":{"type":"string","title":"Version Hex"},"merkleroot":{"type":"string","title":"Merkleroot"},"time":{"type":"integer","title":"Time"},"mediantime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mediantime"},"nonce":{"type":"integer","title":"Nonce"},"bits":{"type":"string","title":"Bits"},"difficulty":{"type":"number","title":"Difficulty"},"chainwork":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chainwork"},"n_tx":{"type":"integer","title":"N Tx"},"previousblockhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previousblockhash"},"nextblockhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextblockhash"},"size":{"type":"integer","title":"Size"},"strippedsize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Strippedsize"},"weight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight"},"coinbase":{"anyOf":[{"$ref":"#/components/schemas/CoinbaseDetail"},{"type":"null"}]},"txids":{"items":{"type":"string"},"type":"array","title":"Txids","default":[]}},"type":"object","required":["height","hash","confirmations","version","version_hex","merkleroot","time","nonce","bits","difficulty","n_tx","size"],"title":"Block"},"CoinbaseDetail":{"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"scriptsig_hex":{"type":"string","title":"Scriptsig Hex"},"scriptsig_text":{"type":"string","title":"Scriptsig Text"},"miner":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Miner"},"subsidy_sats":{"type":"integer","title":"Subsidy Sats"},"fee_sats":{"type":"integer","title":"Fee Sats"},"total_sats":{"type":"integer","title":"Total Sats"},"maturity":{"type":"object","title":"Maturity"}},"type":"object","required":["scriptsig_hex","scriptsig_text","subsidy_sats","fee_sats","total_sats","maturity"],"title":"CoinbaseDetail"},"FeeEstimateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"symbol":{"type":"string","maxLength":16,"minLength":1,"title":"Symbol"},"decimals":{"type":"integer","maximum":18.0,"minimum":0.0,"title":"Decimals"},"amount":{"type":"string","title":"Amount"}},"type":"object","required":["name","symbol","decimals","amount"],"title":"FeeEstimateRequest"},"FeeEstimateResponse":{"properties":{"estimated_fee_sats":{"type":"integer","title":"Estimated Fee Sats"},"estimated_vbytes":{"type":"integer","title":"Estimated Vbytes"},"fee_per_vbyte":{"type":"integer","title":"Fee Per Vbyte"},"note":{"type":"string","title":"Note"}},"type":"object","required":["estimated_fee_sats","estimated_vbytes","fee_per_vbyte","note"],"title":"FeeEstimateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TokenDeployRequest":{"properties":{"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol"},"decimals":{"type":"integer","title":"Decimals"},"amount":{"type":"string","title":"Amount"},"wif_key":{"type":"string","title":"Wif Key"},"witness":{"type":"boolean","title":"Witness","default":true}},"type":"object","required":["name","symbol","decimals","amount","wif_key"],"title":"TokenDeployRequest"},"TokenDeployResponse":{"properties":{"txid":{"type":"string","title":"Txid"},"token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Id"},"raw":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Raw"}},"type":"object","required":["txid"],"title":"TokenDeployResponse"},"TokenMeta":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol"},"decimals":{"type":"integer","title":"Decimals"},"total_supply":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Supply"},"creator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator"},"created_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Height"},"created_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Time"},"create_txid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Create Txid"},"transfer_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Count"},"verified":{"type":"boolean","title":"Verified","default":false},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["id","name","symbol","decimals"],"title":"TokenMeta"},"Transaction":{"properties":{"txid":{"type":"string","title":"Txid"},"hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hash"},"version":{"type":"integer","title":"Version"},"locktime":{"type":"integer","title":"Locktime"},"size":{"type":"integer","title":"Size"},"vsize":{"type":"integer","title":"Vsize"},"weight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight"},"fee_sats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Sats"},"fee_rate_sat_vbyte":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fee Rate Sat Vbyte"},"block_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Hash"},"block_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Height"},"block_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Block Time"},"confirmations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confirmations"},"in_mempool":{"type":"boolean","title":"In Mempool","default":false},"is_coinbase":{"type":"boolean","title":"Is Coinbase","default":false},"inputs":{"items":{"$ref":"#/components/schemas/TxInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/TxOutput"},"type":"array","title":"Outputs"},"raw_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Hex"}},"type":"object","required":["txid","version","locktime","size","vsize","inputs","outputs"],"title":"Transaction"},"TxInput":{"properties":{"txid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Txid"},"vout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vout"},"scriptsig_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scriptsig Hex"},"scriptsig_asm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scriptsig Asm"},"sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence"},"txinwitness":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Txinwitness"},"coinbase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coinbase"},"prevout":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Prevout"}},"type":"object","title":"TxInput"},"TxOutput":{"properties":{"n":{"type":"integer","title":"N"},"value_sats":{"type":"integer","title":"Value Sats"},"script_pubkey_hex":{"type":"string","title":"Script Pubkey Hex"},"script_pubkey_asm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Pubkey Asm"},"script_pubkey_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Pubkey Type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},"type":"object","required":["n","value_sats","script_pubkey_hex"],"title":"TxOutput"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookSub":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["url"],"title":"WebhookSub"}}}}