{"id":15044253,"url":"https://github.com/bogdanteodoru/py3cw","last_synced_at":"2025-10-12T15:09:48.539Z","repository":{"id":36200063,"uuid":"222297336","full_name":"bogdanteodoru/py3cw","owner":"bogdanteodoru","description":"Unofficial wrapper for the 3Commas API written in Python","archived":false,"fork":false,"pushed_at":"2023-09-14T09:17:17.000Z","size":56,"stargazers_count":90,"open_issues_count":0,"forks_count":39,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-10-12T15:05:56.376Z","etag":null,"topics":["3commas-api","python","unofficial","wrapper-api"],"latest_commit_sha":null,"homepage":null,"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/bogdanteodoru.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-11-17T19:02:47.000Z","updated_at":"2025-07-22T04:46:58.000Z","dependencies_parsed_at":"2024-06-19T00:24:49.357Z","dependency_job_id":null,"html_url":"https://github.com/bogdanteodoru/py3cw","commit_stats":{"total_commits":79,"total_committers":14,"mean_commits":5.642857142857143,"dds":0.2911392405063291,"last_synced_commit":"f5795d1947ac3f1169a897fa7c87edb218b68621"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/bogdanteodoru/py3cw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdanteodoru%2Fpy3cw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdanteodoru%2Fpy3cw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdanteodoru%2Fpy3cw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdanteodoru%2Fpy3cw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bogdanteodoru","download_url":"https://codeload.github.com/bogdanteodoru/py3cw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdanteodoru%2Fpy3cw/sbom","scorecard":{"id":246900,"data":{"date":"2025-08-11","repo":{"name":"github.com/bogdanteodoru/py3cw","commit":"f5795d1947ac3f1169a897fa7c87edb218b68621"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"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":"Code-Review","score":4,"reason":"Found 10/24 approved changesets -- score normalized to 4","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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pythonpublish.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpublish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/bogdanteodoru/py3cw/pythonpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpublish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/bogdanteodoru/py3cw/pythonpublish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pythonpublish.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/pythonpublish.yml:19","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 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-17T07:46:10.904Z","repository_id":36200063,"created_at":"2025-08-17T07:46:10.904Z","updated_at":"2025-08-17T07:46:10.904Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011844,"owners_count":26085003,"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-10-12T02:00:06.719Z","response_time":53,"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":["3commas-api","python","unofficial","wrapper-api"],"created_at":"2024-09-24T20:50:20.723Z","updated_at":"2025-10-12T15:09:48.504Z","avatar_url":"https://github.com/bogdanteodoru.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py3cw\n\nUnofficial wrapper for the [3Commas API](https://github.com/3commas-io/3commas-official-api-docs) written in Python.\n***\n\nHow to install \n\n```bash\npip install py3cw\n```\n\nHow to use\n\n```python\nfrom py3cw.request import Py3CW\n\n# request_options is optional, as all the keys from the dict\n# so you can only change what you want.\n#\n# default options for request_options are:\n# request_timeout: 30s (30 for connect, 30 for read)\n# nr_of_retries: 5\n# retry_status_codes: [500, 502, 503, 504]\n# retry_backoff_factor (optional): It allows you to change how long the processes will sleep between failed requests.\n# For example, if the backoff factor is set to:\n# 1 second the successive sleeps will be 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256.\n# 2 seconds - 1, 2, 4, 8, 16, 32, 64, 128, 256, 512\n# 10 seconds - 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560\n# \n# NOTE: Nr of retries and retry_status_codes will also be used if we get \n# an falsy success from 3 commas (eg: { \"error\": { \"status_code\": 502 }})\np3cw = Py3CW(\n    key='', \n    secret='',                                      #System generated secret key\n    selfsigned='',                          #RSA generated private key\n    request_options={\n        'request_timeout': 10,\n        'nr_of_retries': 1,\n        'retry_status_codes': [502],\n        'retry_backoff_factor': 0.1\n    }\n)\n\n# With no action\n# Destruct response to error and data\n# and check first if we have an error, otherwise check the data\nerror, data = p3cw.request(\n    entity='smart_trades_v2',\n    action=''\n)\n\n# With payload data\n# Destruct response to error and data\n# and check first if we have an error, otherwise check the data\nerror, data  = p3cw.request(\n    entity='smart_trades_v2', \n    action='new', \n    payload={\n        \"account_id\": 123456,\n        ......\n    }\n)\n\n# With action_id replaced in URL\n# Destruct response to error and data\n# and check first if we have an error, otherwise check the data\nerror, data = p3cw.request(\n    entity='smart_trades_v2', \n    action='get_by_id',\n    action_id='123456'\n)\n```\n\nAn `entity` represents main categories. Meaning, you have `accounts`, `bots`, `marketplace`, `deals` or `smart_trades`\n\nAn `action` is represented by a ... well, an action of a specific category. There are multiple actions you can use (check 3commas API)\n\n`action_id` is used to replace the necessary account_id or bot_id or deal_id (you get the picture) needed on some actions. For example the `action` `sell_all_to_btc` requires the `account_id` (`POST /ver1/accounts/{account_id}/load_balances`)\n\n`payload` is the data you send.\n\n[Forced mode header](https://github.com/3commas-io/3commas-official-api-docs#api-modesreal-or-paper) could be added with the parameter `additional_headers`. Allowed values are 'real' or 'paper'. E.g. \n`... additional_headers={'Forced-Mode': 'paper'} ...`\n\n***\n\n3Commas API helpers.\n\n3Commas Docs: https://github.com/3commas-io/3commas-official-api-docs\n\nSigned Endpoints RSA: https://github.com/3commas-io/3commas-official-api-docs/blob/master/signed_endpoints_rsa.md\n\nAccounts: https://github.com/3commas-io/3commas-official-api-docs/blob/master/accounts_api.md\n\nBots: https://github.com/3commas-io/3commas-official-api-docs/blob/master/bots_api.md\n\nDeals: https://github.com/3commas-io/3commas-official-api-docs/blob/master/deals_api.md\n\nMarketplace: https://github.com/3commas-io/3commas-official-api-docs/blob/master/marketplace_api.md\n\nGrid Bots: https://github.com/3commas-io/3commas-official-api-docs/blob/master/grid_bots_api.md\n\nSmart Trades: https://github.com/3commas-io/3commas-official-api-docs/blob/master/smart_trades_v2_api.md\n***\n\nBest used with [Binance](https://www.binance.com/en/register?ref=XEK765NE).\n\nbuy me a beer 🍺\n\nETH: 0x0c2EA600d8bECE889F998D6a22332298E879940b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdanteodoru%2Fpy3cw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbogdanteodoru%2Fpy3cw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdanteodoru%2Fpy3cw/lists"}