{"openapi":"3.1.0","info":{"title":"TON API (BYOK) API","version":"0.1.0","description":"TON API (BYOK) lets an AI assistant read your own TON API data through the TON API API with a key you supply (TON API key from TON Console). Read-only: 12 tools (get_service_status, get_account, search_accounts, get_account_jettons, get_account_nfts, get_account_events, get_jetton_info, list_jettons, list_jetton_holders, get_token_rates, resolve_dns, list_staking_pools). The BYOK key travels with...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-tonapi.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-tonapi/docs"},"termsOfService":"https://connectorbay.com/byok-tonapi/terms"},"servers":[{"url":"https://byok-tonapi.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-tonapi/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_service_status":{"post":{"operationId":"get_service_status","summary":"Show whether the TON API is online, how far its index lags behind the chain, and the last masterchain block it knows. Us","description":"Show whether the TON API is online, how far its index lags behind the chain, and the last masterchain block it knows. Use for \"Is the TON API healthy and how far behind is its index\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_service_statusArguments","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_account":{"post":{"operationId":"get_account","summary":"Get a TON account: balance in nanotons, status, last activity time, known name, wallet flag and scam flag. Use for \"What","description":"Get a TON account: balance in nanotons, status, last activity time, known name, wallet flag and scam flag. Use for \"What is the balance of this TON address\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"TON account address, either friendly form (EQ... or UQ...) or raw form (0:hex).","maxLength":200,"title":"Account Id","type":"string"}},"required":["account_id"],"title":"get_accountArguments","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/search_accounts":{"post":{"operationId":"search_accounts","summary":"Find TON accounts whose known name (for example an exchange or project label) matches the text. Use for \"Which TON addre","description":"Find TON accounts whose known name (for example an exchange or project label) matches the text. Use for \"Which TON addresses are labelled Tonkeeper\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"Name or label to look for.","maxLength":100,"title":"Name","type":"string"}},"required":["name"],"title":"search_accountsArguments","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_account_jettons":{"post":{"operationId":"get_account_jettons","summary":"List the jetton (token) balances of a TON account with token name, symbol, decimals and verification status. Use for \"Wh","description":"List the jetton (token) balances of a TON account with token name, symbol, decimals and verification status. Use for \"Which tokens does this TON wallet hold\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"TON account address, either friendly form (EQ... or UQ...) or raw form (0:hex).","maxLength":200,"title":"Account Id","type":"string"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many results to return (1 to 1000).","title":"Limit"},"offset":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging.","title":"Offset"}},"required":["account_id"],"title":"get_account_jettonsArguments","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_account_nfts":{"post":{"operationId":"get_account_nfts","summary":"List the NFTs owned by a TON account with item address, index, collection and trust level, optionally for one collection","description":"List the NFTs owned by a TON account with item address, index, collection and trust level, optionally for one collection. Use for \"Which NFTs does this TON address own\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"TON account address, either friendly form (EQ... or UQ...) or raw form (0:hex).","maxLength":200,"title":"Account Id","type":"string"},"collection":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this NFT collection address.","title":"Collection"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 1000).","title":"Limit"},"offset":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging.","title":"Offset"}},"required":["account_id"],"title":"get_account_nftsArguments","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_account_events":{"post":{"operationId":"get_account_events","summary":"List recent high-level events (transfers, swaps, mints, stake actions) of a TON account, newest first by default. Use fo","description":"List recent high-level events (transfers, swaps, mints, stake actions) of a TON account, newest first by default. Use for \"What were the latest events on this TON account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"TON account address, either friendly form (EQ... or UQ...) or raw form (0:hex).","maxLength":200,"title":"Account Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"before_lt":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Return events older than this logical time; use next_from from the previous answer.","title":"Before Lt"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"desc for newest first, asc for oldest first.","title":"Sort Order"}},"required":["account_id"],"title":"get_account_eventsArguments","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_jetton_info":{"post":{"operationId":"get_jetton_info","summary":"Get one jetton (token) by its master contract address: name, symbol, decimals, total supply, holders and verification. U","description":"Get one jetton (token) by its master contract address: name, symbol, decimals, total supply, holders and verification. Use for \"How many holders does this TON jetton have and what is its supply\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Jetton master contract address.","maxLength":200,"title":"Account Id","type":"string"}},"required":["account_id"],"title":"get_jetton_infoArguments","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_jettons":{"post":{"operationId":"list_jettons","summary":"List jettons known to the TON API with name, symbol, supply and holder count, one page at a time. Use for \"List some TON","description":"List jettons known to the TON API with name, symbol, supply and holder count, one page at a time. Use for \"List some TON jettons with their holder counts\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 1000).","title":"Limit"},"offset":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging.","title":"Offset"}},"title":"list_jettonsArguments","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_jetton_holders":{"post":{"operationId":"list_jetton_holders","summary":"List the holders of a jetton with owner address and balance, largest first by default. Use for \"Who are the biggest hold","description":"List the holders of a jetton with owner address and balance, largest first by default. Use for \"Who are the biggest holders of this TON jetton\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Jetton master contract address.","maxLength":200,"title":"Account Id","type":"string"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results to return (1 to 1000).","title":"Limit"},"offset":{"anyOf":[{"maximum":9000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip; only valid with sort_by=balance and limited to 9000 rows.","title":"Offset"},"sort_by":{"anyOf":[{"enum":["balance","address"],"type":"string"},{"type":"null"}],"default":"balance","description":"balance (default) or address.","title":"Sort By"}},"required":["account_id"],"title":"list_jetton_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/get_token_rates":{"post":{"operationId":"get_token_rates","summary":"Get current prices of TON or jettons in the given currencies, for example TON in USD. Use for \"What is the price of TON ","description":"Get current prices of TON or jettons in the given currencies, for example TON in USD. Use for \"What is the price of TON in USD and EUR\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"tokens":{"description":"Comma-separated token list: ton or jetton master addresses.","maxLength":300,"title":"Tokens","type":"string"},"currencies":{"description":"Comma-separated currency codes, for example usd,eur.","maxLength":100,"title":"Currencies","type":"string"}},"required":["tokens","currencies"],"title":"get_token_ratesArguments","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_dns":{"post":{"operationId":"resolve_dns","summary":"Resolve a .ton or .t.me domain to its wallet address and linked sites. Use for \"Which wallet does the TON domain foundat","description":"Resolve a .ton or .t.me domain to its wallet address and linked sites. Use for \"Which wallet does the TON domain foundation.ton point to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"domain_name":{"description":"Domain name ending in .ton or .t.me.","maxLength":200,"title":"Domain Name","type":"string"}},"required":["domain_name"],"title":"resolve_dnsArguments","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_staking_pools":{"post":{"operationId":"list_staking_pools","summary":"List TON staking pools with APY, total stake, minimum stake and nominator counts. Use for \"Which TON staking pools pay t","description":"List TON staking pools with APY, total stake, minimum stake and nominator counts. Use for \"Which TON staking pools pay the highest APY\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_staking_poolsArguments","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}}}}