{"id":13604779,"url":"https://github.com/serum-community/pyserum","last_synced_at":"2026-03-10T21:16:18.913Z","repository":{"id":40274588,"uuid":"291354262","full_name":"serum-community/pyserum","owner":"serum-community","description":"Pyserum is client library to interact with Serum DEX","archived":false,"fork":false,"pushed_at":"2023-02-02T14:08:48.000Z","size":820,"stargazers_count":185,"open_issues_count":25,"forks_count":65,"subscribers_count":9,"default_branch":"alpha","last_synced_at":"2025-10-28T18:51:37.663Z","etag":null,"topics":["project-serum","python"],"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/serum-community.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-08-29T21:47:17.000Z","updated_at":"2025-09-09T02:52:03.000Z","dependencies_parsed_at":"2023-02-17T20:46:00.231Z","dependency_job_id":null,"html_url":"https://github.com/serum-community/pyserum","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/serum-community/pyserum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serum-community%2Fpyserum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serum-community%2Fpyserum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serum-community%2Fpyserum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serum-community%2Fpyserum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serum-community","download_url":"https://codeload.github.com/serum-community/pyserum/tar.gz/refs/heads/alpha","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serum-community%2Fpyserum/sbom","scorecard":{"id":812843,"data":{"date":"2025-08-11","repo":{"name":"github.com/serum-community/pyserum","commit":"49271da70f73d921904d54132c0580ecdadc08be"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":4,"reason":"Found 12/30 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":"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":"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":"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":"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/docs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/docs.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/docs.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/docs.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/docs.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/docs.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/integration.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/integration.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/integration.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/serum-community/pyserum/main.yml/alpha?enable=pin","Warn: downloadThenRun not pinned by hash: scripts/bootstrap_dex.sh:19","Warn: downloadThenRun not pinned by hash: scripts/bootstrap_dex.sh:36","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   2 downloadThenRun 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/integration.yml:1","Warn: no topLevel permission defined: .github/workflows/main.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":"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":"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":-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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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"}},{"name":"Vulnerabilities","score":0,"reason":"50 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","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: 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: GHSA-vqfr-h8mv-ghfj","Warn: Project is vulnerable to: PYSEC-2022-183 / GHSA-h8pj-cxx2-jfg2","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-29gw-9793-fvw7","Warn: Project is vulnerable to: PYSEC-2022-12 / GHSA-pq7m-3gw7-gq5x","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: GHSA-33p9-3p43-82vq","Warn: Project is vulnerable to: PYSEC-2022-42974 / GHSA-m678-f26j-3hrp","Warn: Project is vulnerable to: PYSEC-2023-157 / GHSA-64x5-55rw-9974","Warn: Project is vulnerable to: PYSEC-2023-272 / GHSA-h56g-gq9v-vc8r","Warn: Project is vulnerable to: PYSEC-2024-165 / GHSA-hrw6-wg82-cm62","Warn: Project is vulnerable to: PYSEC-2022-179 / GHSA-p737-p57g-4cpr","Warn: Project is vulnerable to: PYSEC-2022-211 / GHSA-q874-g24w-4q9g","Warn: Project is vulnerable to: PYSEC-2023-155 / GHSA-r726-vmfq-j9j3","Warn: Project is vulnerable to: PYSEC-2022-249 / GHSA-9jmq-rx5f-8jwq","Warn: Project is vulnerable to: PYSEC-2022-180 / GHSA-m87f-39q9-6f55","Warn: Project is vulnerable to: PYSEC-2022-212 / GHSA-v7vq-3x77-87vg","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","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-753j-mpmx-qq6g","Warn: Project is vulnerable to: GHSA-7cx3-6m66-7c5m","Warn: Project is vulnerable to: GHSA-8w49-h785-mj3c","Warn: Project is vulnerable to: PYSEC-2023-75 / GHSA-hj3f-6gcp-jg8j","Warn: Project is vulnerable to: GHSA-qppv-j76h-2rpx","Warn: Project is vulnerable to: GHSA-w235-7p84-xx57","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","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-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T13:34:28.991Z","repository_id":40274588,"created_at":"2025-08-23T13:34:28.991Z","updated_at":"2025-08-23T13:34:28.991Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30355225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["project-serum","python"],"created_at":"2024-08-01T19:00:51.181Z","updated_at":"2026-03-10T21:16:18.880Z","avatar_url":"https://github.com/serum-community.png","language":"Python","funding_links":[],"categories":["DEX Integration"],"sub_categories":["RPC servers"],"readme":"[![Actions\nStatus](https://github.com/serum-community/pyserum/workflows/CI/badge.svg)](https://github.com/serum-community/pyserum/actions?query=workflow%3ACI)\n[![Codecov](https://codecov.io/gh/serum-community/pyserum/branch/alpha/graph/badge.svg)](https://codecov.io/gh/serum-community/pyserum/branches/alpha)\n\n# PySerum\n\nPython client library for interacting with the [Project Serum](https://projectserum.com/) DEX.\n\n## Install\n\n```sh\npip install pyserum\n```\n\n## Getting Started\n\n### Mainnet Market Addresses\n\n```python\nfrom pyserum.connection import get_live_markets, get_token_mints\nprint(\"tokens: \")\nprint(get_token_mints())\nprint(\"markets: \")\nprint(get_live_markets())\n```\n\nThe source of truth of the market addresses can be found\n[here](https://github.com/project-serum/serum-js/blob/master/src/markets.json).\n\n### Get Orderbook\n\n```python\nfrom pyserum.connection import conn\nfrom pyserum.market import Market\n\ncc = conn(\"https://api.mainnet-beta.solana.com/\")\nmarket_address = \"5LgJphS6D5zXwUVPU7eCryDBkyta3AidrJ5vjNU6BcGW\" # Address for BTC/USDC\n\n# Load the given market\nmarket = Market.load(cc, market_address)\nasks = market.load_asks()\n# Show all current ask order\nprint(\"Ask Orders:\")\nfor ask in asks:\n    print(\"Order id: %d, price: %f, size: %f.\" % (\n          ask.order_id, ask.info.price, ask.info.size))\n\nprint(\"\\n\")\n# Show all current bid order\nprint(\"Bid Orders:\")\nbids = market.load_bids()\nfor bid in bids:\n    print(f\"Order id: {bid.order_id}, price: {bid.info.price}, size: {bid.info.size}.\")\n```\n\n### Get Orderbook (Async)\n\n```python\nimport asyncio\nfrom pyserum.async_connection import async_conn\nfrom pyserum.market import AsyncMarket\n\n\nasync def main():\n    market_address = \"5LgJphS6D5zXwUVPU7eCryDBkyta3AidrJ5vjNU6BcGW\"  # Address for BTC/USDC\n    async with async_conn(\"https://api.mainnet-beta.solana.com/\") as cc:\n        # Load the given market\n        market = await AsyncMarket.load(cc, market_address)\n        asks = await market.load_asks()\n        # Show all current ask order\n        print(\"Ask Orders:\")\n        for ask in asks:\n            print(f\"Order id: {ask.order_id}, price: {ask.info.price}, size: {ask.info.size}.\")\n        print(\"\\n\")\n        # Show all current bid order\n        print(\"Bid Orders:\")\n        bids = await market.load_bids()\n        for bid in bids:\n            print(f\"Order id: {bid.order_id}, price: {bid.info.price}, size: {bid.info.size}.\")\n\n\nasyncio.run(main())\n\n```\n\n### Support\n\nNeed help? You can find us on the Serum Discord:\n\n[![Discord Chat](https://img.shields.io/discord/739225212658122886?color=blueviolet)](https://discord.gg/fvbaQ6uyv5)\n\n## Development\n\n### Setup\n\n1. Install pipenv.\n\n```sh\nbrew install pipenv\n```\n\n2. Install dev dependencies.\n\n```sh\npipenv install --dev\n```\n\n3. Activate the pipenv shell.\n\n```sh\npipenv shell\n```\n\n### Format\n\n```\nmake format\n```\n\n### Lint\n\n```sh\nmake lint\n```\n\n### Tests\n\n```sh\n# Unit tests\nmake unit-tests\n# Integration tests\nmake int-tests\n```\n\n### Using Jupyter Notebook\n\n```sh\nmake notebook\n```\n\n### Start Serum in Docker image\n\n```bash\n./scripts/bootstrap_dex.sh\n```\n\nThis will start a docker container with `solana` image and deploy a serum DEX which you can use for testing.\n\nThe market address, program id, and wallet addresses can be found in the new `crank.log` file after the script runs successfully.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserum-community%2Fpyserum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserum-community%2Fpyserum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserum-community%2Fpyserum/lists"}