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/

    Cryptowatch Data Feed

    General Code/Help
    2
    4
    202
    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.
    • G
      Gleetche last edited by

      Hello,

      I'd like to use crypto data feeds, but I don't really know where can I get them. I don't mind using CSVs. I have found some sources but I don't know what to do with it. Anyone knows how to use/install these?

      https://github.com/cryptowatch/cw-sdk-python
      https://docs.cryptowat.ch/rest-api/

      1 Reply Last reply Reply Quote 0
      • Xu Liu
        Xu Liu last edited by

        example:

        import time
        
        import cryptowatch as cw
        
        cw.api_key = "your public key"
        
        # Return market candlestick info (open, high, low, close, volume) on some timeframes
        list = cw.markets.get("BINANCE:BTCUSDT", ohlc=True, periods=["15m"])
        
        print(list)
        print(len(list.of_15m))
        it = iter(list.of_15m)
        for i in it:
            i[0] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(i[0]))
            print(i)
        
        ['2020-11-04 21:30:00', 13803.38, 13860.0, 13786.87, 13834.74, 728.051491, 10066510.70990301]
        ['2020-11-04 21:45:00', 13834.73, 13895.0, 13823.83, 13858.36, 880.441081, 12210240.06888313]
        ['2020-11-04 22:00:00', 13858.36, 13885.0, 13832.5, 13835.13, 631.065418, 8745946.00082795]
        
        1 Reply Last reply Reply Quote 1
        • Xu Liu
          Xu Liu last edited by

          https://github.com/cryptowatch/cw-sdk-python
          It is very clear here, you can copy the code to familiarize yourself with the usage

          1 Reply Last reply Reply Quote 1
          • G
            Gleetche last edited by

            oh, thankyou!

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