{"id":18780519,"url":"https://github.com/barkprotocol/jupiter-bot","last_synced_at":"2025-10-06T19:24:13.729Z","repository":{"id":260314911,"uuid":"880937437","full_name":"barkprotocol/jupiter-bot","owner":"barkprotocol","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-30T17:11:31.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T10:44:14.127Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barkprotocol.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-30T16:17:16.000Z","updated_at":"2024-10-30T17:11:35.000Z","dependencies_parsed_at":"2024-10-30T17:34:39.844Z","dependency_job_id":"134cc5c1-bc57-4d2d-9115-697d1a601623","html_url":"https://github.com/barkprotocol/jupiter-bot","commit_stats":null,"previous_names":["barkprotocol/jupiter-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fjupiter-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fjupiter-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fjupiter-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fjupiter-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barkprotocol","download_url":"https://codeload.github.com/barkprotocol/jupiter-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239696435,"owners_count":19682235,"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":[],"created_at":"2024-11-07T20:26:52.898Z","updated_at":"2025-10-06T19:24:08.683Z","avatar_url":"https://github.com/barkprotocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jupiter BOT\n\n**A Solana Trading Bot Using Jupiter API V6**\n\nThe **Customized Jupiter Arbitrage Bot** is designed to facilitate Solana-based token swaps with optimal pricing, leveraging Jupiter API V6. This bot enables users to execute arbitrage trades and provides a comprehensive set of endpoints for efficient interaction with the Solana blockchain.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Structure](#structure)\n- [API Endpoints](#api-endpoints)\n- [Enhanced APIs](#enhanced-apis)\n- [Rate Limit](#rate-limit)\n- [Usage](#usage)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Generate Keypairs](#generate-keypairs)\n- [Endpoint](#endpoint)\n- [Resources](#resources)\n\n---\n\n## Overview\n\nThis bot uses the Jupiter API client to handle arbitrage trading on Solana, automating price retrieval, transaction generation, and token swap management. It supports real-time quotes, swap instructions, and program ID interactions for additional token information.\n\n## Structure\n\n- **bot.ts**: Contains main bot logic, including methods for retrieving quotes, generating swap instructions, and executing swaps using the Jupiter API.\n- **index.ts**: The entry point to initialize and run the bot.\n\n## API Endpoints\n\nAn overview of the main API endpoints, with corresponding JavaScript methods in the Jupiter API client:\n\n| Endpoint                  | JS Method Name(s)               | Type | Description                                                                                       |\n|---------------------------|---------------------------------|------|---------------------------------------------------------------------------------------------------|\n| `/quote`                  | `quoteGet`, `quoteGetRaw`       | GET  | Retrieves the best-priced quote for a swap between two tokens for a specified amount.             |\n| `/swap`                   | `swapPost`, `swapPostRaw`       | POST | Generates a Solana swap transaction based on a quote.                                             |\n| `/swap-instructions`      | `swapInstructionsPost`, `swapInstructionsPostRaw` | POST | Provides swap instructions derived from a quote.                                      |\n| `/program-id-to-label`    | `programIdToLabelGet`, `programIdToLabelGetRaw` | GET  | Returns a mapping of names or labels for various program IDs.                                     |\n| `/indexed-route-map`      | `indexedRouteMapGet`, `indexedRouteMapGetRaw`   | GET  | Returns a hash map where the input mint is a key, with an array of valid output mints as values.  |\n\nRequest format: `{server}/{endpoint}?{query/body}`.\n\n## Enhanced APIs\n\nAdditional APIs provide extended functionality:\n\n- `/price`: Retrieve real-time price data for tokens.\n- `/markets`: Get data on available trading markets.\n- `/new-pools`: Fetches information on newly added liquidity pools.\n- **Quote Websockets**: Real-time quotes for token swaps.\n- **Swap Websockets**: Live swap execution notifications.\n\n## Rate Limit\n\nAPI rate limits may vary based on server load. For higher rate limits, consider running a dedicated instance of the API.\n\n## Usage\n\n1. **Retrieve a Quote**: Use the `/quote` endpoint to get the best price for a swap between two tokens.\n2. **Generate a Swap**: With a retrieved quote, use the `/swap` endpoint to create a swap transaction.\n3. **Execute Swap Instructions**: Use `/swap-instructions` to obtain specific instructions for executing the swap.\n\n## Installation\n\nTo set up the bot locally:\n\n```bash\ngit clone https://github.com/bark-protocol/jupiter-bot.git\ncd jupiter-bot\npnpm install\n```\n\n## Configuration\n\nCreate an `.env` file in the project root to specify environment variables, including the Solana RPC URL and Jupiter API key if applicable.\n\nExample `.env`:\n\n```bash\nSECRET_KEY=your_secret_key_here  # Avoid sharing!\nSOLANA_RPC_URL=https://api.devnet.solana.com\nHELIUS_ENDPOINT=\nJUPITER_API_KEY=your_api_key_here\nINPUT_MINT=\u003cinput_token_mint_address\u003e\nOUTPUT_MINT=\u003coutput_token_mint_address\u003e\nSWAP_AMOUNT=1000000\n```\n\n## Generate Keypairs\n\nTo create a wallet file if you don’t already have one, run:\n\n```bash\nsolana-keygen new --no-bip39-passphrase --silent --outfile ./my-keypair.json\n```\n\n## Endpoint\n\nBase URL for API calls:\n\n```plaintext\nhttps://jupiter-swap-api.[domain_address]/endpoint_here\n```\n\nReplace `[domain_address]` with your actual Jupiter API domain.\n\n## Resources\n\n- [Jupiter API V6 Documentation](https://station.jup.ag/docs/apis/swap-api)\n- [API Swagger Documentation](https://station.jup.ag/docs/apis/swagger)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarkprotocol%2Fjupiter-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarkprotocol%2Fjupiter-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarkprotocol%2Fjupiter-bot/lists"}