{"openapi":"3.1.0","info":{"title":"Chainbase (BYOK) API","version":"0.1.0","description":"Chainbase (BYOK) lets an AI assistant read your own Chainbase data through the Chainbase API with a key you supply (Chainbase API key). Read-only: 11 tools (get_latest_block, get_block, get_transaction, list_account_transactions, get_native_balance, list_token_balances, get_token_metadata, get_token_price, get_token_price_history, get_top_token_holders, resolve_ens_name). The BYOK key travels...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-chainbase.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-chainbase/docs"},"termsOfService":"https://connectorbay.com/byok-chainbase/terms"},"servers":[{"url":"https://byok-chainbase.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-chainbase/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_latest_block":{"post":{"operationId":"get_latest_block","summary":"Get the latest block number and hash of a chain. Use for \"What is the latest Ethereum block\".","description":"Get the latest block number and hash of a chain. Use for \"What is the latest Ethereum block\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"}},"required":["chain_id"],"title":"get_latest_blockArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_block":{"post":{"operationId":"get_block","summary":"Get a block by number: hash, time, gas used, miner and transaction count. Use for \"Show Ethereum block 21000000\".","description":"Get a block by number: hash, time, gas used, miner and transaction count. Use for \"Show Ethereum block 21000000\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"number":{"description":"Block number as a decimal string.","maxLength":20,"title":"Number","type":"string"}},"required":["chain_id","number"],"title":"get_blockArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_transaction":{"post":{"operationId":"get_transaction","summary":"Get one transaction by hash (or by block number and index): status, sender, receiver, value, gas and fee. Use for \"What ","description":"Get one transaction by hash (or by block number and index): status, sender, receiver, value, gas and fee. Use for \"What happened in transaction 0xabc123 on Ethereum\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"hash":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Transaction hash.","title":"Hash"},"block_number":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Block number, used with tx_index when no hash is given.","title":"Block Number"},"tx_index":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Index of the transaction in the block, used with block_number.","title":"Tx Index"}},"required":["chain_id"],"title":"get_transactionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_account_transactions":{"post":{"operationId":"list_account_transactions","summary":"List the transactions of an address, optionally limited by block or time range. Use for \"List recent Ethereum transactio","description":"List the transactions of an address, optionally limited by block or time range. Use for \"List recent Ethereum transactions of vitalik.eth's address\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"address":{"description":"Wallet address as a 0x hex string.","maxLength":100,"title":"Address","type":"string"},"from_block":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Inclusive first block (decimal or 0x hex).","title":"From Block"},"to_block":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Inclusive last block (decimal, hex or 'latest').","title":"To Block"},"from_timestamp":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Inclusive start as a Unix timestamp in seconds.","title":"From Timestamp"},"end_timestamp":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Inclusive end as a Unix timestamp in seconds.","title":"End Timestamp"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Page size, 1 to 100.","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["chain_id","address"],"title":"list_account_transactionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_native_balance":{"post":{"operationId":"get_native_balance","summary":"Get the native coin balance of an address (in the smallest unit, as a string), optionally at a past block. Use for \"How ","description":"Get the native coin balance of an address (in the smallest unit, as a string), optionally at a past block. Use for \"How much ETH does this address hold\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"address":{"description":"Wallet address as a 0x hex string.","maxLength":100,"title":"Address","type":"string"},"to_block":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Block to read the balance at (decimal, hex or 'latest').","title":"To Block"}},"required":["chain_id","address"],"title":"get_native_balanceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_token_balances":{"post":{"operationId":"list_token_balances","summary":"List the ERC20 token balances of an address with symbol, decimals, USD price and raw balance. Use for \"Which ERC20 token","description":"List the ERC20 token balances of an address with symbol, decimals, USD price and raw balance. Use for \"Which ERC20 tokens does this address hold\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"address":{"description":"Wallet address as a 0x hex string.","maxLength":100,"title":"Address","type":"string"},"contract_address":{"anyOf":[{"maxLength":4500,"type":"string"},{"type":"null"}],"default":null,"description":"Only this token contract (or up to 100 comma-separated contracts).","title":"Contract Address"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Page size, 1 to 100.","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["chain_id","address"],"title":"list_token_balancesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_token_metadata":{"post":{"operationId":"get_token_metadata","summary":"Get a token's name, symbol, decimals, total supply and current USD price. Use for \"What are the details of the USDT cont","description":"Get a token's name, symbol, decimals, total supply and current USD price. Use for \"What are the details of the USDT contract on Ethereum\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"contract_address":{"description":"Token contract address as a 0x hex string.","maxLength":100,"title":"Contract Address","type":"string"}},"required":["chain_id","contract_address"],"title":"get_token_metadataArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_token_price":{"post":{"operationId":"get_token_price","summary":"Get the current USD price of a token contract. Use for \"What is the current price of USDT on Ethereum\".","description":"Get the current USD price of a token contract. Use for \"What is the current price of USDT on Ethereum\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"contract_address":{"description":"Token contract address as a 0x hex string.","maxLength":100,"title":"Contract Address","type":"string"}},"required":["chain_id","contract_address"],"title":"get_token_priceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_token_price_history":{"post":{"operationId":"get_token_price_history","summary":"Get the historical USD price points of a token between two Unix timestamps (the window may not exceed 90 days). Use for ","description":"Get the historical USD price points of a token between two Unix timestamps (the window may not exceed 90 days). Use for \"Show the USDT price over the last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"contract_address":{"description":"Token contract address as a 0x hex string.","maxLength":100,"title":"Contract Address","type":"string"},"from_timestamp":{"description":"Inclusive start as a Unix timestamp in seconds.","minimum":0,"title":"From Timestamp","type":"integer"},"end_timestamp":{"description":"Inclusive end as a Unix timestamp in seconds; at most 90 days after the start.","minimum":0,"title":"End Timestamp","type":"integer"}},"required":["chain_id","contract_address","from_timestamp","end_timestamp"],"title":"get_token_price_historyArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_top_token_holders":{"post":{"operationId":"get_top_token_holders","summary":"List the largest holders of a token with their amount and USD value. Use for \"Who are the top holders of USDT\".","description":"List the largest holders of a token with their amount and USD value. Use for \"Who are the top holders of USDT\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"contract_address":{"description":"Token contract address as a 0x hex string.","maxLength":100,"title":"Contract Address","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Page size, 1 to 100.","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["chain_id","contract_address"],"title":"get_top_token_holdersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/resolve_ens_name":{"post":{"operationId":"resolve_ens_name","summary":"Resolve an ENS domain name to its address, owner, resolver and expiry date. Use for \"Which address does vitalik.eth poin","description":"Resolve an ENS domain name to its address, owner, resolver and expiry date. Use for \"Which address does vitalik.eth point to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"chain_id":{"description":"Numeric chain id, for example 1 for Ethereum mainnet (see the Chainbase supported networks list for others).","minimum":1,"title":"Chain Id","type":"integer"},"domain":{"description":"ENS name such as 'vitalik.eth'.","maxLength":255,"title":"Domain","type":"string"},"to_block":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Block to resolve at (decimal, hex or 'latest').","title":"To Block"}},"required":["chain_id","domain"],"title":"resolve_ens_nameArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}