fullPartialPositionTPSLSwitch method

Future<Map<String, dynamic>?> fullPartialPositionTPSLSwitch({
  1. required String symbol,
  2. required String tpSlMode,
})

Full/Partial Position TP/SL Switch : Switch mode between Full or Partial https://bybit-exchange.github.io/docs/inverse/#t-switchmode

Implementation

Future<Map<String, dynamic>?> fullPartialPositionTPSLSwitch(
    {required String symbol, required String tpSlMode}) async {
  log.d('ByBitRest.crossIsolatedMarginSwitch');
  var parameters = <String, dynamic>{};
  parameters['symbol'] = symbol;
  parameters['tp_sl_mode'] = tpSlMode;
  return await request(
    path: '/v2/private/tpsl/switch-mode',
    type: 'POST',
    parameters: parameters,
    withAuthentication: true,
  );
}