{"id":25015233,"url":"https://github.com/cowprotocol/univ3-api","last_synced_at":"2025-08-19T08:05:56.193Z","repository":{"id":42001308,"uuid":"479310135","full_name":"cowprotocol/univ3-api","owner":"cowprotocol","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-31T14:24:44.000Z","size":96,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-03T16:45:38.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cowprotocol.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":"2022-04-08T08:36:04.000Z","updated_at":"2022-10-26T22:22:49.000Z","dependencies_parsed_at":"2022-08-12T02:00:27.053Z","dependency_job_id":null,"html_url":"https://github.com/cowprotocol/univ3-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cowprotocol/univ3-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Funiv3-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Funiv3-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Funiv3-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Funiv3-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cowprotocol","download_url":"https://codeload.github.com/cowprotocol/univ3-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowprotocol%2Funiv3-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121168,"owners_count":24702723,"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-08-19T02:00:09.176Z","response_time":63,"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":[],"created_at":"2025-02-05T08:18:29.961Z","updated_at":"2025-08-19T08:05:56.141Z","avatar_url":"https://github.com/cowprotocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nRuns the uniswap routing algorithm behind an http api. Intended to be used as a single order solver by the driver.\n\n# Setup\n\nDeveloped with node v17.8.0.\n\n```\nnpm install\nnpm run start\n```\n\nUses the environment variables NODE_URL, HOST, PORT.\n\nThe application accepts post requests on `/estimate`. The body of the request and the response are json. See `interface Request` and `interface Response` in `src/app.ts` or the example requests and example response below.\n\n# Testing\n\nHere are some test requests that have been useful during development.\n\nweth 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 18 decimals\nusdc 0xdAC17F958D2ee523a2206206994597C13D831ec7 6 decmials\n\nSell 1 weth for usdt\n```json\n{\n    \"type\": \"sell\",\n    \"token_in\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\n    \"token_out\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n    \"amount\": \"1000000000000000000\",\n    \"recipient\": \"0x0000000000000000000000000000000000000000\"\n}\n```\n\nBuy 1 weth with usdt:\n```json\n{\n    \"type\": \"buy\",\n    \"token_in\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n    \"token_out\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\n    \"amount\": \"1000000000000000000\",\n    \"recipient\": \"0x0000000000000000000000000000000000000000\"\n}\n```\n\nSell 1000 usdt for eth:\n```json\n{\n    \"type\": \"sell\",\n    \"token_in\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n    \"token_out\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\n    \"amount\": \"1000000000\",\n    \"recipient\": \"0x0000000000000000000000000000000000000000\"\n}\n```\n\nBuy 1000 usdt with eth:\n```json\n{\n    \"type\": \"buy\",\n    \"token_in\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\n    \"token_out\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\",\n    \"amount\": \"1000000000\",\n    \"recipient\": \"0x0000000000000000000000000000000000000000\"\n}\n```\n\nExample response:\n```json\n{\n  \"quote\": \"284671676368727715\",\n  \"gas\": \"113000\",\n  \"gas_price\": \"45790763269\",\n  \"call_data\": \"0x5ae401dc00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e45023b4df000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000003f3dcd5c8a5924e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n  \"call_value\": \"0x00\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcowprotocol%2Funiv3-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcowprotocol%2Funiv3-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcowprotocol%2Funiv3-api/lists"}