summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorkboz <kutayboz@gmail.com>2026-04-24 00:55:26 +0200
committerkboz <kutayboz@gmail.com>2026-04-24 00:55:26 +0200
commite43c98997b0de6a8da989f68d97f1d4f7fb7bb6f (patch)
tree1b9c8073acdef60af2ca3e19ae0c4a1b2c55410f /readme.md
parentacbf6d6bd6d63ab0e9f7c4e119827f76e0382aac (diff)
downloadhaul-e43c98997b0de6a8da989f68d97f1d4f7fb7bb6f.tar.gz
feat(core): implement wallet trade tracking and sqlite market caching
- Transitioned primary ESI networking and dataset initialization to `asyncio` and `aiohttp` for non-blocking I/O. - Introduced `aiosqlite` utilizing an in-memory database to significantly speed up arbitrage querying. - Implemented character wallet tracking (added `esi-wallet.read_character_wallet.v1` scope) to automatically deduct filled market volumes internally instead of waiting for full region polling. - Exposed `/settings` endpoint allowing dynamic tweaking of threshold variables (cargo size, limits, tax rate, ship speeds) directly from the React UI. - Decoupled auto-waypoint submission during route planning; users now push routes selectively via a new "Set in Game" frontend action and `/set_waypoints` backend logic. - Optimized order evaluations and triplet generation limits through `LegMetrics` to lower CPU footprint drastically on large dataset passes. - Migrated React frontend completely to Server-Sent Events (SSE), cleanly ditching HTTP polling.
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md38
1 files changed, 19 insertions, 19 deletions
diff --git a/readme.md b/readme.md
index b145239..1daf57d 100644
--- a/readme.md
+++ b/readme.md
@@ -38,16 +38,17 @@ The project comprises:
### **Backend (Python)**
- **Framework**: FastAPI for high-performance API development.
-- **Asynchronous Processing**: `asyncio` for handling multiple concurrent API calls and tasks.
+- **Asynchronous Processing**: `asyncio` and `aiohttp` for handling multiple concurrent API calls and non-blocking tasks.
+- **Database**: In-memory SQLite (`aiosqlite`) for high-performance market order processing and indexing.
- **API Integration**:
- - Extensive use of the **EVE Swagger Interface (ESI)** API for fetching in-game data, such as trade orders, solar system details, and player locations.
-- **Automation**: Automatically sets waypoints in the EVE Online client through API interactions.
+ - Extensive use of the **EVE Swagger Interface (ESI)** API for fetching in-game data, such as trade orders, solar system details, player locations, and wallet transactions.
+- **Automation**: Set waypoints in the EVE Online client through API interactions on command.
- **Streaming Data**: Implements `StreamingResponse` to deliver real-time updates to the frontend.
### **Frontend (React)**
- **Framework**: React for building dynamic, responsive user interfaces.
-- **State Updates**: Use of both polling and server-side events to update state
+- **State Updates**: Real-time state updates using server-sent events (SSE).
### **Experimental Rust Backend**
- A rewrite of the Python backend focused on improving performance in API-intensive operations like route calculations
@@ -62,14 +63,14 @@ The project comprises:
- Travel time, warp speeds, and stargate connections.
- Risk factors, including security ratings of solar systems.
- Suggests optimized paths for asset transportation and trading.
- - Automatically sets waypoints in the EVE Online client, simplifying navigation for players.
+ - Allows pushing calculated routes as waypoints to the EVE Online client with a single click.
2. **Profit Optimization**
- Identifies arbitrage opportunities by analyzing buy/sell orders across regions.
- - Uses efficient filtering algorithms to recommend profitable trades.
+ - Tracks confirmed trades automatically via wallet transaction history to remove filled orders locally.
3. **Real-Time API Integration**
- - Fetches live trade orders, player locations, and solar system details using the EVE Swagger Interface (ESI) API.
+ - Fetches live trade orders, player locations, recent wallet transactions, and solar system details using the EVE Swagger Interface (ESI) API.
- Continuously updates routes and trade data in real-time.
- Utilizes server-sent events to deliver live updates on trade opportunities, routes, and player location changes.
@@ -78,30 +79,29 @@ The project comprises:
**Algorithm Criteria & Limits**
-------------------------------
-The route planning and arbitrage algorithms evaluate the profitability and safety of moving items using the following constraints:
+The route planning and arbitrage algorithms evaluate the profitability and safety of moving items using configurable constraints:
1. **Ship & Financial Limits**
- - **Cargo Capacity**: Hard limit of 600m³. Orders that don't fit are ignored.
- - **Maximum Route Capital**: Caps the up-front item purchase cost at 100,000,000 ISK when compounding multiple items in a route.
- - **Profit Threshold**: A single trade must yield a minimum gross profit of 100,000 ISK to be considered.
+ - **Cargo Capacity**: Default limit of 4000m³ (configurable).
+ - **Maximum Route Capital**: Caps the up-front item purchase cost at 20,000,000 ISK initially (configurable).
+ - **Profit Threshold**: A single trade must yield a minimum gross profit (default 100,000 ISK, configurable).
2. **Time & Navigational Costs**
- - **Ship Speed**: Calculations factor in `max_warp_speed = 8.22 AU/s` and `max_subwarp_speed = 216.5 m/s`.
+ - **Ship Speed**: Subject to specified `max_warp_speed` and `max_subwarp_speed` (configurable via UI).
- **Stargate Delay**: Each jump is assigned a fixed 9.0-second delay.
- **In-system Warp**: Calculates exact 3D geometry for acceleration and deceleration.
- - **Player Time Cost**: The algorithm assigns a real-life time value of ~4,166 ISK per second (`15_000_000 / 3600`) to punish overly long routes.
+ - **Player Time Cost**: The algorithm assigns a real-life configurable time value.
3. **Risk & Safety Penalties**
- **Gank Zones**: Hardcoded danger zones (e.g., Ahbazon) multiply the risk penalty heavily.
- **Security Status**: High-sec space carries virtually no penalty, low-sec applies a 0.005 penalty, and null-sec adds a massive 0.5 risk penalty.
- - **Value at Risk**: The calculated risk percentage is multiplied against a theoretical 60m ISK penalty + the 50m ship value + the cargo value.
+ - **Value at Risk**: The calculated risk percentage is multiplied against the fixed risk penalty plus cargo values.
4. **Trade Execution & Filtering Strategy**
- - **Market Tax**: Accounts for an 8% transaction tax on all trades automatically.
- - **Arbitrage Capital Limits**: Rejects individual items exceeding 20,000,000 ISK up-front capital during initial data processing but allows up to 100,000,000 ISK when compounding multiple items continuously.
- - **Same-Region Filtering**: Ensures that pickup and dropoff stations for a single item are within the same region.
- - **Evaluation Limit**: Limits pathfinding to the top 20,000 trades to conserve CPU overhead.
- - **Snipe Feature Execution**: Background polling monitors loop regions actively for single trades that boast >20,000,000 ISK gross profit. If triggered, it executes an automatic ESI API call to forcefully open your in-game client's market window to intercept the trade instantly.
+ - **Market Tax**: Accounts for a configurable transaction tax (default 8%).
+ - **Cross-Region Pairing**: Allows pickup and dropoff stations for a single item to be in different regions when both stations are present in the loaded market and navigation datasets.
+ - **Evaluation Limit**: Limits pathfinding to the top scoring trade triplets to conserve CPU overhead.
+ - **Snipe Feature Execution**: Background polling monitors loop regions actively for single trades that boast >20,000,000 ISK (configurable) gross profit. If triggered, it executes an automatic ESI API call to forcefully open your in-game client's market window to intercept the trade instantly.
- **ESI Error Limits**: Pauses backend routines entirely if the X-Esi-Error-Limit-Remain headers fall below 50.
- **The Final Metric**: The route chosen is the one that produces the highest `profit_rate` (which is `net_profit = total_profit - risk * capital` divided by `transport_time`).