Skip to content

razedotbot/trading-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Built on Solana Open Source

⚡ Selfhosted Solana Trading API

A self-hosted Express.js API server for automated Solana token trading powered by the Fury Bot service.
It provides endpoints for buying and selling tokens with multi-wallet support, transaction bundling, and built-in security features.


✨ Features

  • 💸 Token Trading – Buy and sell Solana tokens via Fury Bot API
  • 👛 Multi-Wallet Support – Manage and trade from multiple wallets simultaneously
  • 📦 Transaction Bundling – Batch transactions for better performance
  • 🚦 Rate Limiting – Prevent API abuse with built-in throttling
  • 🌐 CORS Enabled – Cross-origin requests supported
  • 🛡️ Error Handling – Comprehensive logging and error management

📚 Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Solana wallet private keys
  • Fury Bot API access

🚀 Getting Started

Installation

git clone <repository-url>
cd selfhosted-api
npm install

Configuration

Set environment variables in .env or update server.js:

  • FURY_API_URL → Fury Bot API endpoint (default: https://de.fury.bot)
  • FURY_API_KEY → Your Fury Bot API key
  • PORT → Server port (default: 4444)

Run the Server

npm start

The server will be available at:
👉 http://localhost:4444


🔌 API Endpoints

POST /api/tokens/buy

Buy tokens with specified parameters.

Request body:

{
  "tokenAddress": "string",
  "amount": "number",
  "walletPrivateKeys": ["string"],
  "slippage": "number (optional, default: 10)",
  "priorityFee": "number (optional)"
}

POST /api/tokens/sell

Sell tokens with specified parameters.

Request body:

{
  "tokenAddress": "string",
  "percentage": "number (1-100)",
  "walletPrivateKeys": ["string"],
  "slippage": "number (optional, default: 10)",
  "priorityFee": "number (optional)"
}

🚦 Rate Limiting

  • Max 2 bundles per second
  • 🔒 Automatic throttling when limits are exceeded

🔐 Security Notes

⚠️ Important:

  1. Never commit private keys to version control
  2. Keep your Fury Bot API key secret
  3. Run only in a secure network environment
  4. Enforce access control in production

🛠 Dependencies


🧑‍💻 Development

Run in Dev Mode

npm run dev

Run Tests

npm test

🤝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create a feature branch
  3. Implement your changes
  4. Add tests if relevant
  5. Open a pull request

📄 License

Licensed under the MIT License.


⚠️ Disclaimer

This software is for educational and development purposes only.
Use at your own risk and always test before real-world use.


💬 Support

For issues and questions, please open a GitHub Issue.