fix(place_order): quoteOrderQty and quantity appear together in LIMIT orders
				
					
				
			This commit is contained in:
		
							
								
								
									
										1
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								main.py
									
									
									
									
									
								
							@@ -320,6 +320,7 @@ class MexcSpotTrade:
 | 
				
			|||||||
                price = float(processed_kwargs["price"])
 | 
					                price = float(processed_kwargs["price"])
 | 
				
			||||||
                quantity = quote_amount / price
 | 
					                quantity = quote_amount / price
 | 
				
			||||||
                processed_kwargs["quantity"] = str(quantity)
 | 
					                processed_kwargs["quantity"] = str(quantity)
 | 
				
			||||||
 | 
					                processed_kwargs.pop("quoteOrderQty")
 | 
				
			||||||
                logger.info("根据quoteOrderQty计算quantity: %f", quantity)
 | 
					                logger.info("根据quoteOrderQty计算quantity: %f", quantity)
 | 
				
			||||||
            except (ValueError, KeyError) as e:
 | 
					            except (ValueError, KeyError) as e:
 | 
				
			||||||
                logger.error("计算quantity失败: %s", str(e))
 | 
					                logger.error("计算quantity失败: %s", str(e))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user