title: Extracting info from logger. (Creating a BitMEX bot)
body: <p>Thank you for your time.  I am creating a BitMEX trading bot. I downloaded a bot scaffold from here:  <a href="https://github.com/BitMEX/sample-market-maker" rel="nofollow noreferrer">https://github.com/BitMEX/sample-market-maker</a></p>
  
  <p>I am currently trying to get info of my recent trades so I can amend future ones.  The only way I can see doing this using the provided API is by getting information directly from the logger.  When a trade is executed, the logger returns this info from the ws.thread :</p>
  
  <pre><code>                    if table == 'order':
                          is_canceled = 'ordStatus' in updateData and updateData['ordStatus'] == 'Canceled'
                          if 'cumQty' in updateData and not is_canceled:
                              contExecuted = updateData['cumQty'] - item['cumQty']
                              if contExecuted &gt; 0:
                                  instrument = self.get_instrument(item['symbol'])
                                  self.logger.info("Execution: %s %d Contracts of %s at %.*f" %
                                           (item['side'], contExecuted, item['symbol'],
                                            instrument['tickLog'], item['price']))
  </code></pre>
  
  <p>Is there any way I can extract the quantity and price so I can use it as variables for a different function?  </p>
  
  <p>I suppose what I'm looking for is some type of function where </p>
  
  <p>if the logger is executed, then label contExecuted and item['price'] and extract it to a variable.  </p>