{"id":28379342,"url":"https://github.com/bitquery/ton-bitquery-sdk","last_synced_at":"2026-07-03T06:33:15.392Z","repository":{"id":294401690,"uuid":"986851949","full_name":"bitquery/ton-bitquery-sdk","owner":"bitquery","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-20T08:12:21.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T22:26:19.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitquery.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-20T08:05:47.000Z","updated_at":"2025-05-20T08:12:24.000Z","dependencies_parsed_at":"2025-05-20T09:29:27.487Z","dependency_job_id":"04d5f167-9d1e-442a-9880-fee9950fae37","html_url":"https://github.com/bitquery/ton-bitquery-sdk","commit_stats":null,"previous_names":["bitquery/ton-bitquery-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitquery/ton-bitquery-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fton-bitquery-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fton-bitquery-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fton-bitquery-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fton-bitquery-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitquery","download_url":"https://codeload.github.com/bitquery/ton-bitquery-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitquery%2Fton-bitquery-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35075804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-30T02:38:09.112Z","updated_at":"2026-07-03T06:33:15.384Z","avatar_url":"https://github.com/bitquery.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitquery-ton-sdk\n\nA lightweight SDK for querying **TON blockchain** data via the [Bitquery GraphQL API](https://bitquery.io/). Easily fetch real-time **DEX trades**, **token trades**, **top traders**, and **top tokens** from The Open Network (TON).\n\n## 🚀 Features\n\n- Fetch latest **TON DEX trades**\n- Get latest trades for specific **TON tokens**\n- Identify **top traders** by trade count\n- Discover **top tokens** by USD volume\n- Built-in **GraphQL queries** powered by Bitquery\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install bitquery-ton-sdk\n```\n\n## 🛠 Usage\n\n### ➤ CommonJS (Node.js default)\n```js\nconst {\n  getDexTrades,\n  getTokenDexTrades,\n  getTopTaders,\n  getTopTokens\n} = require('bitquery-ton-sdk');\n\nconst token = 'YOUR_BITQUERY_API_TOKEN';\n\ngetDexTrades(token, 50).then(console.log);\ngetTokenDexTrades(token, '0:abc123...', 25).then(console.log);\ngetTopTaders({ token, since: '2024-10-01T00:00:00Z', num: 20 }).then(console.log);\ngetTopTokens({ token, since: '2024-10-01T00:00:00Z', num: 15 }).then(console.log);\n```\n\n### ➤ ES6 Modules (Modern Node.js / Frontend)\n\n```js\nimport {\n  getDexTrades,\n  getTokenDexTrades,\n  getTopTaders,\n  getTopTokens\n} from 'bitquery-ton-sdk';\n\nconst token = 'YOUR_BITQUERY_API_TOKEN';\n\nconst main = async () =\u003e {\n  const trades = await getDexTrades(token, 50);\n  console.log(trades);\n\n  const tokenTrades = await getTokenDexTrades(token, '0:abc123...', 25);\n  console.log(tokenTrades);\n\n  const topTraders = await getTopTaders({ token, since: '2024-10-01T00:00:00Z', num: 20 });\n  console.log(topTraders);\n\n  const topTokens = await getTopTokens({ token, since: '2024-10-01T00:00:00Z', num: 15 });\n  console.log(topTokens);\n};\n\nmain();\n```\n\n**⚠️** To use ESM in Node.js, either rename your file to .mjs or set \"type\": \"module\" in your package.json.\n\n## 📚 API Reference\n\n### getDexTrades(token, num)\n\nFetch latest DEX trades on TON.\n\n- token: Bitquery API token (required)\n- num: Number of trades to return (optional, default: 100)\n\n### getTokenDexTrades(token, currency, num)\n\nGet latest DEX trades for a specific token by its smart contract address.\n\n- token: Bitquery API token (required)\n- currency: Token smart contract address (required)\n- num: Number of trades (optional, default: 100)\n\n### getTopTaders({ token, since, num })\n\nReturn top traders on TON by trade count.\n\n- token: Bitquery API token (required)\n- since: ISO time string for filtering (optional, default: \"2024-10-21T05:36:05Z\")\n- num: Max results to return (optional, default: 100)\n\n### getTopTokens({ token, since, num })\n\nReturn most traded tokens by USD volume.\n\n- token: Bitquery API token (required)\n- since: ISO time string for filtering (optional, default: \"2024-10-21T05:36:05Z\")\n- num: Max results to return (optional, default: 100)\n\n## 🔐 Authentication\n\nThis SDK uses the Bitquery GraphQL streaming API. You’ll need an Access Token from [Bitquery](https://account.bitquery.io/user/api_v2/access_tokens).\n\nSet your token in each request:\n\n```js\nconst token = 'your-api-key';\n```\n\n## 🧑‍💻 Contributing\n\nWe welcome [issues](https://github.com/bitquery/ton-bitquery-sdk/issues) and [pull requests](https://github.com/bitquery/ton-bitquery-sdk/pulls) to improve the SDK.\n\n## 📄 License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitquery%2Fton-bitquery-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitquery%2Fton-bitquery-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitquery%2Fton-bitquery-sdk/lists"}