{"openapi":"3.1.0","info":{"title":"Kynraze Indexer Read API","version":"1.0.0","description":"Read-only account activity API backed by CDI data for AtomOne and Realio."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"details":{}},"required":["error"]},"AddressTx":{"type":"object","properties":{"tx_hash":{"type":"string"},"height":{"type":"string"},"tx_index":{"type":"integer"},"time":{"type":"string","format":"date-time"},"code":{"type":"integer"},"fee":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"required":["denom","amount"]}},"memo":{"type":["string","null"]},"msg_types":{"type":"array","items":{"type":"string"}},"inner_msg_types":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"type":"string","enum":["actor","out","in","staking","gov"]}},"transfers":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["fee","transfer"]},"msg_index":{"type":"integer"},"event_index":{"type":"integer"},"from":{"type":"string"},"to":{"type":"string"},"denom":{"type":"string"},"amount":{"type":"string"}},"required":["kind","msg_index","event_index","from","to","denom","amount"]}},"transfers_total":{"type":"integer"},"staking":{"type":"array","items":{}},"rewards":{"type":"array","items":{"type":"object","properties":{"denom":{"type":"string"},"amount":{"type":"string"}},"required":["denom","amount"]}},"votes":{"type":"array","items":{}}},"required":["tx_hash","height","tx_index","time","code","fee","memo","msg_types","inner_msg_types","roles","transfers","transfers_total","staking","rewards","votes"]},"BankTransfer":{"type":"object","properties":{"height":{"type":"string"},"tx_hash":{"type":"string"},"msg_index":{"type":"integer"},"event_index":{"type":"integer"},"from_addr":{"type":"string"},"to_addr":{"type":"string"},"denom":{"type":"string"},"amount":{"type":"string"},"kind":{"type":"string","enum":["fee","transfer"]},"time":{"type":"string","format":"date-time"}},"required":["height","tx_hash","msg_index","event_index","from_addr","to_addr","denom","amount","kind","time"]},"Coverage":{"type":"object","properties":{"chain":{"type":"string"},"earliest_height":{"type":["string","null"]},"earliest_time":{"type":["string","null"],"format":"date-time"},"indexed_height":{"type":["string","null"]},"indexed_time":{"type":["string","null"],"format":"date-time"},"lag_seconds":{"type":["integer","null"]},"ready":{"type":"boolean"},"not_ready_reason":{"type":["string","null"]}},"required":["chain","earliest_height","earliest_time","indexed_height","indexed_time","lag_seconds","ready","not_ready_reason"]},"EarliestActivity":{"type":"object","properties":{"height":{"type":"string"},"tx_index":{"type":"integer"},"tx_hash":{"type":"string"},"time":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["actor","transfer_out","transfer_in","staking","gov"]}},"required":["height","tx_index","tx_hash","time","source"]}},"parameters":{}},"paths":{"/api/v1/{chain}/txs/by-address":{"get":{"summary":"Complete indexed transaction history for account addresses","tags":["accounts"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["atomone","realio"]},"required":true,"name":"chain","in":"path"},{"schema":{"type":"string"},"required":true,"name":"address","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before_height","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"before_index","in":"query"},{"schema":{"type":"string"},"required":false,"name":"role","in":"query"},{"schema":{"type":"string"},"required":false,"name":"msg_type","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from_time","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to_time","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"count","in":"query"},{"schema":{"type":"string"},"required":true,"name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Newest-first keyset page. Count is optional, capped at 10,000, and timeout-safe.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AddressTx"}},"cursor":{"type":["object","null"],"properties":{"next_before_height":{"type":"string"},"next_before_index":{"type":"integer"}},"required":["next_before_height","next_before_index"]},"has_more":{"type":"boolean"},"total":{"type":["string","null"]},"total_capped":{"type":"boolean"}},"required":["data","cursor","has_more"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown chain or no indexed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Required index is not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/{chain}/bank/transfers":{"get":{"summary":"Token transfers involving account addresses","tags":["bank"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["atomone","realio"]},"required":true,"name":"chain","in":"path"},{"schema":{"type":"string"},"required":true,"name":"address","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["in","out","both"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string"},"required":false,"name":"denom","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before_height","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before_tx_hash","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"before_msg_index","in":"query"},{"schema":{"type":["integer","null"]},"required":false,"name":"before_event_index","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before_denom","in":"query"},{"schema":{"type":"string"},"required":true,"name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Cursor follows bank.transfers primary-key order, including event_index.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BankTransfer"}},"cursor":{"type":["object","null"],"properties":{"next_before_height":{"type":"string"},"next_before_tx_hash":{"type":"string"},"next_before_msg_index":{"type":"integer"},"next_before_event_index":{"type":"integer"},"next_before_denom":{"type":"string"}},"required":["next_before_height","next_before_tx_hash","next_before_msg_index","next_before_event_index","next_before_denom"]},"has_more":{"type":"boolean"}},"required":["data","cursor","has_more"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown chain or no indexed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Required index is not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/{chain}/address/earliest-activity":{"get":{"summary":"Earliest indexed activity for an account","tags":["accounts"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["atomone","realio"]},"required":true,"name":"chain","in":"path"},{"schema":{"type":"string"},"required":true,"name":"address","in":"query"},{"schema":{"type":"string"},"required":true,"name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Earliest activity and current coverage.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"earliest":{"allOf":[{"$ref":"#/components/schemas/EarliestActivity"},{"type":["object","null"]}]},"coverage":{"type":"object","properties":{"earliest_height":{"type":["string","null"]},"earliest_time":{"type":["string","null"],"format":"date-time"},"indexed_height":{"type":["string","null"]},"indexed_time":{"type":["string","null"],"format":"date-time"}},"required":["earliest_height","earliest_time","indexed_height","indexed_time"]}},"required":["earliest","coverage"]}},"required":["data"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown chain or no indexed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Required index is not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/{chain}/coverage":{"get":{"summary":"Indexed height, lag, and query readiness","tags":["operations"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["atomone","realio"]},"required":true,"name":"chain","in":"path"},{"schema":{"type":"string"},"required":true,"name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Index coverage and required-index readiness.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Coverage"}},"required":["data"]}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown chain or no indexed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Required index is not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/health":{"get":{"summary":"API database health by chain","tags":["operations"],"responses":{"200":{"description":"All configured databases respond."},"503":{"description":"A configured database is unavailable."}}}}},"webhooks":{}}