Skip to content

Commit 5997cc5

Browse files
committed
Fix market order type enum parsing for Bybit
1 parent 17d1675 commit 5997cc5

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

RELEASES.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Released on 28th March 2025 (UTC).
4848
- Fixed `OrderStatusReport` for conditional orders of dYdX (#2467), thanks @davidsblom
4949
- Fixed submitting stop market orders for dYdX (#2471), thanks @davidsblom
5050
- Fixed retrying HTTP calls on `DecodeError` for dYdX (#2472), thanks @davidsblom
51-
- Fixed `LIMIT_IF_TOUCHED` enum parsing order type mappings for Bybit
51+
- Fixed `LIMIT_IF_TOUCHED` order type enum parsing for Bybit
52+
- Fixed `MARKET` order type enum parsing for Bybit
5253
- Fixed quote ticks for Polymarket to only emit new quote ticks when the top-of-book changes
5354
- Fixed error on cancel order for IB (#2475), thanks @FGU1
5455

nautilus_trader/adapters/bybit/common/enums.py

+24
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,30 @@ def __init__(self) -> None:
297297
BybitOrderSide.SELL,
298298
BybitTriggerDirection.NONE,
299299
): OrderType.MARKET,
300+
(
301+
BybitOrderType.MARKET,
302+
BybitStopOrderType.UNKNOWN,
303+
BybitOrderSide.BUY,
304+
BybitTriggerDirection.FALLS_TO,
305+
): OrderType.MARKET,
306+
(
307+
BybitOrderType.MARKET,
308+
BybitStopOrderType.UNKNOWN,
309+
BybitOrderSide.BUY,
310+
BybitTriggerDirection.RISES_TO,
311+
): OrderType.MARKET,
312+
(
313+
BybitOrderType.MARKET,
314+
BybitStopOrderType.UNKNOWN,
315+
BybitOrderSide.SELL,
316+
BybitTriggerDirection.FALLS_TO,
317+
): OrderType.MARKET,
318+
(
319+
BybitOrderType.MARKET,
320+
BybitStopOrderType.UNKNOWN,
321+
BybitOrderSide.SELL,
322+
BybitTriggerDirection.RISES_TO,
323+
): OrderType.MARKET,
300324
(
301325
BybitOrderType.LIMIT,
302326
BybitStopOrderType.NONE,

0 commit comments

Comments
 (0)