Strategy Engine
The HyperETH Strategy Engine allows traders to submit high-level trading logic that executes server-side, in close proximity to exchanges.Why Use the Strategy Engine?
Trading is extremely latency-sensitive—millisecond differences can mean the difference between capturing an arbitrage opportunity or missing it entirely. Core Advantages:- Low Latency: Strategies execute server-side, eliminating network round-trip delays between your client and the exchanges
- Atomic Execution: The server guarantees atomicity and consistency of multi-leg strategy execution
- High Expressiveness: Supports complex trigger conditions, dependencies, and execution logic
How It Works
- Submit: Client submits a strategy with trading parameters
- Execute: Server executes the strategy legs according to triggers and conditions
- Monitor: Client can query status at any time
- Complete: Strategy completes (or fails) and client is notified
Product Roadmap
Phase 1 (Current): Preset Strategies
Provides simplified APIs for common trading patterns:- Maker-Taker Arbitrage: Place a maker order on one exchange, trigger a taker order on another when conditions are met
Phase 2 (Future): Custom Strategies
Opens up advanced engine capabilities, allowing users to define customStrategyConfig for flexible, customized trading strategies with:
- Multiple legs with complex dependencies
- Custom trigger conditions
- Advanced risk controls
Core Concepts
Strategy
A strategy is a complete trading plan consisting of one or more legs with defined execution rules.Leg
A leg represents a single order or set of orders. Each leg has:- Order Parameters: Symbol, side, price, amount, etc.
- Triggers: Conditions that must be met before the leg executes
- Distribution: Which exchange and account to use
Trigger
Triggers define when a leg should execute:| Trigger Type | Description |
|---|---|
immediate | Execute immediately |
order_status | Wait for another leg’s order to reach a status (e.g., “placed”) |
price_spread | Wait for price spread between exchanges to meet threshold |
order_book_depth | Wait for sufficient order book depth |
Dependencies
Dependencies define the execution order between legs:- Sequential: Leg B waits for Leg A to complete before starting
Available Strategies
API Endpoints
All strategy endpoints use the Cross-DEX Aggregation server: Base URL:https://api.hypereth.io/v2/all
| Endpoint | Method | Description |
|---|---|---|
/strategy/submit/maker-taker-arbitrage | POST | Submit a maker-taker arbitrage strategy |
/strategy/status/maker-taker-arbitrage/{strategyId} | GET | Get strategy execution status |
/strategy/balances | GET | Query account balances for strategy planning |
Authentication
All strategy endpoints require API key authentication via theX-API-KEY header.