
    ~%j                     L    d dl Zd dlmc mZ d dlmZ d dlZd dl	m
Z
 d Zd ZdS )    N)Decimal)OrderIntentc            	      0   t          j        t          d          5  t          di ddddddd	d
dddddddt	          d          dd dd dd dd dddddt	          d          dt	          d           d d d            d S # 1 swxY w Y   d S )N	stop_loss)matchstrategy_id)candidate_v76_hl_confirmed_squeeze_hybridsymbolBTC/USDC:USDCcoinBTCsidebuyreduce_onlyF
order_typemarkettifIocsize0.01pricetrigger_pricetake_profitclient_order_idz	v76-BTC-1reasonconfirmed_squeeze_breakoutrisk_usdz1.25estimated_notional_usd100 )pytestraises
ValueErrorr   r   r        M/home/agent/projects/CryptoTradingBot/Crypto_Agent/tests/test_order_intent.py6test_order_intent_requires_stop_loss_for_entry_intentsr&      sb   	z	5	5	5 
 
 	
 	
 	
CC	
"?	
 	
 		

 	
  x	
 	
 	
 $	
 $	
 d	
 	
 (K	
 0/	
 V___	
  $+5>>>!	
 	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   A"BBBc                     t          d%i ddddddddd	d
dddddt          d          dd dd dd dd dddddt          d          dt          d          } | j        }d}||k    }|st          j        d|fd||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          d z  }d!d"|iz  }t          t          j
        |                    d x}x}}| j        }d
}||u }|st          j        d#|fd$||f          dt          j                    v st          j        |           rt          j        |           ndt          j        |          t          j        |          d z  }d!d"|iz  }t          t          j
        |                    d x}x}}d S )&Nr   r	   r
   r   r   r   r   sellr   Tr   r   r   r   r   r   r   r   r   r   r   zv76-BTC-exit-1r   panic_reduce_only_exitr   0r   r   )==)z,%(py2)s
{%(py2)s = %(py0)s.coin
} == %(py5)sintent)py0py2py5zassert %(py7)spy7)is)z3%(py2)s
{%(py2)s = %(py0)s.reduce_only
} is %(py5)sr    )r   r   r   
@pytest_ar_call_reprcompare@py_builtinslocals_should_repr_global_name	_safereprAssertionError_format_explanationr   )r,   @py_assert1@py_assert4@py_assert3@py_format6@py_format8s         r%   /test_reduce_only_exit_intent_may_omit_stop_lossr?      s      ?? U V	
 D 8 E V___ d d $ D )( ('    'u~~~!F& ;%;%;%66;%%%%%%%%%%%%%%%%%%%%%%%%%6%%%%%6%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%r$   )builtinsr4   _pytest.assertion.rewrite	assertionrewriter2   decimalr   r!   src.execution.order_intentr   r&   r?   r    r$   r%   <module>rF      su                         2 2 2 2 2 2
 
 
,& & & & &r$   