Contents
admin_panel
Django admin panel backend
bin
stack.py - used to run a matching engine for a pair.
Examples:
python stack.py
– launches the order book for all the pairs. Such a command is used on a test environment and launches all order books in one container.
python stack.py –pairs=BTC-USDT
– launches the order book for the BTC-USDT pair. This command is used in production. Each pair has a separate container.
bots
All about bots
- exchanges/ - classes with a single interface for working with exchanges via API (placement of orders, balances, etc.)
- bot.py – the main logic of the bots and strategies. Launches the bot according to the settings (BotConfig).
- cache.py – caches used in bots
- models.py – models used by bots
- BotConfig – bot settings
- LiquidityStat
- LiquidityMatch
- OrderMatch
- OrderMatchStat
- structs.py - Data structures used in bot logic
- tasks.py – Celery tasks:
- check_bot – Runs botconfig
- check_bots – Checks all botconfigs to see if they are ready to run. Calls check_bot task
- calculate_liquidity_stats – performs daily calculation of liquidity statistics
core
The core of the system. Contains all the necessary minimum for the operation of the exchange
- api_urls/ - Internal API endpoints categorized