2.6 Extending the Engine
The repo is intentionally small and hackable. Adding a DEX or extending logic is straightforward.
2.6.1 Adding a New DEX
Steps:
Add API endpoint to
dex_configs.Implement price fetching method for that DEX:
Query the API.
Parse the response into the normalized internal format.
Update price combination logic so this DEX participates in spread calculations.
Result: the new DEX becomes another venue in the cross-venue comparison.
2.6.2 Customizing Scoring/Filters
If you want more complex logic than a flat percentage threshold:
Modify the profit calculation to account for:
Your own fee structure.
Custom slippage models.
Capital constraints (e.g. how much size you realistically push).
Add new filters such as:
Drop routes with too low liquidity.
Drop venues with historically bad fill quality.
You can then upstream interesting improvements via PR if you want.
Last updated

