{"id":50846877,"url":"https://github.com/flock4h/cobra","last_synced_at":"2026-06-14T10:32:52.107Z","repository":{"id":308617950,"uuid":"1033466764","full_name":"FLOCK4H/Cobra","owner":"FLOCK4H","description":"Cobra - personal off-chain DeX router for Solana; Buy, sell, search pools, and more on all Raydium, Pump.fun, and Meteora AMMs.","archived":false,"fork":false,"pushed_at":"2026-05-05T18:25:59.000Z","size":1104,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-14T10:32:51.770Z","etag":null,"topics":["cobra","cobra-router","cobra-solana","dex-python","dex-router","meteora","meteora-python","pump-fun","pump-fun-amm","pump-fun-python","pumpdotfun","raydium","raydium-clmm","raydium-cpmm","raydium-python","solana","solana-bot","solana-dex-router","solana-router","solana-trading"],"latest_commit_sha":null,"homepage":"https://flock4h.github.io/Cobra/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FLOCK4H.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-06T21:28:23.000Z","updated_at":"2026-05-09T07:41:04.000Z","dependencies_parsed_at":"2025-08-06T23:31:37.873Z","dependency_job_id":"4354f10b-4ff4-447b-bcf4-b2554b8bea6d","html_url":"https://github.com/FLOCK4H/Cobra","commit_stats":null,"previous_names":["flock4h/cobra"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/FLOCK4H/Cobra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FLOCK4H%2FCobra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FLOCK4H%2FCobra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FLOCK4H%2FCobra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FLOCK4H%2FCobra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FLOCK4H","download_url":"https://codeload.github.com/FLOCK4H/Cobra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FLOCK4H%2FCobra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34318523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["cobra","cobra-router","cobra-solana","dex-python","dex-router","meteora","meteora-python","pump-fun","pump-fun-amm","pump-fun-python","pumpdotfun","raydium","raydium-clmm","raydium-cpmm","raydium-python","solana","solana-bot","solana-dex-router","solana-router","solana-trading"],"created_at":"2026-06-14T10:32:49.361Z","updated_at":"2026-06-14T10:32:52.102Z","avatar_url":"https://github.com/FLOCK4H.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]\n\u003e This project is outdated, and will soon become archived. \u003c/br\u003e\n\u003e Use [Mamba](https://github.com/FLOCK4H/Mamba) instead. \u003c/br\u003e\n\u003e Some markets will still work until their on-chain program changes.\n\n\u003c/br\u003e\n\n\u003cimg src=\"https://github.com/FLOCK4H/Cobra/blob/main/docs/imgs/cobra_banner.png\" /\u003e\n\n\u003e [!IMPORTANT]\n\u003e This software is open-source \u0026 free of any charge, there are no fees, nor ads included in the repo.\n\u003e \u003c/br\u003e\n\u003e Consider feeding the Cobra if the project comes useful.\n\u003e \u003c/br\u003e\n\u003e Wallet: `FL4CKfetEWBMXFs15ZAz4peyGbCuzVaoszRKcoVt3WfC`\n\n# Cobra\n\n### Read the **[Cobra Documentation](https://flock4h.github.io/Cobra)**\n\n**Supported Solana Markets:**\n\n1. [Raydium CLMM](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/raydiumswap/clmm)\n2. [Meteora DLMM](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/meteora_dlmm)\n3. [PumpFun](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/pump_fun)\n4. [PumpSwapAMM](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/PumpSwapAMM)\n5. [MeteoraDAMM v1](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/meteora_damm_v1)\n6. [MeteoraDAMM v2](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/meteora_damm_v2)\n7. [Meteora Dynamic Bonding Curve](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/meteoraDBC)\n8. [Raydium CPMM](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/raydiumswap/cpmm)\n9. [Raydium AMM V4](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/raydiumswap/amm_v4)\n10. [Raydium Launchlab](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter/router/raydiumswap/launchlab)\n\nCobra composes of 3 parts:\n- CobraRouter\n- CobraNET (Optional)\n- CobraWallets (Optional)\n\n**and a CLI, a Command Line Interface wrapper around [CobraRouter](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter) and [CobraWallets](https://github.com/FLOCK4H/Cobra/tree/main/CobraWallets/):**\n\n\u003cimg width=\"1101\" height=\"526\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5eef96af-6640-47a0-8541-9ba0066a093f\" /\u003e\n\nCheck out **[How to run CLI](https://flock4h.github.io/Cobra/first/installation/#4-optional-cli-configuration)**\n\nAfter setting up Cobra properly, the features are:\n- Generating Wallets, Grinding Custom Wallets\n- Buying, selling on supported markets (\u0026 in Pump.fun AMM - creating new pools)\n- Detecting mint's market and pool address\n- Fetching pool's states/ keys (for developers)\n- Interfacing with supported markets using available methods (for developers)\n\n# Setup\n\n## 1. Download the repository and install the required modules\n\n```\n$ git clone https://github.com/FLOCK4H/Cobra\n$ pip install -r req.txt\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🖱️ I am a developer\u003c/b\u003e\u003c/summary\u003e\n\n## 2. Install [CobraRouter](https://github.com/FLOCK4H/Cobra/tree/main/CobraRouter/CobraRouter) module:\n    \n```bash\n$ cd CobraRouter\n$ pip install .\n```\n\n## 3. Usage:\n\n```python\nfrom CobraRouter.detect import CobraDetector\nfrom CobraRouter.router import Router\nimport asyncio\nfrom solana.rpc.async_api import AsyncClient\nimport aiohttp\n\nasync def main():\n    client = AsyncClient(\"https://api.apewise.org/rpc?api-key=\")\n    session = aiohttp.ClientSession()\n    router = Router(client, session)\n    detector = CobraDetector(router, \"https://api.apewise.org/rpc?api-key=\")\n    detect = await detector._detect(\"9R1pCPM7GRr9F4gk978LqBQiPKfYStbZKc5iKV4imoon\")\n    print(detect)\n    await client.close()\n    await session.close()\n    await router.close()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n**Example output:**\n\n```bash\nPS C:\\Users\\swear\\Desktop\u003e python .\\test.py\nBMBcZ9GWMCi9HaCE7BagrLxakzffy6fAGdEpihLRfVPw\n[CobraRouter] Route winner (?): 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 -\u003e BMBcZ9GWMCi9HaCE7BagrLxakzffy6fAGdEpihLRfVPw\n('675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8', 'BMBcZ9GWMCi9HaCE7BagrLxakzffy6fAGdEpihLRfVPw')\n```\n\nLearn how to interact with the library: **[Cobra Documentation](https://flock4h.github.io/Cobra)**\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003cb\u003e🖱️ I am a trader\u003c/b\u003e\u003c/summary\u003e\n\n## 2. Configure the `secrets.env` file:\n\n\u003e Required variables are: `RUN_AS_CLI`, `HTTP_RPC`, and `PRIVATE_KEY`.\u003c/br\u003e \n\u003e Helius can be free tier.\u003c/br\u003e\n\u003e **Current fastest HTTP RPC Provider:** [Apewise](https://apewise.org)\n\n**Create or edit `secrets.env` file; Here you can control `SLIPPAGE`, which is 1..100 range, and `PRIORITY_FEE_LEVEL` which is a String and options are: `low`, `medium`, `high`, `turbo`.**\n\n```\nRUN_AS_CLI=True\nHTTP_RPC=\"https://api.apewise.org/rpc?api-key=\" # apewise.org -\u003e fastest right now\n\n# CLI CONFIG SECTION\nPRIVATE_KEY=2wY3abcde5Pj4xxxxxxxxxxxxxxxxxxxxxxxxxxxx\nSLIPPAGE=30\nPRIORITY_FEE_LEVEL=\"high\" # \"low\", \"medium\", \"high\", \"turbo\"\n```\n\n## 3. Run the CLI\n\n`$ python main.py`\n\n\n\u003cimg width=\"913\" height=\"181\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ef98c6ab-86a5-4548-bba2-8d3ad9bdc89a\" /\u003e\n\n\n\u003c/details\u003e\n\n# CobraNET\n\nCobraNET is an optional Telegram wrapper around the CobraRouter and CobraWallets, and allows you to host your own Dex Router via Telegram Bot.\n\n## Setup\n\nCreate `secrets.env` where you run the application, make sure to set:\n\n`secrets.env`\n```\nRUN_AS_CLI=False\nBOT_TOKEN=TELEGRAM_BOT_TOKEN_FROM_BOTFATHER\nHTTP_RPC=\"https://api.apewise.org/rpc?api-key=\" # apewise.org -\u003e fastest right now\nHELIUS_API_KEY=\"your-helius-free-or-not-api-key\" \n```\n\nFor database operations you will need PostgreSQL installed: [PostgreSQL](https://www.postgresql.org/download)\n\nInitialize the database:\n\n```\n$ cd Cobra\n$ python database.py\n```\n\nRun the Cobra with Telegram support:\n\n`$ python main.py`\n\nTest your bot by entering `/start` inside the conversation.\n\n\u003cimg width=\"528\" height=\"757\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8af7dd6b-cc97-4ee1-9ed3-6abd5a13c163\" /\u003e\n\nLearn more about CobraNET here: [Cobra Documentation](https://flock4h.github.io/Cobra/markets/cobranet)\n\n## Contact \u0026 Support\n\n**Discord: [FLOCK4H.CAVE](https://discord.gg/thREUECv2a)**, **Telegram: [FLOCK4H.CAVE](https://t.me/flock4hcave)**\n\n**Telegram private handle: @dubskii420**\n\n\u003cimg src=\"https://github.com/user-attachments/assets/d655c153-0056-47fc-8314-6f919f18ed6d\" width=\"256\" /\u003e\n\n# LICENSE\n\nCopyright 2025 FLOCK4H\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflock4h%2Fcobra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflock4h%2Fcobra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflock4h%2Fcobra/lists"}