unicex 0.13.10__py3-none-any.whl → 0.13.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
unicex/binance/client.py CHANGED
@@ -491,42 +491,69 @@ class Client(BaseClient):
491
491
  self,
492
492
  symbol: str,
493
493
  side: str,
494
- quantity: float,
495
- price: float,
496
- stop_price: float,
497
- stop_limit_price: float | None = None,
494
+ quantity: str,
498
495
  list_client_order_id: str | None = None,
499
- limit_client_order_id: str | None = None,
500
- stop_client_order_id: str | None = None,
501
- stop_limit_time_in_force: str | None = None,
496
+ # ABOVE ORDER
497
+ above_type: str = "TAKE_PROFIT_LIMIT",
498
+ above_client_order_id: str | None = None,
499
+ above_price: str | None = None,
500
+ above_stop_price: str | None = None,
501
+ above_trailing_delta: int | None = None,
502
+ above_time_in_force: str | None = None,
503
+ above_iceberg_qty: str | None = None,
504
+ above_strategy_id: int | None = None,
505
+ above_strategy_type: int | None = None,
506
+ # BELOW ORDER
507
+ below_type: str = "STOP_LOSS_LIMIT",
508
+ below_client_order_id: str | None = None,
509
+ below_price: str | None = None,
510
+ below_stop_price: str | None = None,
511
+ below_trailing_delta: int | None = None,
512
+ below_time_in_force: str | None = None,
513
+ below_iceberg_qty: str | None = None,
514
+ below_strategy_id: int | None = None,
515
+ below_strategy_type: int | None = None,
516
+ # EXTRA
502
517
  new_order_resp_type: str | None = None,
503
518
  self_trade_prevention_mode: str | None = None,
504
- limit_iceberg_qty: float | None = None,
505
- stop_iceberg_qty: float | None = None,
506
519
  ) -> dict:
507
- """Создание OCO ордера.
520
+ """Создание OCO ордера (новая версия).
508
521
 
509
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/spot-trading-endpoints#new-oco-trade
522
+ https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade
510
523
  """
511
- url = self._BASE_SPOT_URL + "/api/v3/order/oco"
524
+ url = self._BASE_SPOT_URL + "/api/v3/orderList/oco"
525
+
512
526
  data = {
513
527
  "symbol": symbol,
514
528
  "side": side,
515
529
  "quantity": quantity,
516
- "price": price,
517
- "stopPrice": stop_price,
518
- "stopLimitPrice": stop_limit_price,
519
530
  "listClientOrderId": list_client_order_id,
520
- "limitClientOrderId": limit_client_order_id,
521
- "stopClientOrderId": stop_client_order_id,
522
- "stopLimitTimeInForce": stop_limit_time_in_force,
531
+ # ABOVE
532
+ "aboveType": above_type,
533
+ "aboveClientOrderId": above_client_order_id,
534
+ "abovePrice": above_price,
535
+ "aboveStopPrice": above_stop_price,
536
+ "aboveTrailingDelta": above_trailing_delta,
537
+ "aboveTimeInForce": above_time_in_force,
538
+ "aboveIcebergQty": above_iceberg_qty,
539
+ "aboveStrategyId": above_strategy_id,
540
+ "aboveStrategyType": above_strategy_type,
541
+ # BELOW
542
+ "belowType": below_type,
543
+ "belowClientOrderId": below_client_order_id,
544
+ "belowPrice": below_price,
545
+ "belowStopPrice": below_stop_price,
546
+ "belowTrailingDelta": below_trailing_delta,
547
+ "belowTimeInForce": below_time_in_force,
548
+ "belowIcebergQty": below_iceberg_qty,
549
+ "belowStrategyId": below_strategy_id,
550
+ "belowStrategyType": below_strategy_type,
551
+ # EXTRA
523
552
  "newOrderRespType": new_order_resp_type,
524
553
  "selfTradePreventionMode": self_trade_prevention_mode,
525
- "limitIcebergQty": limit_iceberg_qty,
526
- "stopIcebergQty": stop_iceberg_qty,
527
554
  }
528
555
 
529
- return await self._make_request("POST", url, True, data=data)
556
+ return await self._make_request("POST", url, True, params=data)
530
557
 
531
558
  async def oco_order_cancel(
532
559
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unicex
3
- Version: 0.13.10
3
+ Version: 0.13.11
4
4
  Summary: Unified Crypto Exchange API
5
5
  Author-email: LoveBloodAndDiamonds <ayazshakirzyanov27@gmail.com>
6
6
  License: BSD 3-Clause License
@@ -14,7 +14,7 @@ unicex/_base/client.py,sha256=asIIQLZlRwwmUDvxveSv7aCvth54iiSRJdz19bxGorI,8904
14
14
  unicex/_base/websocket.py,sha256=haSV3dSgkT352n8knpLm_iI4ZlUGWWKFCB3k5Ua2esU,12542
15
15
  unicex/binance/__init__.py,sha256=sDk4ZjakRdpFMaMSpOCfqjf6ZPfAS9tlrt4WlDHtDkw,932
16
16
  unicex/binance/adapter.py,sha256=JbUFyjnDAFtyuYYrh90YeOvQOZQ6faim0nWS6U0NxXw,8799
17
- unicex/binance/client.py,sha256=MBTqIghKbSCr0DZ0aL_XZPyrIhLV3fMHERB7mbIk2Ks,61410
17
+ unicex/binance/client.py,sha256=Yz1XgcdHh7AfKIGLwClRxSbveJRZ82p9qi--cHalzws,62565
18
18
  unicex/binance/exchange_info.py,sha256=LNDkgBC5HB3JxtIBi39puqDg6LIVWqIWjT-6akDxtMs,2437
19
19
  unicex/binance/uni_client.py,sha256=W4yxiU0kkJKPJjimhv4KAWreuEBwt7GgrWXefcw5BEA,8365
20
20
  unicex/binance/uni_websocket_manager.py,sha256=HYHs6PYOTxBqN31AuOzbzs6o4oLBsZPMccqbjJiMu_4,8696
@@ -86,8 +86,8 @@ unicex/okx/uni_client.py,sha256=E_Wod0JSGt1K6k1mAIWnOv350pELbv-nic7g1KgOuos,8694
86
86
  unicex/okx/uni_websocket_manager.py,sha256=b4f_QjA64DJmENQdIGb5IOVc7kvit7KMCdWeCmRbxGY,9326
87
87
  unicex/okx/user_websocket.py,sha256=8c9kpm-xVa729pW93OKUGLHaE9MY0uzEpjIgNIFRF80,126
88
88
  unicex/okx/websocket_manager.py,sha256=wROXTUDqKzOE-wDnCtXso_MC4SzfPuPols5aPg_Z3y4,26027
89
- unicex-0.13.10.dist-info/licenses/LICENSE,sha256=lNNK4Vqak9cXm6qVJLhbqS7iR_BMj6k7fd7XQ6l1k54,1507
90
- unicex-0.13.10.dist-info/METADATA,sha256=BJmp2kdi-Jf54wKGBjPxov_LPmkryBjm7LT8rCj7NkY,11753
91
- unicex-0.13.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
92
- unicex-0.13.10.dist-info/top_level.txt,sha256=_7rar-0OENIg4KRy6cgjWiebFYAJhjKEcMggAocGWG4,7
93
- unicex-0.13.10.dist-info/RECORD,,
89
+ unicex-0.13.11.dist-info/licenses/LICENSE,sha256=lNNK4Vqak9cXm6qVJLhbqS7iR_BMj6k7fd7XQ6l1k54,1507
90
+ unicex-0.13.11.dist-info/METADATA,sha256=Qj324r8nIh6ZlcVXw3nVN2Ad4AiMm03NujNZN7eUKzk,11753
91
+ unicex-0.13.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
92
+ unicex-0.13.11.dist-info/top_level.txt,sha256=_7rar-0OENIg4KRy6cgjWiebFYAJhjKEcMggAocGWG4,7
93
+ unicex-0.13.11.dist-info/RECORD,,