Bitget Futures icon

Bitget Futures

Bitget Futures Trading Node

Flash Close All

AI-generated

Summary

Verb‑first description of the operation.

Inputs

  • environmentOverride — Selects which credential set to use (credential, live, or demo).
  • productType — Futures market type: USDT-FUTURES, COIN-FUTURES, or USDC-FUTURES.
  • marginCoin — Coin used for margin, typically USDT.
  • symbol — Optional trading pair symbol to close positions for; empty closes all symbols.
  • holdSide — Filter positions by side: '' (both), 'long', or 'short'.

Output shape

An object summarizing the flash‑close‑all result, containing environment, productType, symbol, timestamp, cancelAllOrders, cancelTpslOrders, and flashClosePositions fields.

cancelAllOrders holds the API response or {error: …}; cancelTpslOrders is an array of symbols to cancel TP/SL; flashClosePositions contains the API response for closing positions; the shape is emitted as the json field of each workflow item.

Examples

Example 1: Close all USDT‑M perpetual positions on live account for symbol BTC

environment=live&productType=USDT-FUTURES&marginCoin=USDT&symbol=BTC&holdSide=

Example 2: Demo run to close all open positions across all symbols

environment=demo&productType=USDT-FUTURES&marginCoin=USDT&symbol=&holdSide=

Example 3: Close only long positions on COIN‑M market

environment=credential&productType=COIN-FUTURES&marginCoin=BTC&symbol=&holdSide=long

Links

Discussion