{"id":23545537,"url":"https://github.com/bh2smith/cowswap-integrations-py","last_synced_at":"2026-02-17T08:03:07.773Z","repository":{"id":45351589,"uuid":"410533868","full_name":"bh2smith/cowswap-integrations-py","owner":"bh2smith","description":"A collection of simple API integrations for Gnosis Protocol V2","archived":false,"fork":false,"pushed_at":"2023-09-04T12:57:19.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-07T17:55:02.731Z","etag":null,"topics":["api-integration","cowswap","gnosis-protocol"],"latest_commit_sha":null,"homepage":"","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/bh2smith.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}},"created_at":"2021-09-26T11:32:07.000Z","updated_at":"2025-02-17T04:44:29.000Z","dependencies_parsed_at":"2025-04-24T03:13:42.416Z","dependency_job_id":"ddb59892-e07a-4368-a699-266efe5f5c9f","html_url":"https://github.com/bh2smith/cowswap-integrations-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bh2smith/cowswap-integrations-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fcowswap-integrations-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fcowswap-integrations-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fcowswap-integrations-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fcowswap-integrations-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bh2smith","download_url":"https://codeload.github.com/bh2smith/cowswap-integrations-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bh2smith%2Fcowswap-integrations-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021567,"owners_count":26087023,"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-14T02:00:06.444Z","response_time":60,"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":["api-integration","cowswap","gnosis-protocol"],"created_at":"2024-12-26T08:18:47.073Z","updated_at":"2025-10-14T22:02:50.471Z","avatar_url":"https://github.com/bh2smith.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**⚠️ UNDER CONSTRUCTION ⚠️**\n\nMake an order through API CowSwap\n\n## Setup \u0026 Installation\n\n```shell\npython3 -m venv venv\nsource ./env/bin/activate\npip install -r requirements.txt\n```\n\nYou will need to create your own `.env` file. A template exists here as `.env.sample`\nfrom which you can make your own by running the command `cp .env.sample .env` and\nfilling in your own account details.\n\n## Placing an Order\n\nSet your network and private key in `.env`.\n\nFill the variables in the `cow_swap` method of `./main.py`\n\n```shell\nsource .env\npython -m src.main\n```\n\nIf you run the script exactly as is with the public and private keys provided, you\nshould receive an error from the orderbook API saying:\n\n```shell\n{\"errorType\":\"InsufficientFunds\",\"description\":\"order owner must have funds worth at least x in his account\"}\n```\n\n# CowSwap API Integrations \u0026 Tid Bits\n\nA collection of python scripts and services built as simple integrations\nwith [Gnosis Protocol v2](https://gnosis.io/protocol/)\n\n## [WIP] Trading Bot for Stable Coin Orders\n\nInitially inspired by [Martin's script](https://pastebin.com/RZyfL08P). This integration\nis a simple bot which monitors the orderbook seeking open orders\nbetween [stable coins](https://en.wikipedia.org/wiki/Stablecoin). Assuming that, on\naverage, USD stable coins are worth 1 USD, the bot is prepared to place a counter order\nfor any swap willing to trade `x` of token A for `y` of token B when `x \u003c y`. It is\nimportant to remember that execution fees must be factored into this decision-making\nprocess so that the counter order placed should net a result of strictly more tokens\npurchased than sold (including fees).\n\nFor this reason, the script is primarily intended to be run on xDai network where\ntransaction fees are negligible.\n\nTo see the trading history of the bot currently running on xDai with this script check\nout this [trade history](https://dune.xyz/queries/130938/257752) table filtered by\naddress [0xd2cc479be0512301d0b19c3c0a9300baa1e03758](https://blockscout.com/xdai/mainnet/address/0xD2Cc479Be0512301D0B19C3C0A9300bAA1E03758/transactions)\n\n## [TODO] LP Token Solver\n\nDesign an HTTP solver which allow people to \"swap\"\n[LP tokens](https://coinmarketcap.com/alexandria/glossary/liquidity-provider-tokens-lp-tokens)\n\nIn essence, the solver will fetch the open orderbook, filtering for orders whose buy or\nsell token is an LP token. It will then encode the interactions necessary to enter or\nexit liquidity from the corresponding pool.\n\n### Advanced features\n\nIn the event that there is a\n[coincidence of wants](https://en.wikipedia.org/wiki/Coincidence_of_wants)\n(a.k.a. a *CoW*), the solver could match the orders directly to reduce the cost of\nexecution. Note that, A CoW in this scenario corresponds to a simultaneous desire to\nprovide and withdraw liquidity from a specific pool. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbh2smith%2Fcowswap-integrations-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbh2smith%2Fcowswap-integrations-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbh2smith%2Fcowswap-integrations-py/lists"}