cryptofeed | Cryptocurrency Exchange Websocket Data Feed Handler | Cryptocurrency library

 by   bmoscon Python Version: 2.4.0 License: Non-SPDX

kandi X-RAY | cryptofeed Summary

kandi X-RAY | cryptofeed Summary

cryptofeed is a Python library typically used in Blockchain, Cryptocurrency, Bitcoin applications. cryptofeed has no bugs, it has no vulnerabilities, it has build file available and it has medium support. However cryptofeed has a Non-SPDX License. You can install using 'pip install cryptofeed' or download it from GitHub, PyPI.

Cryptocurrency Exchange Websocket Data Feed Handler
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              cryptofeed has a medium active ecosystem.
              It has 1772 star(s) with 560 fork(s). There are 75 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 58 open issues and 405 have been closed. On average issues are closed in 19 days. There are 7 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of cryptofeed is 2.4.0

            kandi-Quality Quality

              cryptofeed has 0 bugs and 0 code smells.

            kandi-Security Security

              cryptofeed has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              cryptofeed code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              cryptofeed has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              cryptofeed releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 13385 lines of code, 988 functions and 161 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed cryptofeed and discovered the below as its top functions. This is intended to give you an instant insight into cryptofeed implemented functionality, and help decide if they suit your requirements.
            • Handle a single book
            • Handle a book
            • Raise an exception if the bid asks overlap
            • Get list of candles
            • Normalize timestamp
            • Convert a symbol to exchange symbol
            • Normalize start and end times
            • Handle incoming messages
            • Create a ledger snapshot
            • Return the address of the feed
            • Example feed handler
            • Handle an L2 message
            • Get a list of candles
            • Handle RPC messages
            • Subscribe to the channel
            • Subscribe to channels
            • Get ledger details
            • Parse market data
            • Subscribe to channel
            • Handle incoming message
            • Get trades history
            • List all trades for a given symbol
            • Retrieve trades for a symbol
            • Retrieve trades for a given symbol
            • Get all trades for a symbol
            • Parse the result of a symbol
            Get all kandi verified functions for this library.

            cryptofeed Key Features

            No Key Features are available at this moment for cryptofeed.

            cryptofeed Examples and Code Snippets

            Getting Started
            Pythondot img1Lines of Code : 28dot img1no licencesLicense : No License
            copy iconCopy
            coinbase:
                - BTC-USD
                - LTC-USD
            kraken:
                - BTC-USD
                - LTC-USD
            
            start_config_ui.bat
            
            q.exe q/load.q -p 5002
            
            q)tables[]
            `quotes`refdata`trades
            
            q)\f
            `getCandlestick`getLastTrade`getSymList`jjoin`out`syncmd
            
            python -m bin.cryptoq --q-port 5  
            copy iconCopy
            f = FeedHandler()
            f.add_feed(Gateio(channels=[TRADES], symbols=list_tmp, callbacks={ TRADES: TradePostgresGateio(**postgres_cfg)}))
            f.run()
            
            f = FeedHandler()
            f.add_feed(Gateio(channels=[TRADES], symbols=list_tmp, c
            Asyncio function inside a thread
            Pythondot img3Lines of Code : 9dot img3License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            def create_loop(func):
               loop = asyncio.new_event_loop()
               asyncio.set_event_loop(loop)
               loop.run_until_complete(func())
               
            if __name__ == "__main__":
                thread = threading.Thread(target=create_loop, args=(func,))
                thread.start()
            
            Asyncio function inside a thread
            Pythondot img4Lines of Code : 34dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import asyncio
            import threading
            
            from cryptofeed import FeedHandler
            from cryptofeed.defines import BID, ASK, L2_BOOK
            from cryptofeed.exchanges import Kraken
            
            
            async def bookfunc(**kwargs):
                print('bookfunc', kwargs)
                
            
            def run_feed_h
            How to get intellisense to work with a .egg-link package (installed in development mode)?
            Pythondot img5Lines of Code : 5dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            pkgDir
            ├── pkgName
            ├── pkgName.egg-info
            └── tests
            

            Community Discussions

            QUESTION

            How to force close ProcessPoolExecutor even when there is deadlock
            Asked 2022-Apr-01 at 13:13

            I'm trying to use a separate process to stream data by concurrent futures. However, on the otherside, sometimes the other party stops the datafeed. But as long as I restart this threadable then it would work again. So I design something like this, to be able to keep streaming data without intervention.

            ...

            ANSWER

            Answered 2022-Apr-01 at 13:13

            Your code seems to suggest that it is okay to have two instances of threadable running concurrently, at least for some overlap period and that you unconditionally want to run a a new instance of threadable after 3600 seconds has expired. That's all I can go on and based on that my only suggestion is that you might consider switching to using the multiprocessing.pool.Pool class as the multiprocessing pool, which has the advantage of (1) it is a different class than what you have been using as for no other reason is likely to produce a different result and (2) unlike the ProcessPoolExecutor.shutdown method, the Pool.terminate method will actually terminate running jobs immediately (the ProcessPoolExecutor.shutdown method will wait for jobs that have already started, i.e. pending futures, to complete even if you had specified shutdown(wait=False), which you had not).

            The equivalent code that utilizes multiprocessing.pool.Pool would be:

            Source https://stackoverflow.com/questions/71566336

            QUESTION

            run crypto feed in a concurrent thread: There is no current event loop in thread 'ThreadPoolExecutor-0_0'
            Asked 2021-Sep-24 at 05:00

            I'm trying to use crypto feed to download data concurrently.

            ...

            ANSWER

            Answered 2021-Sep-24 at 04:49

            In the single-threaded version of your code, all three of these statements execute in the same thread in a simple sequential fashion:

            Source https://stackoverflow.com/questions/69308957

            QUESTION

            Asyncio function inside a thread
            Asked 2021-Jul-20 at 14:55

            The cryptofeed is a python library that uses asyncio library to get real-time prices of different Crypto Exchanges. In this short program, we try to run the cryptofeed FeedHandler in an independent thread. An example of the code is shown below:

            ...

            ANSWER

            Answered 2021-Jul-18 at 21:44

            You have to manually set an event loop for your thread through asyncio. You can do it by wrapping your function in a sort of loop setter:

            Source https://stackoverflow.com/questions/68432876

            QUESTION

            How to get intellisense to work with a .egg-link package (installed in development mode)?
            Asked 2020-Oct-25 at 18:20

            In Visual Studio 2019, I'm trying to get intellisense to work with a package I installed using the command:

            pip install -e "git+https://github.com/bmoscon/cryptofeed.git/#egg=cryptofeed"[all]

            Here are the docs explaining what it does. I called it using my projects virtual environment and everything seemed to work out okay (i.e. all the files seemed to download and link correctly).

            The problem I am having is the main package itself (cryptofeed) isn't being picked up by intellisense (it says, "unresolved import cryptofeed"), while all the other dependency packages that were installed with it are recognized fine.

            After doing some reading and some tests, I'm very confident that the reason it isn't working has to do with how packages are installed "development mode". Inside my ./env/Lib/site-packages folder, I can see that cryptofeed is an .egg-link file (more info on that here). Does Visual Studio handle these files (or just the whole "editable/development mode" thing in general) for intellisense? Is there something I am misunderstanding or did wrong here?

            I guess it's worth mentioning also that I read these MS' docs which made me think maybe I could do a "hacky" solution by just adding a search path to the source code, but that didn't appear to solve or do anything.

            ...

            ANSWER

            Answered 2020-Oct-25 at 18:20

            I've finally got it working. I've tried it on multiple repos/packages and it worked on all of them.

            The solution involves adding a search path manually (as mentioned above in my question post). I don't know exactly why, but it seems the added search path must target root directory of the python package. It wouldn't work If I just added the directory containing the source code.

            i.e. If the installed package's source directory contains sub-directories like:

            Source https://stackoverflow.com/questions/64518462

            QUESTION

            Toggle buttons between each other in jQuery
            Asked 2020-May-13 at 09:57

            I'm trying to make a container with 4 buttons in it and I wan't to toggle them between each other. Currently toggle is works when I double click the button (1click - show, 2click -hide) But when I click another button with toggle option the button shows information about another one.

            How i can make button toggle when i click another button but not the same one.

            ...

            ANSWER

            Answered 2020-May-13 at 09:55

            A kind of simple toggling you can use on other elements, too:

            Source https://stackoverflow.com/questions/61770717

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install cryptofeed

            Note: cryptofeed requires Python 3.7+. Cryptofeed can be installed from PyPi. (It's recommended that you install in a virtual environment of your choosing).

            Support

            AscendEXBequantBitfinexbitFlyerBithumbBitstampBittrexBlockchain.comBybitBinanceBinance DeliveryBinance FuturesBinance USBit.comBitMEXCoinbaseCrypto.comDeltaDeribitdYdXFMFW.ioEXXFTXFTX USGate.ioGeminiHitBTCHuobiHuobi DMHuobi Swap (Coin-M and USDT-M)KrakenKraken FuturesKuCoinOKCoinOKXPhemexPoloniexProBitUpbit
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install cryptofeed

          • CLONE
          • HTTPS

            https://github.com/bmoscon/cryptofeed.git

          • CLI

            gh repo clone bmoscon/cryptofeed

          • sshUrl

            git@github.com:bmoscon/cryptofeed.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link