Enhance Crypto Trading Algorithm

Job ID: 40166481

Budget: $15 – $25 USD

I already have a Python-based core connected to several exchange APIs and a Next.js dashboard that streams live price data. Now I’m ready to push the project forward by adding three growth areas: reliable market-order execution, richer risk controls, and new automated strategies.

1. Market-order execution
At the moment the code only simulates fills. Your first task is to add real market-order endpoints (Binance, Bybit and OKX are already authorised) into the trade engine, confirm signature logic, and return unified fill objects to the database and UI.

2. Advanced trade execution options
The focus is on arbitrage opportunities driven by funding-rate analysis. I’ve sketched the detection logic; you’ll develop the orchestration layer that scores spreads, allocates size, and routes market orders to both legs while meeting exchange-specific rate limits.

3. Enhanced risk management tools
I need a configurable trigger-level module that watches PnL, drawdown and exposure in real time and can automatically flatten positions or throttle order size when thresholds fire. This must update the dashboard instantly through our existing websocket channel.

4. Automated trading strategies
Once the above pieces are stable, we’ll add strategy wrappers so new signal generators can be plugged in with minimal boilerplate. Clean architecture and docstrings are important so the rest of the team can extend the bot later.

Tech stack & expectations
• Python 3.11 (FastAPI + async)
• Next.js (13) front-end – you only need to expose new endpoints and JSON shapes
• PostgreSQL & Redis for state
• GitHub Actions for CI; all contributions should include tests that hit the staging sandbox of each exchange.

Deliverables (acceptance criteria)
• Executable market-order endpoint hitting at least two exchanges with unit & integration tests
• Arbitrage executor achieving configurable spread threshold and logging funding-rate metrics
• Real-time risk trigger module that can be toggled per exchange and writes events to Redis pub/sub
• Updated README with setup, env vars and example calls

If you have deep experience with exchange REST/WebSocket APIs, async Python patterns, and risk-aware trading logic, this should feel familiar.
Kindly share examples of previous projects you have worked on in the same realm.
Let’s make the bot production-ready.