{"id":34080028,"url":"https://github.com/joshklop/cryptoapi","last_synced_at":"2025-12-14T11:33:58.668Z","repository":{"id":42677469,"uuid":"281203790","full_name":"joshklop/cryptoapi","owner":"joshklop","description":"Asynchronous cryptocurrency REST and websocket API with support for multiple exchanges.","archived":false,"fork":false,"pushed_at":"2022-12-08T11:12:31.000Z","size":115,"stargazers_count":10,"open_issues_count":6,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-30T10:39:08.993Z","etag":null,"topics":["bitfinex","bitvavo","ccxt","coinbasepro","cryptoapi","cryptocurrency-rest","cryptocurrency-websockets","kraken","multiple-exchanges","python","rest-api","websocket-api"],"latest_commit_sha":null,"homepage":"","language":"Python","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/joshklop.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}},"created_at":"2020-07-20T19:07:52.000Z","updated_at":"2025-03-06T16:20:11.000Z","dependencies_parsed_at":"2023-01-25T08:00:26.530Z","dependency_job_id":null,"html_url":"https://github.com/joshklop/cryptoapi","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/joshklop/cryptoapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshklop%2Fcryptoapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshklop%2Fcryptoapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshklop%2Fcryptoapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshklop%2Fcryptoapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshklop","download_url":"https://codeload.github.com/joshklop/cryptoapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshklop%2Fcryptoapi/sbom","scorecard":{"id":534112,"data":{"date":"2025-08-11","repo":{"name":"github.com/joshklop/cryptoapi","commit":"0b4351560c4d55a3f38847f94f82c0a34afe87bc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"37 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-120 / GHSA-45c4-8wx5-qw6w","Warn: Project is vulnerable to: PYSEC-2024-24 / GHSA-5h86-8mv2-jq9f","Warn: Project is vulnerable to: GHSA-5m98-qgg9-wh84","Warn: Project is vulnerable to: GHSA-7gpw-8wmc-pm8g","Warn: Project is vulnerable to: GHSA-8495-4g3g-x7pr","Warn: Project is vulnerable to: PYSEC-2024-26 / GHSA-8qpw-xqxj-h4r2","Warn: Project is vulnerable to: GHSA-9548-qrrj-x5pj","Warn: Project is vulnerable to: PYSEC-2023-246 / GHSA-gfw2-4jvh-wgfg","Warn: Project is vulnerable to: GHSA-pjjw-qhg8-p2p9","Warn: Project is vulnerable to: PYSEC-2023-250 / GHSA-q3qx-c6g2-7pw2","Warn: Project is vulnerable to: PYSEC-2023-251 / GHSA-qvrw-v9rv-5rjx","Warn: Project is vulnerable to: PYSEC-2021-76 / GHSA-v6wp-4m6f-gcjg","Warn: Project is vulnerable to: PYSEC-2023-247 / GHSA-xx9p-xxvh-7g8j","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2023-254 / GHSA-jfhm-5ghh-2f97","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: PYSEC-2021-63 / GHSA-rhm9-p9w5-fwm7","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: PYSEC-2021-62","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-5qpg-rh4j-qp35","Warn: Project is vulnerable to: GHSA-c58j-88f5-h53f","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2021-95 / GHSA-8ch4-58qp-g3mp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T06:29:38.422Z","repository_id":42677469,"created_at":"2025-08-20T06:29:38.422Z","updated_at":"2025-08-20T06:29:38.422Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27727243,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"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":["bitfinex","bitvavo","ccxt","coinbasepro","cryptoapi","cryptocurrency-rest","cryptocurrency-websockets","kraken","multiple-exchanges","python","rest-api","websocket-api"],"created_at":"2025-12-14T11:33:53.245Z","updated_at":"2025-12-14T11:33:58.661Z","avatar_url":"https://github.com/joshklop.png","language":"Python","readme":"# cryptoapi\n\nAsynchronous cryptocurrency REST and websocket API with support for multiple exchanges.\n\nCryptoapi is built on top of the fantastic [CCXT](https://github.com/ccxt/ccxt) library.\nIf you plan to do any serious trading, I would recommend paying for access to [CCXT Pro](https://ccxt.pro) because cryptoapi is an unstable test project.\n\n**Note**: Due to other exciting projects, I am no longer developing `cryptoapi`.\n\n## Installation\n\nCryptoapi is available on PyPI.\n\nIt is recommended to use the `--user` flag on package installations. Drop the flag if installing cryptoapi system-wide.\n```\npip install --user cryptoapi\n```\n\n## Usage\n\nThe API currently supports Bitfinex (API version 2), Bitvavo, Coinbase Pro, and Kraken.\n\n### Unified Methods\n\nEach exchange has four unified websocket methods in addition to the REST methods provided by [CCXT](https://github.com/ccxt/ccxt).\nAll results are formatted the same as in the CCXT library.\n\nAll of the methods put the results received from the exchange in the `exchange_instance.result` asyncio queue.\nThe results can be retrieved by using the `.get()` corountine method on the queue.\n\n* `subscribe_ticker`: ticker as a dictionary.\n* `subscribe_trades`: a list of trades recieved from the exchange.\n* `subscribe_ohlcvs`: a list of `[timestamp, open, high, low, close, volume]` candles, often just one candle is present (the candle for the timeframe provided, which is one minute by default).\n* `subscribe_order_book`: the data sent to the queue is the update from the exchange. Cryptoapi automatically keeps an updated order book for every instance (see the Local Order Book section below).\n\n### Example\n\nNote that `asyncio` must be available to take advantage of asynchronous capabilities.\nThe results from the exchanges are stored in the `exchange.result` `asyncio` queue in the form of `(channel, data)` tuples.\nThe `channel` in this example is `'order_book'`. The data is the reply from the exchange. \n```python\nimport asyncio\nimport cryptoapi\n\n\nasync def main():\n    exchanges = [\n        cryptoapi.Bitfinex(),\n    ]\n    for exchange in exchanges:\n        await exchange.load_markets()\n    symbols = ['BTC/EUR', 'ETH/EUR']\n    tasks = [\n        asyncio.create_task(exchange.subscribe_order_book(symbols))\n        for exchange in exchanges\n    ]\n    tasks.append(asyncio.create_task(get_results(exchanges, symbols)))\n    for t in tasks:\n        await t\n    for exchange in exchanges:\n        exchange.close()\n\n\nasync def get_results(exchanges, symbols):\n    while True:\n        for exchange in exchanges:\n            for symbol in symbols:\n                if symbol in exchange.symbols:\n                    channel, data = await exchange.result.get()\n                    print(data)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Local Order Book\n\nIf you subscribe to an order book channel, cryptoapi will keep a local copy of the order book in the `exchange.order_book` dictionary.\nKeep in mind that this dictionary is tied to the exchange instance, so if you have multiple instances of the same exchange you will also have multiple order books.\nAn example structure of the dictionary is outlined below.\n```python\n{\n    'BTC/USD': {\n        'bids': [[11111, 1.7], ...],            # [price, amount] sorted by price in descending order (best bid first).    \n        'asks': [[11112, 3], ...],              # [price, amount] sorted by price in ascending order (best ask first).\n        'timestamp': 1596729013,                # Unix timestamp for when the book was last updated.\n        'datetime': '2020-08-06T15:50:56.714Z', # iso860 datetime. Computed from the timestamp property.\n        'nonce': 109335233,                     # Exchange-provided nonce. None if not provided.\n    },\n    ...\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshklop%2Fcryptoapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshklop%2Fcryptoapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshklop%2Fcryptoapi/lists"}