Skip to content
Sign In

Learning / Syntax / reset-oco

reset-oco - Reset OCO Monitoring

Utility

Stop OCO monitoring for active groups without cancelling orders on the exchange.

What is reset-oco?

reset-oco stops Flipr.Cloud's internal OCO monitoring system for active groups. It does NOT cancel any orders on the exchange - orders remain active. It only stops the automatic cancellation logic that OCO groups provide.

Common Use Cases:

  • Orphaned Monitoring

    You cancelled orders manually on the exchange, but Flipr.Cloud is still monitoring them

  • Strategy Change

    You're switching strategies and want to stop all OCO monitoring

  • Debugging / Troubleshooting

    Clean up OCO state when something isn't working correctly

  • Fresh Start

    Reset everything before setting up new OCO groups

Syntax

Smart Syntax
reset-oco [scope]
// scope is optional, defaults to 'this'

Parameters

scopeOptional

Type: keyword | Default: this

Determines which OCO monitoring groups to reset:

ValueWhat Gets Reset
this / symbol / pairReset OCO monitoring for current symbol only (e.g., BTCUSDT)
api / key / allReset ALL OCO monitoring for entire API key (all symbols)

Real-World Examples

1. Reset OCO for Current Symbol

Stop OCO monitoring for BTCUSDT only, without affecting other symbols.

Smart Syntax
BTCUSDT on Binance_F
// Stop OCO monitoring for BTCUSDT
reset-oco this
// Or simply (defaults to 'this')
reset-oco

Orders on BTCUSDT remain active on the exchange. Only OCO monitoring stops.

2. Reset All OCO Monitoring for Entire API Key

Stop ALL OCO monitoring across all symbols for this API key (e.g., BTCUSDT, ETHUSDT, SOLUSDT...).

Smart Syntax
BTCUSDT on Binance_F
// Reset OCO monitoring for entire Binance_F key
reset-oco api
// Alternative keywords
reset-oco key
reset-oco all

Useful when you want to completely reset OCO state for all trading pairs on this exchange.

3. Scenario: Orders Cancelled Manually on Exchange

You manually cancelled orders on Binance, but Flipr.Cloud is still monitoring them as OCO groups.

Smart Syntax
ETHUSDT on Binance_F
// Orders were cancelled manually on exchange
// Now stop Flipr.Cloud's OCO monitoring for them
reset-oco this
// OCO monitoring cleaned up
// Ready to create new OCO groups

This cleans up "orphaned" OCO monitoring that no longer has corresponding orders.

4. Scenario: Complete Strategy Reset

Cancel all orders AND reset all OCO monitoring before starting a new strategy.

Smart Syntax
BTCUSDT on Binance_F
// Step 1: Cancel all orders on exchange
cancel all
// Step 2: Reset OCO monitoring
reset-oco this
// Step 3: Close position
pos 0
// Now start fresh with new strategy
market long 0.01
stoploss off 2%
takeprofit off 5%
smart-oco sell

Complete reset workflow: cancel orders, reset monitoring, close position, then start fresh.

5. Scenario: Debugging OCO Issues

OCO groups aren't behaving correctly. Reset everything and rebuild from scratch.

Smart Syntax
SOLUSDT on BloFin
// Something's wrong with OCO monitoring
// Step 1: Cancel all orders
cancel all
// Step 2: Reset ALL OCO monitoring on this API key
reset-oco api
// Step 3: Verify with oco status command
oco status
// Step 4: Rebuild OCO groups from scratch

Nuclear option for troubleshooting: reset everything and start over.

When to Use reset-oco

  • Orphaned Monitoring: You cancelled orders manually on exchange (via web UI or API), but Flipr.Cloud still thinks they're active

  • Strategy Change: You're switching to a new strategy and want to stop all existing OCO monitoring

  • Debugging: OCO groups aren't working correctly and you want to clean up state

  • Fresh Start: You want a completely clean slate before creating new OCO groups

Best Practices

  • Cancel orders first: Use cancel all before reset-oco if you want to remove orders

  • Use 'this' scope: Reset only current symbol unless you need to clean up entire API key

  • Verify after reset: Check oco status or logs to confirm monitoring stopped

  • Use for troubleshooting: When OCO behavior is unexpected, try resetting and recreating groups

  • Not a regular command: This is a utility/debugging tool, not for normal trading workflows

Common Patterns

Complete Reset

Smart Syntax
cancel all
reset-oco this
pos 0

Cancel orders, reset monitoring, close position


Clean Up Orphaned Monitoring

Smart Syntax
// Orders already cancelled manually on exchange
reset-oco this

Stop monitoring for orders that no longer exist


Nuclear Reset (All Symbols)

Smart Syntax
// Reset OCO for ALL symbols on this API key
reset-oco api

Complete OCO monitoring reset across entire exchange


Debugging Workflow

Smart Syntax
cancel all
reset-oco api
oco status
// Verify monitoring is cleared

Troubleshooting: clear everything and verify

Related Commands

oco

- Create standard OCO groups with manual configuration

smart-oco

- Monitor existing orders against position conditions

cancel / rem

- Cancel orders on the exchange (use before reset-oco)

oco status

- View active OCO groups (verify after reset)