{"id":20602587,"url":"https://github.com/zabo-api/zabo-sdk-js","last_synced_at":"2025-04-15T01:54:12.240Z","repository":{"id":38551085,"uuid":"200280179","full_name":"zabo-api/zabo-sdk-js","owner":"zabo-api","description":"Zabo is an API for connecting with cryptocurrency exchanges, wallets and protocols like Bitcoin.","archived":false,"fork":false,"pushed_at":"2023-03-04T04:27:38.000Z","size":2982,"stargazers_count":18,"open_issues_count":10,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-15T01:54:06.381Z","etag":null,"topics":["binance-api","bitcoin-api","coinbase-api","zabo-api"],"latest_commit_sha":null,"homepage":"https://zabo.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zabo-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-08-02T18:24:46.000Z","updated_at":"2024-01-26T09:05:47.000Z","dependencies_parsed_at":"2024-06-18T22:34:49.027Z","dependency_job_id":"507e6b0f-dc77-447f-878c-6cdb18fa51b8","html_url":"https://github.com/zabo-api/zabo-sdk-js","commit_stats":{"total_commits":313,"total_committers":7,"mean_commits":"44.714285714285715","dds":0.6230031948881789,"last_synced_commit":"9c7fb8ed2f4fdd0966c960eccec055bd23d6ed64"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabo-api%2Fzabo-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabo-api%2Fzabo-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabo-api%2Fzabo-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabo-api%2Fzabo-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zabo-api","download_url":"https://codeload.github.com/zabo-api/zabo-sdk-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991540,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["binance-api","bitcoin-api","coinbase-api","zabo-api"],"created_at":"2024-11-16T09:14:12.651Z","updated_at":"2025-04-15T01:54:12.223Z","avatar_url":"https://github.com/zabo-api.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"What is Zabo? A unified cryptocurrency API.\n=========================\n[![CircleCI](https://circleci.com/gh/zabo-api/zabo-sdk-js/tree/master.svg?style=svg)](https://circleci.com/gh/zabo-api/zabo-sdk-js/tree/master)\n[![Discord](https://img.shields.io/discord/533336922970521600)](https://discord.gg/vGHYuUT)\n[![Discourse](https://img.shields.io/discourse/https/forum.zabo.com/status)](https://forum.zabo.com)   \n\n[Zabo](https://zabo.com) is an API for connecting with cryptocurrency exchanges, wallets and protocols like Bitcoin. Instead of manually integrating with [Coinbase API](https://zabo.com/integrations/coinbase), [Binance API](https://zabo.com/integrations/binance), [Bitcoin APIs](https://zabo.com/integrations/bitcoin) or the hundreds of other cryptocurrency APIs - you can simply use Zabo for them all.  \n\nWe believe teams and developers should focus on building great products, not worry about the fragmented landscape of exchange APIs and blockchain protocols.  \n\nFor our updated list of integrations, [check out our Zabo integrations](https://zabo.com/integrations).\n\n# Zabo API Javascript (JS) SDK\n\nThe Zabo SDK for JS provides convenient access to the Zabo API from applications written in browser and server-side JavaScript.  \n\nPlease keep in mind that [you must register](https://zabo.com/login) and receive a team id to use in your client application, or if you are using the server side functions, [generate an API keypair from your dashboard](https://zabo.com/dashboard).\n\n## Documentation\nSee the [Zabo API docs](https://zabo.com/docs).\n\n## Installation\nFor a standard browser application, add the script tag to your html file:\n```html\n\u003cscript src=\"https://cdn.zabo.com/develop/latest/zabo.js\"\u003e\n```\n\nAs a package:\n```\nnpm install zabo-sdk-js --save\n```\n\n## Usage\nThe first step is always to allow a user to connect from your front-end:\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\" dir=\"ltr\"\u003e\n\n\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003ctitle\u003eMy Website\u003c/title\u003e\n\n  \u003clink rel=\"stylesheet\" href=\"example.css\" type=\"text/css\" /\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003csection\u003e\n    \u003cheader\u003e\n      \u003ch2\u003eMy Zabo Application\u003c/h2\u003e\n    \u003c/header\u003e\n\n    \u003cbutton id=\"connect\" type=\"button\"\u003eConnect\u003c/button\u003e\n\n    \u003cdiv\u003e\n      \u003ch4\u003eOther SDK methods\u003c/h4\u003e\n      \u003cbutton id=\"getBalance\" type=\"button\"\u003eCrypto Balances\u003c/button\u003e\n      \u003cbutton id=\"getHistory\" type=\"button\"\u003eAccount History\u003c/button\u003e\n      \u003cbutton id=\"getExchangeRates\" type=\"button\"\u003eExchange Rates\u003c/button\u003e\n    \u003c/div\u003e\n\n  \u003c/section\u003e\n\n  \u003c!--Add this script to your html file--\u003e\n  \u003cscript src=\"https://cdn.zabo.com/latest/zabo.js\"\u003e\u003c/script\u003e\n\n  \u003cscript type=\"text/javascript\"\u003e\n    // Wait for document to fully load\n    document.onreadystatechange = async () =\u003e {\n      if (document.readyState !== 'complete') { return }\n\n      const output = document.querySelector('#output')\n\n      // Initiate Zabo SDK, replace the `clientId` field with your team client id.\n      const zabo = await Zabo.init({\n        clientId: 'YourClientIDFromTheZaboDotComDashboard',\n        env: 'sandbox'\n      })\n      // Bind \"connect\" button\n      document.querySelector('#connect').addEventListener('click', ev =\u003e {\n        // Call connect when pressed and provide default .connect() window.\n        zabo.connect().onConnection(account =\u003e {\n          console.log('account connected:', account)\n          bindOtherMethods()\n        }).onError(error =\u003e {\n          console.error('account connection error:', error.message)\n        })\n      })\n\n      // Bind buttons for the other SDK example methods [Requires a successful zabo.connect() first]\n      function bindOtherMethods () {\n        document.querySelector('#getBalance').addEventListener('click', ev =\u003e {\n          // Get ETH balance\n          zabo.accounts.getBalances({ tickers: [\"ETH\"] }).then(balances =\u003e {\n            console.log(balances)\n          }).catch(error =\u003e {\n            /* User has not yet connected or doesn't have an ether wallet */\n            console.error(error)\n          })\n        })\n\n        document.querySelector('#getHistory').addEventListener('click', ev =\u003e {\n          // Get account transactions history\n          zabo.transactions.getList({ ticker: 'ETH' }).then(history =\u003e {\n            console.log(history)\n          }).catch(error =\u003e {\n            /* User has not yet connected */\n            console.error(error)\n          })\n        })\n\n        document.querySelector('#getExchangeRates').addEventListener('click', ev =\u003e {\n          // Get crypto USD exchange rates\n          zabo.currencies.getExchangeRates().then(rates =\u003e {\n            console.log(rates)\n          }).catch(error =\u003e {\n            console.error(error)\n          })\n        })\n      }\n    }\n  \u003c/script\u003e\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\nOr importing as a package:\n```js\nconst Zabo = require('zabo-sdk-js')\n\nconst zabo = await Zabo.init({\n  clientId: 'YourClientIDFromTheZaboDotComDashboard',\n  env: 'sandbox'\n})\n\nzabo.connect().onConnection(account =\u003e {\n  console.log('account connected:', account)\n}).onError(error =\u003e {\n  console.error('account connection error:', error.message)\n})\n```\nOr using ES6 modules:\n```js\nimport Zabo from 'zabo-sdk-js'\n```\n\n### After connecting\nAfter a user connects, the client SDK can continued to be used for the connected wallet:\n```js\nzabo.transactions.getList({ ticker: 'ETH' }).then(history =\u003e {\n  console.log(history)\n}).catch(error =\u003e {\n  /* User has not yet connected */\n  console.error(error)\n})\n```\nOr you can send the account to your server for the server-side SDK to create a unique user:\n```js\nzabo.connect().onConnection(account =\u003e {\n  sendToYourServer(account)\n}).onError(error =\u003e {\n  console.error('account connection error:', error.message)\n})\n\n// Then in your server\nconst Zabo = require('zabo-sdk-js')\nlet account = accountReceivedFromTheClient\n\nZabo.init({\n  apiKey: 'YourPublicAPIKeyGeneratedInYourZaboDotComDashboard',\n  secretKey: 'YourSecretAPIKey',\n  env: 'sandbox'\n}).then(zabo =\u003e {\n  zabo.users.create(account)\n}).catch(e =\u003e {\n  console.log(e.message)\n})\n```\n\n### Zabo.init() Configuration\nWhile instantiating your new Zabo SDK instance, you have a few configuration options that can be changed to best suit your needs. Please note that some options are available only when running the SDK from the browser while others are available when running the SDK on your node.js code.\n\n| Key           | Description   | Platform   |\n| ------------- | ------------- |----------- |\n| clientId      | App Key acquired when registering a team in [Zabo Dashboard](https://zabo.com/login/). | Browser |\n| env           | Zabo API environment the SDK is connecting with. Could be either `sandbox` or `live`. Only `sandbox` is available unless a `live` connection is approved. | Both |\n| apiKey        | API Key generated via the Developer Settings section at [Zabo Dashboard](https://zabo.com/login/). | Node |\n| secretKey     | Secret Key generated via the Developer Settings section at [Zabo Dashboard](https://zabo.com/login/). | Node |\n| autoConnect   | Optional boolean useful if you wish to stop the SDK from fetching the team data during Zabo.init(). Defaults to `true`. | Both |\n| apiVersion    | Optional parameter to specify the Zabo API version. Could be either `v0` or `v1`. Defaults to `v1`. | Both |\n\n### Server vs Client\nThe SDK can be used in either the client or server environment after a user connects their wallet, however, they have different functions available to them and utilize different authentication methods. See [the Zabo API docs](https://zabo.com/docs) for more information.\n\n\n### Using Promises\nEvery method returns a chainable promise which can be used:\n```js\nzabo.getTeam().then(a =\u003e {\n  console.log(a)\n}).catch(e =\u003e {\n  console.log(e.message)\n})\n```\nOr with async/await:\n```js\nlet exchangeRates = await zabo.currencies.exchangeRates()\nconsole.log(exchangeRates)\n```\n\n## Help and Further Information\nPlease [read our docs](https://zabo.com/docs) and reach out to us in any or all of the following forums for questions:\n\n* [Discord](https://discord.gg/vGHYuUT)\n* [Discourse](https://forum.zabo.com)\n* [Gitter](https://gitter.im/zabo-api/community)\n* [Email](mailto:contact@zabo.com)\n\n## Issues\nIf you notice any issues with our docs, this README, or the SDK, feel free to open an issue and/or a PR. We welcome community contributions!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabo-api%2Fzabo-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzabo-api%2Fzabo-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabo-api%2Fzabo-sdk-js/lists"}