{"id":30947660,"url":"https://github.com/ycgw/swap","last_synced_at":"2026-05-08T09:32:32.319Z","repository":{"id":312863593,"uuid":"1049038067","full_name":"ycgw/swap","owner":"ycgw","description":"The command-line tool automatically buys and sells Solana tokens based on predefined profit and loss targets.","archived":false,"fork":false,"pushed_at":"2025-09-02T12:08:13.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-02T14:19:03.635Z","etag":null,"topics":["birdeye","bun","dex","helius","jupiter","solana","tokens","typescript","web3","web3js"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ycgw.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-09-02T11:55:19.000Z","updated_at":"2025-09-02T12:14:37.000Z","dependencies_parsed_at":"2025-09-02T14:19:38.921Z","dependency_job_id":"bfc25b10-13d5-40ea-8a03-37dac773c824","html_url":"https://github.com/ycgw/swap","commit_stats":null,"previous_names":["ycgw/swap"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ycgw/swap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycgw%2Fswap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycgw%2Fswap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycgw%2Fswap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycgw%2Fswap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycgw","download_url":"https://codeload.github.com/ycgw/swap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycgw%2Fswap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32774783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["birdeye","bun","dex","helius","jupiter","solana","tokens","typescript","web3","web3js"],"created_at":"2025-09-11T02:00:47.484Z","updated_at":"2026-05-08T09:32:32.292Z","avatar_url":"https://github.com/ycgw.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWAP\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/2a726383-8c51-4c0f-b339-8e3fae22bdd1\" /\u003e\n\u003c/p\u003e\n\n\u003e Talk, we need SWAP in here, multiple tokens armed with an insane transaction volume on the corner of pump.fun and bonk!\n\n## Description\nThis command-line tool automatically buys and sells Solana tokens based on predefined profit and loss targets.\n\nThe tool leverages the [Jupiter API](https://dev.jup.ag/docs/api) for swaps, the [Helius API](https://www.helius.dev/docs/api-reference) for broadcasting transactions and fetching trade details, and the [Birdeye API](https://docs.birdeye.so/docs/overview) for price monitoring.\n\n## Features\n\n- **Automatic Trading**: buys a token and automatically sells it based on take-profit and stop-loss percentages;\n- **Manual Sell**: allows for manual selling of the token by pressing the Enter key;\n- **Liquidity Protection**: sells the token automatically if the liquidity drops below a certain threshold;\n- **Price Monitoring**: continuously monitors the token's price and displays the profit/loss percentage;\n\n## Installation\n\nClone the repository \u0026 install the dependencies:\n\n```bash\n  git clone https://github.com/ycgw/swap.git \u0026\u0026 cd swap \u0026\u0026 bun install\n```\n\n## Usage\n\n1.  Create a `.env` file in the root of the project:\n\n```bash\ntouch .env\n```\n\n2. Fill the `.env` file using `.env.test` as an example:\n\n```\nHELIUS_API_KEY=\nBIRDEYE_API_KEY=\nWALLET_PRIVATE_KEY=\n```\n\n3. Run the tool with the token mint address as an argument:\n\n```bash\nbun run src/index.ts EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\n```\n\n## Configuration\n\nThe following parameters can be configured in the `src/config.ts` file:\n\n- `TAKE_PROFIT_PERCENTAGE`: the percentage at which to take profit;\n- `STOP_LOSS_PERCENTAGE`: the percentage at which to stop loss;\n- `LIQUIDITY_STOP_LOSS`: the liquidity threshold at which to sell the token;\n- `POLLING_INTERVAL_MS`: the interval at which to poll for the token's price;\n- `BUY_AMOUNT`: the amount of SOL to use for buying the token;\n- `BUY_SLIPPAGE`: the slippage to use for buying the token;\n- `SELL_SLIPPAGE`: the slippage to use for selling the token;\n\n  \u003cbr /\u003e\n\n\u003e [!WARNING]\n\u003e This tool is for educational purposes only. Trading cryptocurrencies is risky, and you should never invest more than you can afford to lose. The author is not responsible for any financial losses you may incur by using this tool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycgw%2Fswap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycgw%2Fswap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycgw%2Fswap/lists"}