TradeP is a high-performance, backend-only trading engine built with Node.js, Express.js, and PostgreSQL (via Supabase). It features real-time order matching, market data processing, and caching using Redis (Upstash) and MQTT for real-time communication.
- User Management (Registration, Authentication, Balance Management)
- Order Matching Engine (Buy/Sell Order Processing)
- Real-Time Market Data Feed (Using MQTT & External API)
- Trade Execution & Transaction Logging
- Database: PostgreSQL (Supabase)
- Caching & Queues: Redis (Upstash)
- Real-time Communication: MQTT
- High Performance & Scalability
git clone https://github.com/yourusername/ptrade.git
cd ptradenpm installCreate a .env file in the root directory and configure it:
PORT=3000
DATABASE_URL=your_supabase_postgresql_url
REDIS_URL=your_upstash_redis_url
MQTT_BROKER_URL=mqtt://broker.hivemq.comnpm start| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register | Register a new user |
| POST | /api/login | Authenticate user |
| GET | /api/balance | Get user balance |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/order | Place a new buy/sell order |
| GET | /api/orders | View open orders |
| GET | /api/transactions | View executed transactions |
- Fork the project
- Create a new feature branch (
git checkout -b feature-name) - Commit changes (
git commit -m 'Added new feature') - Push to branch (
git push origin feature-name) - Open a Pull Request 🚀