closeGridBot
Closes a running spot grid bot and settles remaining assets according to the chosen close mode (1-4).
Instructions
Closes a running spot grid bot. You must specify a close_mode to determine how remaining assets are settled:
1 (BIT_MODE): settle in BIT
2 (BASE_MODE): convert all to base token
3 (QUOTE_MODE): convert all to quote token
4 (BASE_AND_QUOTE_MODE): return assets as-is, no conversion
The bot must be in a closeable state (NEW or RUNNING). Bots in CANCELLING or COMPLETED state cannot be closed again.
Rate limit: 3 qps per UID.
Agent hint: Use close_mode=3 (QUOTE_MODE) if the user wants to cash out to stablecoin. Use close_mode=4 if the user wants to keep both tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid_id | Yes | ||
| close_mode | Yes |