Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    problem with live trading(delayed data)

    General Code/Help
    4
    10
    1168
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sasha last edited by Sasha

      I'm new to backtrader
      I just copy code from https://www.backtrader.com/blog/posts/2016-06-21-livedata-feed/live-data-feed.html
      Run with command: python live_trading.py --port 7497 --data0 TWTR --resample --timeframe Seconds --compression 5
      Output:

      Server Version: 76
      TWS Time at connection:20190505 21:31:30 ALMT
      --------------------------------------------------
      Strategy Created
      --------------------------------------------------
      Timezone from ContractDetails: EST
      Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA
      ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:cashfarm>
      ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfarm>
      ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:hkhmds>
      ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:ushmds>
      ***** DATA NOTIF: DELAYED
      ***** DATA NOTIF: NOTSUBSCRIBED
      ***** STORE NOTIF: <error id=16777217, errorCode=354, errorMsg=Requested market data is not subscribed.Delayed market data is available.Error&BEST/STK/Top&BEST/STK/Top>~~~
      

      I can not understand what the error

      B 1 Reply Last reply Reply Quote 0
      • rami
        rami last edited by

        @sasha said in problem with live trading(delayed data):

        Requested market data is not subscribed

        https://interactivebrokers.github.io/tws-api/message_codes.html
        error :10090

        Indicates that some tick types requested require additional market data subscriptions not held in the account. This commonly occurs for instance if a user has options subscriptions but not the underlying stock so the system cannot calculate the real time greek values (other default ticks will be returned). Or alternatively, if generic tick types are specified in a market data request without the associated subscriptions.

        S 1 Reply Last reply Reply Quote 0
        • B
          backtrader administrators @Sasha last edited by

          @sasha said in problem with live trading(delayed data):

          ***** STORE NOTIF: <error id=16777217, errorCode=354, errorMsg=Requested market data is not subscribed.Delayed market data is available.Error&BEST/STK/Top&BEST/STK/Top>~~~
          

          @sasha said in problem with live trading(delayed data):

          I can not understand what the error

          The message comes directly from TWS and says you clearly don't have a subscription package for the ticker you want to see.

          S 1 Reply Last reply Reply Quote 0
          • S
            Sasha @backtrader last edited by Sasha

            @backtrader said in problem with live trading(delayed data):

            The message comes directly from TWS and says you clearly don't have a subscription package for the ticker you want to see.

            Thanks.
            Sorry for the stupid question, but how to get permissions subscription package?
            I use TWS with demo

            1 Reply Last reply Reply Quote 0
            • S
              Sasha @rami last edited by

              @rami I understood my error. I don't have permission for retrieving data
              How can I get permission?

              1 Reply Last reply Reply Quote 0
              • A
                ab_trader last edited by

                Buy subscription for market data from Interactive Brokers.

                • If my answer helped, hit reputation up arrow at lower right corner of the post.
                • Python Debugging With Pdb
                • New to python and bt - check this out
                S 1 Reply Last reply Reply Quote 0
                • S
                  Sasha @ab_trader last edited by backtrader

                  @ab_trader said in problem with live trading(delayed data):

                  Buy subscription for market data from Interactive Brokers.

                  Is there another way to get permission? )

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    ab_trader @Sasha last edited by

                    @sasha Sure, call to Interactive Brokers and convince them that they need to give you for free things they are selling to others.

                    • If my answer helped, hit reputation up arrow at lower right corner of the post.
                    • Python Debugging With Pdb
                    • New to python and bt - check this out
                    S 1 Reply Last reply Reply Quote 0
                    • S
                      Sasha @ab_trader last edited by

                      @ab_trader but I just want to check my algorithm on paper trading

                      1 Reply Last reply Reply Quote 0
                      • B
                        backtrader administrators last edited by

                        Your paper trading account uses the same data permissions as your standard account. It won't simply use your real money. You still need permissions.

                        If you have an Interactive Brokers account you should familiarize yourself with what the DOs and DONTs are.

                        As an alternative you can use the faux data demo, but it won't be any good to test any algorithm because the data is completely fake (even in the demo, you cannot use each and every ticker. The forex tickers tend to work most of the time)

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors