hyperquant 0.99__py3-none-any.whl → 1.0__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.
    
        hyperquant/broker/bitmart.py
    CHANGED
    
    | 
         @@ -334,7 +334,7 @@ class Bitmart: 
     | 
|
| 
       334 
334 
     | 
    
         
             
                    *,
         
     | 
| 
       335 
335 
     | 
    
         
             
                    category: Literal[1,2,"limit","market"] = "limit",
         
     | 
| 
       336 
336 
     | 
    
         
             
                    price: float,
         
     | 
| 
       337 
     | 
    
         
            -
                    qty: float,
         
     | 
| 
      
 337 
     | 
    
         
            +
                    qty: Optional[float] = None,
         
     | 
| 
       338 
338 
     | 
    
         
             
                    qty_contract: Optional[int] = None,
         
     | 
| 
       339 
339 
     | 
    
         
             
                    side: Literal[1, 2, 3, 4, "open_long", "close_short", "close_long", "open_short", "buy", "sell"] = "open_long",
         
     | 
| 
       340 
340 
     | 
    
         
             
                    mode: Literal[1, 2, 3, 4, "gtc", "ioc", "fok", "maker_only", "maker-only", "post_only"] = "gtc",
         
     | 
| 
         @@ -348,6 +348,8 @@ class Bitmart: 
     | 
|
| 
       348 
348 
     | 
    
         
             
                    """Submit an order via ``submitOrder``.
         
     | 
| 
       349 
349 
     | 
    
         
             
                    返回值: order_id (int)
         
     | 
| 
       350 
350 
     | 
    
         
             
                    """
         
     | 
| 
      
 351 
     | 
    
         
            +
                    if qty is None and qty_contract is None:
         
     | 
| 
      
 352 
     | 
    
         
            +
                        raise ValueError("Either qty or qty_contract must be provided.")
         
     | 
| 
       351 
353 
     | 
    
         | 
| 
       352 
354 
     | 
    
         
             
                    contract_id = self.get_contract_id(symbol)
         
     | 
| 
       353 
355 
     | 
    
         
             
                    if contract_id is None:
         
     | 
| 
         @@ -361,8 +363,7 @@ class Bitmart: 
     | 
|
| 
       361 
363 
     | 
    
         
             
                    if detail is None:
         
     | 
| 
       362 
364 
     | 
    
         
             
                        raise ValueError(f"Market metadata unavailable for symbol: {symbol}")
         
     | 
| 
       363 
365 
     | 
    
         | 
| 
       364 
     | 
    
         
            -
             
     | 
| 
       365 
     | 
    
         
            -
                    if qty_contract is not None:
         
     | 
| 
      
 366 
     | 
    
         
            +
                    if qty_contract is None:
         
     | 
| 
       366 
367 
     | 
    
         | 
| 
       367 
368 
     | 
    
         
             
                        contract_size_str = detail.get("contract_size") or detail.get("vol_unit") or "1"
         
     | 
| 
       368 
369 
     | 
    
         
             
                        try:
         
     | 
| 
         @@ -378,11 +379,7 @@ class Bitmart: 
     | 
|
| 
       378 
379 
     | 
    
         
             
                            raise ValueError(
         
     | 
| 
       379 
380 
     | 
    
         
             
                                f"Volume too small for contract size ({contract_size_val}): volume={qty}"
         
     | 
| 
       380 
381 
     | 
    
         
             
                            )
         
     | 
| 
       381 
     | 
    
         
            -
             
     | 
| 
       382 
     | 
    
         
            -
                            raise ValueError(
         
     | 
| 
       383 
     | 
    
         
            -
                                f"Volume must be a multiple of contract_size ({contract_size_val}). "
         
     | 
| 
       384 
     | 
    
         
            -
                                f"Received volume={qty} -> {contracts_float} contracts."
         
     | 
| 
       385 
     | 
    
         
            -
                            )
         
     | 
| 
      
 382 
     | 
    
         
            +
             
     | 
| 
       386 
383 
     | 
    
         
             
                    else:
         
     | 
| 
       387 
384 
     | 
    
         
             
                        contracts_int = int(qty)
         
     | 
| 
       388 
385 
     | 
    
         
             
                        if contracts_int <= 0:
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.4
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: hyperquant
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 0 
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 1.0
         
     | 
| 
       4 
4 
     | 
    
         
             
            Summary: A minimal yet hyper-efficient backtesting framework for quantitative trading
         
     | 
| 
       5 
5 
     | 
    
         
             
            Project-URL: Homepage, https://github.com/yourusername/hyperquant
         
     | 
| 
       6 
6 
     | 
    
         
             
            Project-URL: Issues, https://github.com/yourusername/hyperquant/issues
         
     | 
| 
         @@ -6,7 +6,7 @@ hyperquant/logkit.py,sha256=nUo7nx5eONvK39GOhWwS41zNRL756P2J7-5xGzwXnTY,8462 
     | 
|
| 
       6 
6 
     | 
    
         
             
            hyperquant/notikit.py,sha256=x5yAZ_tAvLQRXcRbcg-VabCaN45LUhvlTZnUqkIqfAA,3596
         
     | 
| 
       7 
7 
     | 
    
         
             
            hyperquant/broker/auth.py,sha256=C8B5-x8Qcaeafm4ZwPCVFR7GRURmHC3CE4_vdg00Qgw,12139
         
     | 
| 
       8 
8 
     | 
    
         
             
            hyperquant/broker/bitget.py,sha256=X_S0LKZ7FZAEb6oEMr1vdGP1fondzK74BhmNTpRDSEA,9488
         
     | 
| 
       9 
     | 
    
         
            -
            hyperquant/broker/bitmart.py,sha256= 
     | 
| 
      
 9 
     | 
    
         
            +
            hyperquant/broker/bitmart.py,sha256=MF-bdVmZiFtTM0rLqAQnZP9Emo3vo48gPrX4_ligRmw,17568
         
     | 
| 
       10 
10 
     | 
    
         
             
            hyperquant/broker/coinup.py,sha256=eOr8BTRXiTb5tCU2FDmvBdXXgqiwVmCbP5pdeA1ORJ8,20390
         
     | 
| 
       11 
11 
     | 
    
         
             
            hyperquant/broker/coinw.py,sha256=SnJU0vASh77rfcpMGWaIfTblQSjQk3vjlW_4juYdbcs,17214
         
     | 
| 
       12 
12 
     | 
    
         
             
            hyperquant/broker/edgex.py,sha256=TqUO2KRPLN_UaxvtLL6HnA9dAQXC1sGxOfqTHd6W5k8,18378
         
     | 
| 
         @@ -32,6 +32,6 @@ hyperquant/datavison/_util.py,sha256=92qk4vO856RqycO0YqEIHJlEg-W9XKapDVqAMxe6rbw 
     | 
|
| 
       32 
32 
     | 
    
         
             
            hyperquant/datavison/binance.py,sha256=3yNKTqvt_vUQcxzeX4ocMsI5k6Q6gLZrvgXxAEad6Kc,5001
         
     | 
| 
       33 
33 
     | 
    
         
             
            hyperquant/datavison/coinglass.py,sha256=PEjdjISP9QUKD_xzXNzhJ9WFDTlkBrRQlVL-5pxD5mo,10482
         
     | 
| 
       34 
34 
     | 
    
         
             
            hyperquant/datavison/okx.py,sha256=yg8WrdQ7wgWHNAInIgsWPM47N3Wkfr253169IPAycAY,6898
         
     | 
| 
       35 
     | 
    
         
            -
            hyperquant-0. 
     | 
| 
       36 
     | 
    
         
            -
            hyperquant-0. 
     | 
| 
       37 
     | 
    
         
            -
            hyperquant-0. 
     | 
| 
      
 35 
     | 
    
         
            +
            hyperquant-1.0.dist-info/METADATA,sha256=g7mVXg0n6zshv7lEvTf6KCtGn2lyUhSCKyMzsHBTEB8,4408
         
     | 
| 
      
 36 
     | 
    
         
            +
            hyperquant-1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
         
     | 
| 
      
 37 
     | 
    
         
            +
            hyperquant-1.0.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     |