title: I cant get the 'Adjusted_Last' from ibapi
body: <p>I use Python </p>
  
  <p>API_Version=9.73.04</p>
  
  <pre><code>from ibapi import wrapper
  from ibapi.client import EClient
  from ibapi.wrapper import EWrapper
  from ibapi.contract import Contract as IBcontract
  from threading import Thread
  import queue
  import datetime
  from ibapi.utils import iswrapper #just for decorator
  from ibapi.common import *
  from ibapi.contract import *
  from ibapi.ticktype import *
  
  class TestApp(wrapper.EWrapper, EClient):
  
      def __init__(self):
          wrapper.EWrapper.__init__(self)
          EClient.__init__(self, wrapper=self)
  
  
      @iswrapper
      def historicalData(self, reqId:int, bar: BarData):
          print("HistoricalData. ", reqId, " Date:", bar.date, "Open:", bar.open,
                "High:", bar.high, "Low:", bar.low, "Close:", bar.close, "Volume:", bar.volume)
          self.done = True
  
  
  
  
  
  def main():
      t = time()
      max_amount_per_Iter = 70 #max number per iter to save cost
      max_Iter = ceil(len(all_data)/max_amount_per_Iter)-1
      for i in range (0,max_Iter):
          print('====================round : ',i+1,'===============================')
          app = TestApp()
          app.connect("127.0.0.1", 7496, clientId=i)
          print("serverVersion:%s connectionTime:%s" % (app.serverVersion(),app.twsConnectionTime()))
          for j in range (0,min(max_amount_per_Iter,len(all_data)-i*max_amount_per_Iter)):
              print(j+i*70)
              app.done = False
              app.i = j+i*max_amount_per_Iter
  
              contract = Contract()
              contract.symbol = all_data.iloc[app.i,0]
              contract.secType = all_data.iloc[app.i,1]
              contract.currency = all_data.iloc[app.i,3]
              contract.exchange = all_data.iloc[app.i,2]
              queryTime = (datetime.datetime.today() - datetime.timedelta(days=180)).strftime("%Y%m%d %H:%M:%S")
  
              print('i=', i)
              app.reqHistoricalData(app.i, contract, queryTime,"1 W", "1 day", "Adjusted_Last", 1, 1, False, [])
              i+1
              app.run()
  
          sleep(1)
          app.disconnect()
          sleep(0.02)
          print('=========End round : ',i+1,'with time :',time() - t,'==============')
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>As </p>
  
  <pre><code>app.reqHistoricalData(app.i, contract, queryTime,"1 W", "1 day", "Adjusted_Last", 1, 1, False, [])
  </code></pre>
  
  <p>It returns Error with no data.</p>
  
  <pre><code>ERROR:root:ERROR 0 321 Error validating request:-'bm' : cause - What to show value of ADJUSTED_LAST rejected.
  </code></pre>
  
  <p><a href="https://interactivebrokers.github.io/tws-api/historical_bars.html#gsc.tab=0" rel="nofollow noreferrer">Link for 'Adjusted_Last'</a></p>
  
  <p><a href="https://interactivebrokers.github.io/tws-api/message_codes.html#gsc.tab=0" rel="nofollow noreferrer">Link for error code</a></p>
  
  <p>I have try various method. But I am new with Python so I don't know even how to start search. for all_data is a pd.DataFame that I use to keep a stock from S&amp;P 500 constituent and I will use those price to calculate a return.</p>
  
  <p>Then I plan to get a stock position that I have held and systematically traded them.</p>
  
  <p>I know I have another problem about the app.done = True, I think I can deal with it myself. But I can't figure out for this.
  Thanks!</p>