Bot Configuration¶
The QuantFin Bot allows you to customize its behavior for each trading symbol using the web interface. You can adjust settings like grid levels, take-profit distance, and dynamic distribution in the Update Config panel.
Accessing the Configuration¶
- Visit the Frontend: Open quantfin.dexalgo.org and connect your wallet.
- Select a Symbol: In the Trading Symbols panel, click on a symbol card (e.g.,
SUI-PERP
) to select it. Alternatively, choose the symbol from the Trading Symbol dropdown in the sidebar and click Apply. - Open Update Config: Scroll to the Update Config panel on the dashboard. This panel shows tabs for different configuration categories: General, Grid Settings, Dynamic Distribution, and Intervals.
Configuration Categories¶
The Update Config panel is divided into tabs to organize the settings:
General Tab¶
- Mode: Choose the trading direction:
both
: Places both buy and sell orders.longonly
: Only places buy orders.shortonly
: Only places sell orders.- Order Quantity: Set the quantity per grid order (e.g.,
1
). - TP Distance: Set the take-profit distance as a percentage (e.g.,
0.0055
= 0.55%). - Chase Offset (BPS): Adjust the chase entry offset in basis points (e.g.,
0.5
= 0.05%). - Price Decimals: This is auto-calculated based on the symbol’s tick size and cannot be edited.
Grid Settings Tab¶
- Grid Levels: Number of buy/sell levels in the grid (e.g.,
8
). - Level Step: Percentage distance between grid levels (e.g.,
0.01
= 1%). - First Entry Offset: Offset for the first grid order (e.g.,
0.000001
). - No Position Timeout (seconds): Time before recentering the grid if no position is held (e.g.,
140
).
Dynamic Distribution Tab¶
- Enable Dynamic Distribution: Check this box to enable dynamic order sizing based on wallet exposure.
- Always Full Grid (The 'Chad' grid): Check this to always place a full grid, ignoring the current position.
- Wallet Exposure Limit (Long): Maximum long exposure as a fraction of equity (e.g.,
0.5
= 50%). - Wallet Exposure Limit (Short): Maximum short exposure (e.g.,
0.4
= 40%). - Distribution Strength: Controls the distribution curve (e.g.,
1.2
). - Distribution Levels: Number of levels for dynamic distribution (e.g.,
8
). - Quantity Precision: Precision for order quantities (e.g.,
0.001
).
Intervals Tab¶
- HF Refresh Interval (minutes): High-frequency grid refresh interval (e.g.,
3600
). Set to0
to disable. - TP Refresh Interval (minutes): Take-profit refresh interval (e.g.,
5
). - General Refresh Interval (seconds): General refresh interval for the bot (e.g.,
5
).
Updating the Configuration¶
- Edit Settings: Adjust the values in the Update Config panel as needed. For example, change Grid Levels to
10
or enable Dynamic Distribution. - Apply Changes:
- Click the Update Config button at the bottom of the panel.
- This calls the
/update_config
endpoint, applying your changes to the selected symbol. - You’ll see a confirmation message like "Configuration updated successfully."
- Verify Changes:
- Check the Current Config panel above to see the updated configuration in JSON format.
- In the Bot Status panel, ensure the bot reflects the changes (e.g., Dynamic Dist badge updates if you enabled dynamic distribution).
Tip
If the bot is running, stop it first (sidebar > Stop Bot) before making significant changes, then restart it (sidebar > Start Bot) to apply the new settings.
Viewing the Current Configuration¶
- The Current Config panel displays the active configuration for the selected symbol in JSON format.
- This is updated automatically after you apply changes or when the dashboard refreshes (default: every 1 minute).
Next Steps¶
- Presets: Use predefined configurations for quick setup via the Preset Config dropdown.
- API Endpoints: Learn about the backend API endpoints called by the frontend (for advanced users).
- Features: Explore the bot’s features that these settings control.