{"id":13746641,"url":"https://github.com/dydxprotocol/dydx-v3-python","last_synced_at":"2026-01-31T12:11:05.524Z","repository":{"id":39672748,"uuid":"327317901","full_name":"dydxprotocol/dydx-v3-python","owner":"dydxprotocol","description":"Python client for dYdX (API v3)","archived":false,"fork":false,"pushed_at":"2024-03-29T19:15:54.000Z","size":206,"stargazers_count":313,"open_issues_count":79,"forks_count":176,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-10-17T02:19:08.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dydxprotocol.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":"2021-01-06T13:20:52.000Z","updated_at":"2025-09-08T04:40:08.000Z","dependencies_parsed_at":"2023-02-15T12:16:12.499Z","dependency_job_id":"5fb2a707-dbde-4e1a-9b02-a2698229db89","html_url":"https://github.com/dydxprotocol/dydx-v3-python","commit_stats":{"total_commits":101,"total_committers":13,"mean_commits":7.769230769230769,"dds":0.7326732673267327,"last_synced_commit":"d9be2be67b52b145725a0b61039a7acb568723ed"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dydxprotocol/dydx-v3-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dydxprotocol%2Fdydx-v3-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dydxprotocol%2Fdydx-v3-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dydxprotocol%2Fdydx-v3-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dydxprotocol%2Fdydx-v3-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dydxprotocol","download_url":"https://codeload.github.com/dydxprotocol/dydx-v3-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dydxprotocol%2Fdydx-v3-python/sbom","scorecard":{"id":361992,"data":{"date":"2025-08-11","repo":{"name":"github.com/dydxprotocol/dydx-v3-python","commit":"73252e3141881f7b5366b051c89c42d5ccdaef58"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"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":"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":"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":"Code-Review","score":7,"reason":"Found 21/30 approved changesets -- score normalized to 7","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.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":"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/lint.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/dydxprotocol/dydx-v3-python/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/dydxprotocol/dydx-v3-python/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/dydxprotocol/dydx-v3-python/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/dydxprotocol/dydx-v3-python/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/dydxprotocol/dydx-v3-python/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/dydxprotocol/dydx-v3-python/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/lint.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:26","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"24 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","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: GHSA-wj6h-64fc-37mp","Warn: Project is vulnerable to: GHSA-v65g-f3cj-fjp4","Warn: Project is vulnerable to: PYSEC-2021-427 / GHSA-f865-m6cq-j9vx","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: PYSEC-2015-17","Warn: Project is vulnerable to: PYSEC-2023-74"],"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 27 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-18T11:04:21.939Z","repository_id":39672748,"created_at":"2025-08-18T11:04:21.939Z","updated_at":"2025-08-18T11:04:21.939Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28942294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T12:10:04.904Z","status":"ssl_error","status_checked_at":"2026-01-31T12:09:58.894Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-08-03T06:00:57.542Z","updated_at":"2026-01-31T12:11:05.507Z","avatar_url":"https://github.com/dydxprotocol.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://dydx.exchange/flat.svg\" width=\"256\" /\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href='https://pypi.org/project/dydx-v3-python'\u003e\n    \u003cimg src='https://img.shields.io/pypi/v/dydx-v3-python.svg' alt='PyPI'/\u003e\n  \u003c/a\u003e\n  \u003ca href='https://github.com/dydxprotocol/dydx-v3-python/blob/master/LICENSE'\u003e\n    \u003cimg src='https://img.shields.io/github/license/dydxprotocol/dydx-v3-python.svg' alt='License' /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\nPython client for dYdX (v3 API).\n\nThe library is currently tested against Python versions 2.7, 3.4, 3.5, 3.6, 3.9, and 3.11.\n\n## Installation\n\nThe `dydx-v3-python` package is available on [PyPI](https://pypi.org/project/dydx-v3-python). Install with `pip`:\n\n```bash\npip install dydx-v3-python\n```\n\n## Getting Started\n\nThe `Client` object can be created with different levels of authentication depending on which features are needed. For more complete examples, see the [examples](./examples/) directory, as well as [the integration tests](./integration_tests/).\n\n### Public endpoints\n\nNo authentication information is required to access public endpoints.\n\n```python\nfrom dydx3 import Client\nfrom web3 import Web3\n\n#\n# Access public API endpoints.\n#\npublic_client = Client(\n    host='http://localhost:8080',\n)\npublic_client.public.get_markets()\n```\n\n### Private endpoints\n\nOne of the following is required:\n* `api_key_credentials`\n* `eth_private_key`\n* `web3`\n* `web3_account`\n* `web3_provider`\n\n```python\n#\n# Access private API endpoints, without providing a STARK private key.\n#\nprivate_client = Client(\n    host='http://localhost:8080',\n    api_key_credentials={ 'key': '...', ... },\n)\nprivate_client.private.get_orders()\nprivate_client.private.create_order(\n    # No STARK key, so signatures are required for orders and withdrawals.\n    signature='...',\n    # ...\n)\n\n#\n# Access private API endpoints, with a STARK private key.\n#\nprivate_client_with_key = Client(\n    host='http://localhost:8080',\n    api_key_credentials={ 'key': '...', ... },\n    stark_private_key='...',\n)\nprivate_client.private.create_order(\n    # Order will be signed using the provided STARK private key.\n    # ...\n)\n```\n\n### Onboarding and API key management endpoints\n\nOne of the following is required:\n* `eth_private_key`\n* `web3`\n* `web3_account`\n* `web3_provider`\n\n```python\n#\n# Onboard a new user or manage API keys, without providing private keys.\n#\nweb3_client = Client(\n    host='http://localhost:8080',\n    web3_provider=Web3.HTTPProvider('http://localhost:8545'),\n)\nweb3_client.onboarding.create_user(\n    stark_public_key='...',\n    ethereum_address='...',\n)\nweb3_client.eth_private.create_api_key(\n    ethereum_address='...',\n)\n\n#\n# Onboard a new user or manage API keys, with private keys.\n#\nweb3_client_with_keys = Client(\n    host='http://localhost:8080',\n    stark_private_key='...',\n    eth_private_key='...',\n)\nweb3_client_with_keys.onboarding.create_user()\nweb3_client_with_keys.eth_private.create_api_key()\n```\n\n### Using the C++ Library for STARK Signing\n\nBy default, STARK curve operations such as signing and verification will use the Python native implementation. These operations occur whenever placing an order or requesting a withdrawal. To use the C++ implementation, initialize the client object with `crypto_c_exports_path`:\n\n```python\nclient = Client(\n    crypto_c_exports_path='./libcrypto_c_exports.so',\n    ...\n)\n```\n\nThe path should point to a C++ shared library file, built from Starkware's `crypto-cpp` library ([CMake target](https://github.com/starkware-libs/crypto-cpp/blob/601de408bee9f897315b8a5cb0c88e2450a91282/src/starkware/crypto/ffi/CMakeLists.txt#L3)) for the particular platform (e.g. Linux, etc.) that you are running your trading program on.\n\n## Running tests\n\nIf you want to run tests when developing the library locally, clone the repo and run:\n\n```\npip install -r requirements.txt\ndocker-compose up # In a separate terminal\nV3_API_HOST=\u003capi-host\u003e tox\n```\n\nNOTE: `api-host` should be `https://api.stage.dydx.exchange` to test in staging.\n","funding_links":[],"categories":["Exchange-based Tokens","Curated List"],"sub_categories":["API Integrations/Connectors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdydxprotocol%2Fdydx-v3-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdydxprotocol%2Fdydx-v3-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdydxprotocol%2Fdydx-v3-python/lists"}