{"id":26675194,"url":"https://github.com/krishnaagrawal7508/pumpfunswap","last_synced_at":"2025-08-19T04:35:36.756Z","repository":{"id":284062372,"uuid":"953691826","full_name":"krishnaagrawal7508/PumpFunSwap","owner":"krishnaagrawal7508","description":"APIs to buy tokens on Pump.fun Dex","archived":false,"fork":false,"pushed_at":"2025-03-23T23:24:22.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T00:26:30.067Z","etag":null,"topics":["amm","api","buy","dex","pumpdotfun","raydium","solana","transaction"],"latest_commit_sha":null,"homepage":"https://swap.pump.fun","language":null,"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/krishnaagrawal7508.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}},"created_at":"2025-03-23T23:06:20.000Z","updated_at":"2025-03-23T23:25:28.000Z","dependencies_parsed_at":"2025-03-24T00:27:08.214Z","dependency_job_id":"3ddadc39-3e75-4274-9510-a670397d9231","html_url":"https://github.com/krishnaagrawal7508/PumpFunSwap","commit_stats":null,"previous_names":["krishnaagrawal7508/pumpfunswap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krishnaagrawal7508/PumpFunSwap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnaagrawal7508%2FPumpFunSwap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnaagrawal7508%2FPumpFunSwap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnaagrawal7508%2FPumpFunSwap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnaagrawal7508%2FPumpFunSwap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishnaagrawal7508","download_url":"https://codeload.github.com/krishnaagrawal7508/PumpFunSwap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnaagrawal7508%2FPumpFunSwap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260410012,"owners_count":23004779,"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","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":["amm","api","buy","dex","pumpdotfun","raydium","solana","transaction"],"created_at":"2025-03-26T03:16:52.592Z","updated_at":"2025-06-17T17:39:51.037Z","avatar_url":"https://github.com/krishnaagrawal7508.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PumpFunSwap\n\nA simple and easy to use API to create transactions on pump.fun AMM.\n\n## 📝 API Usage\n\n### Endpoint\nPOST https://pumpfundex.onrender.com/api/buy - Buy a token on pump.fun AMM\n\nGET https://pumpfundex.onrender.com/health - Check health of server\n\n### Request Body\n```javascript\n{\n    \"amount\": 1,                    // Amount in SOL\n    \"slippage\": 0.01,               // Slippage percentage, for eg: (0.01 = 1%)\n    \"tokenMint\": \"token_address\",   // Token mint address\n    \"walletAddress\": \"wallet\",      // Buyer's wallet address\n    \"rpcUrl\": \"rpc_url\"             // RPC URL to use\n}\n```\n\n### Response\n```json\n{\n    \"success\": true,\n    \"serializedTransaction\": \"base64_encoded_transaction\"\n}\n```\n\n### Example Usage\n\n```javascript\n// Create transaction\nconst response = await fetch('https://pumpfundex.onrender.com/api/buy', {\n    method: 'POST',\n    headers: {\n        'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n        amount: \"1000000\",\n        tokenMint: \"token_address\",\n        walletAddress: \"wallet\",\n        rpcUrl: \"rpc_url\"\n    })\n});\n\nconst { serializedTransaction } = await response.json();\n\n// On client side:\nconst bufferData = Buffer.from(serializedTransaction, \"base64\");\nconst transaction = Transaction.from(bufferData);\n\n// Sign and send\ntransaction.sign(userKeypair);\nconst txHash = await sendAndConfirmTransaction(\n    connection, \n    transaction, \n    [userKeypair],\n    { \n        skipPreflight: true, \n        preflightCommitment: 'confirmed' \n    }\n);\n```\n## 📚 Error Responses\n\n```json\n{\n    \"success\": false,\n    \"error\": \"Error message\"\n}\n```\n## 💰 Fees\n- 1% fee on the buy amount is included in each buy transaction\n- Fee is calculated based on the buy amount\n\n## 📜 License\n\nMIT License\n\n## 🔗 Contact\n\n- Twitter: [KrsnaAgr](https://x.com/KrsnaAgr)\n- Telegram: [krishna123agrawal](https://t.me/krishna123agrawal)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnaagrawal7508%2Fpumpfunswap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishnaagrawal7508%2Fpumpfunswap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnaagrawal7508%2Fpumpfunswap/lists"}