Skip to content

Learn

Exchange APIs

Bybit API error 110028: open orders block a position mode switch

Figures on this page are as of 2026-09. Fees, limits and margin tiers change — check the venue's own docs.

Bybit V5 returns retCode: 110028 with the message “You have existing open orders, so the position mode cannot be switched.” You called POST /v5/position/switch-mode for a symbol that still has open orders. The fix: pause whatever places orders on that symbol, cancel its open orders, make sure there is no open position either, call switch-mode again — then change the positionIdx your order code sends.

This page is for anyone moving a USDT perpetual symbol between one-way and hedge mode through the API. It covers what the switch does, why open orders block it, how to clear them without a race, and what has to change in your order code afterwards.

Not to be confused with 10028. Five digits, not six: 10028 is “The API can only be accessed by unified account users.” — an account-type restriction on an endpoint, with nothing to do with position mode. Its mirror image is 100028, “The API cannot be accessed by unified account users.” If you landed here for either of those, the fix is about which account type the endpoint expects, and nothing below applies.

What this error actually means

Bybit has two position modes for derivatives:

  • One-way (the system default): one position per symbol.
  • Hedge: a long and a short on the same symbol at the same time.

POST /v5/position/switch-mode changes it. The mode parameter is 0 (“Merged Single”, one-way) or 3 (“Both Sides”, hedge), applied either to one symbol or to every symbol of a settle coin. When both exist, the priority is symbol setting > coin setting > system default.

The switch is refused while something on the symbol depends on the current mode. Bybit documents a small family of codes for this:

CodeMeaning (quoted text is Bybit’s wording)What to do
110028“You have existing open orders, so the position mode cannot be switched.”Cancel the symbol’s open orders
110024“You have an existing position, so the position mode cannot be switched.”Close the position first
110025“Position mode has not been modified.”Nothing — the symbol is already in that mode
110029Hedge mode not supported for the symbolKeep the symbol in one-way

Why open orders block it is our reading, not Bybit’s wording: every open order was placed with a positionIdx that only has meaning in the current mode. An order aimed at “the position” in one-way mode has no obvious target once the symbol has separate long and short positions, and the reverse.

The usual cause: something left an order on the symbol

Often it is not an order you remember placing:

  • Resting limit orders from your own strategy — take-profit ladders, grid levels, stale entries.
  • Orders from another process on the same account — a second bot, a manual order from the web or app, a copy of the script still running somewhere.
  • Protective orders you think of as settings. The error text says “open orders”; the docs we read do not spell out whether untriggered conditional or stop orders count. Include them when you look.

Sub-accounts isolate this. If a separate strategy should never interfere with yours, it belongs on a separate sub-account — see sub-accounts for automation.

Clearing it without a race

The failure mode is a strategy that re-places an order between your cancel and your switch. Do it in this order:

  1. Stop every process that places orders on the symbol. Not just the one running the switch.
  2. List the symbol’s open orders through the V5 order endpoints (or the web interface) and cancel each one. Check again afterwards; include conditional orders.
  3. Check for an open position. If there is one, the next error will be 110024. Closing a position is a trading decision with costs — make it deliberately, not as a side effect of a configuration change.
  4. Call switch-mode for the symbol. A 110025 here means it was already in the target mode.
  5. Update the order code (next section), then restart the strategy.

A coin-level switch behaves differently. Bybit documents that switching by coin skips symbols with positions or orders, and applies to newly listed symbols. In our reading, that means a coin-level call can leave some symbols in the old mode without failing for them. After any coin-level switch, verify the mode of each symbol you trade.

What changes after the switch: positionIdx

positionIdx tells Bybit which position an order belongs to:

positionIdxMeaning
0One-way mode
1Hedge mode, Buy side
2Hedge mode, Sell side

On create-order it is optional in general but required in hedge mode. Code written for one-way usually omits it or sends 0, and will not place orders correctly after a switch to hedge.

In our reading of the enum, positionIdx names the position, not the order’s direction. An order that reduces the long in hedge mode is a Sell with positionIdx: 1. Getting this backwards opens a short instead of closing the long — a good reason to test the switch on Bybit testnet first, and to use reduce-only orders where you mean “close”.

Leverage rules also depend on mode (POST /v5/position/set-leverage):

ModebuyLeverage vs sellLeverage
One-wayMust be equal
Hedge + isolated marginMay differ
Hedge + cross marginMust be equal

Under a Unified Trading Account the margin mode is account-wide, not per symbol, and Bybit’s help centre lists Portfolio margin as one-way only. Setting a leverage value that is already in place returns 110043, which is usually harmless.

How to confirm which one you have

  • 110028 — open orders. Cancel them, including other processes’ orders.
  • 110024 — an open position.
  • 110028 again after cancelling — something re-placed an order. Find the process; do not loop the cancel.
  • 10028 / 100028 — not a position-mode problem at all; account type.

Log the full retCode and compare it exactly. 110028 and 10028 differ by one digit and mean unrelated things, which is how they get mixed up when read at a glance.

FAQ

What does Bybit error 110028 mean?

It means you tried to switch a symbol between one-way and hedge mode with POST /v5/position/switch-mode while the symbol still had open orders. Bybit documents it as “You have existing open orders, so the position mode cannot be switched.” Cancel the symbol’s open orders, confirm there is no open position, and switch again.

Is Bybit error 110028 the same as 10028?

No. 110028 is a position-mode error caused by open orders. 10028 is “The API can only be accessed by unified account users.” — an account-type restriction on an endpoint. The codes differ by one digit, so log and compare the full code rather than the message.

Do I also need to close my position to switch position mode?

Yes. An open position on the symbol blocks the switch with a sibling code, 110024: “You have an existing position, so the position mode cannot be switched.” Closing a position has costs and risk consequences, so treat it as a separate, deliberate decision rather than part of a configuration script.

What positionIdx should I send after switching to hedge mode?

In hedge mode positionIdx is required: 1 for the Buy-side position and 2 for the Sell-side position. In one-way mode it is 0. It identifies which position the order acts on rather than the order’s direction — our reading of the enum — so an order closing a hedge-mode long is a Sell with positionIdx 1. Test this on testnet before relying on it.