Add total_bids_value_multiplier to automation strategies.
order value is the max value of a bid that can be accepted. order value * total_bids_value_multiplier is the max sum of all bids that can be accepted.
This commit is contained in:
		
							parent
							
								
									c13606ab54
								
							
						
					
					
						commit
						c322c9ae0c
					
				@ -4247,8 +4247,10 @@ class BasicSwap(BaseApp):
 | 
			
		||||
 | 
			
		||||
            active_bids, total_bids_value = self.getCompletedAndActiveBidsValue(offer, use_session)
 | 
			
		||||
 | 
			
		||||
            if total_bids_value + bid.amount > offer.amount_from:
 | 
			
		||||
                raise AutomationConstraint('Over remaining offer value {}'.format(offer.amount_from - total_bids_value))
 | 
			
		||||
            total_bids_value_multiplier = opts.get('total_bids_value_multiplier', 1.0)
 | 
			
		||||
            if total_bids_value_multiplier > 0.0:
 | 
			
		||||
                if total_bids_value + bid.amount > offer.amount_from * total_bids_value_multiplier:
 | 
			
		||||
                    raise AutomationConstraint('Over remaining offer value {}'.format(offer.amount_from * total_bids_value_multiplie - total_bids_value))
 | 
			
		||||
 | 
			
		||||
            num_not_completed = 0
 | 
			
		||||
            for active_bid in active_bids:
 | 
			
		||||
 | 
			
		||||
@ -2,6 +2,22 @@
 | 
			
		||||
0.0.x
 | 
			
		||||
==============
 | 
			
		||||
 | 
			
		||||
0.0.59
 | 
			
		||||
==============
 | 
			
		||||
 | 
			
		||||
- Added total_bids_value_multiplier option to automation strategies.
 | 
			
		||||
  - System won't automatically accept a bid for an offer if the sum of the values of all completed
 | 
			
		||||
    and in-porgress bids and the candidate bid exceeds total_bids_value_multiplier times the offer value.
 | 
			
		||||
  - default is 1.0.
 | 
			
		||||
- ui: The rpc page can send commands over http.
 | 
			
		||||
  - Must manually specify the argument types bsij for (bool, string, int, json).
 | 
			
		||||
- Removed error message for unprocessed revoke messages.
 | 
			
		||||
  - Some nodes won't have all messages.
 | 
			
		||||
- Started test framework for scripts.
 | 
			
		||||
- api: Can abandon bids.
 | 
			
		||||
- If wallets are encrypted the system will only load in-progress bids when unlocked rather than at startup.
 | 
			
		||||
- Can set overrides for automation strategies per identity.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
0.0.54
 | 
			
		||||
==============
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user