Snippets

Kim Minh Kaplan Xeyzyo: Untitled snippet

Created by Kim Minh Kaplan last modified
def execDetails(self, reqId, contract, execution):
	# 
	if reqId == -1:  # FILL
		exec_id = execution.execId
		order_id = execution.orderId
		with self.fills_cond:
			if order_id not in self.fills:
				self.fills.setdefault(order_id, {}) 
			self.fills[order_id][execId] = (contract, execution)	
			self.fills_cond.notify_all()		
		self.save_fill_to_db(order_id, exec_id, contract, execution)
		self.event_q.send(message.FillIBEvent(order_id, contract, execution))
	else:
		logging.info("Received execDetaills with reqId = %s (not a FILL). To address", str(reqId))
		with self.fills_cond:
			self.fills_cond.notify_all()		
	self._default_cb(reqId, contract, execution)

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.