For funding rate arbitrage, set take-profit and stop-loss orders for both spot and futures positions. Otherwise, getting hit by ADL can wipe you out. Live and learn.
This is such a fucking rip-off. I just wanted to collect a funding fee, and within a minute it dumped hard and liquidated me. I didn't have time to close my spot position. This was my first time trying arbitrage, and it went this badly. I finally made back my losses this month, too.