ccxt | PHP cryptocurrency trading API with support | Cryptocurrency library

 by   ccxt Python Version: 4.3.6 License: MIT

kandi X-RAY | ccxt Summary

kandi X-RAY | ccxt Summary

ccxt is a Python library typically used in Financial Services, Fintech, Blockchain, Cryptocurrency, Ethereum, Bitcoin applications. ccxt has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. However ccxt build file is not available. You can install using 'pip install ccxt' or download it from GitHub, PyPI.

A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. The CCXT library is used to connect and trade with cryptocurrency exchanges and payment processing services worldwide. It provides quick access to market data for storage, analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, and related software engineering. It is intended to be used by coders, developers, technically-skilled traders, data-scientists and financial analysts for building trading algorithms.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ccxt has a medium active ecosystem.
              It has 28430 star(s) with 6980 fork(s). There are 936 watchers for this library.
              There were 10 major release(s) in the last 6 months.
              There are 778 open issues and 7948 have been closed. On average issues are closed in 6 days. There are 351 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ccxt is 4.3.6

            kandi-Quality Quality

              ccxt has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              ccxt is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              ccxt releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              ccxt has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              ccxt saves you 706702 person hours of effort in developing the same functionality from scratch.
              It has 346352 lines of code, 13979 functions and 1152 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ccxt and discovered the below as its top functions. This is intended to give you an instant insight into ccxt implemented functionality, and help decide if they suit your requirements.
            • Inf - inflate an output buffer .
            • lint - disable - next - line
            • Deflated state .
            • Fetch remote resource
            • Flattens a block of text into a string .
            • Fills into the window with a random token .
            • Translate a string into an earlier block
            • Recursively format a value into a string .
            • Encode a string into an array of characters
            • Determines the longest pattern of a string .
            Get all kandi verified functions for this library.

            ccxt Key Features

            No Key Features are available at this moment for ccxt.

            ccxt Examples and Code Snippets

            How to execute those 2 code snippets asynchronously/parallell
            JavaScriptdot img1Lines of Code : 22dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            'use strict';
            const ccxt = require ('ccxt');
            
            (async () => {
                        try{
                   const exchange = new ccxt.one({ enableRateLimit: true })
                   const tickers = await exchange.fetchTickers()
                   const obj = { tickers }
              
            Trade history report from Bitfinex API
            JavaScriptdot img2Lines of Code : 18dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            "use strict";
            
            const ccxt = require ('ccxt')
            
            const exchange = new ccxt.bitfinex ({
                'apiKey': 'YOUR_API_KEY', // ←---- change your credentials
                'secret': 'YOUR_SECRET',
            });
            
            (async () => {
                await exchange.loadMarkets ()
                co

            Community Discussions

            QUESTION

            fetch_balance method in ccxt won't return all assets
            Asked 2022-Mar-16 at 09:57

            As I call the fetch_balance method from kucoinfutures in ccxt, it only returns BTC, not any other assets. Shouldn't there be other assets like USDT or ETH too?

            Here's the python code:

            ...

            ANSWER

            Answered 2022-Mar-16 at 09:57

            It seems like fetchBalance only returns one currency at a time. To get USDT as the asset to be returned, you must pass the param currency via params currently using the exchange-specific currency id.

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

            QUESTION

            Installing private GitHub npm package in Firebase Cloud Functions
            Asked 2022-Mar-10 at 09:20

            I am new to Firebase Cloud Functions and have been struggling with adding private npm packages to make my functions work. I understand Firebase will treat them all as public unless specified and will install with npm / yarn what I have in package.json.

            The only way for me to tell Firebase that it's a private repository on Github is to add a

            .npmrc (containing) - The key I am using is a Personal Access Token from Github-Developers that has all the need it permissions

            ...

            ANSWER

            Answered 2021-Nov-01 at 08:22

            After the rest of the day searching for the answer it was the most simple but not the wisest solution that worked:

            Completely ignored the .npmrc file and in package.json under dependencies just added the personal access token like so: @github.com

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

            QUESTION

            Sticky Header using shell less command
            Asked 2022-Mar-01 at 13:46

            I have a text table that I am displaying using less -S -R.

            I would like that 3rd and 4th line of the output (the last 2 blue lines) to be a sticky header, so that it would work similar to the header here. Is it possible to do this with less?

            Without using less, it's just a table of text (with special characters for the colours). You can copy this text into a my_file.txt file and run cat my_file.txt | less -S -R if you would like to test it out

            ...

            ANSWER

            Answered 2022-Mar-01 at 13:46

            A --header option was recently added in less 600 (released on 2022-01-07) for that:

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

            QUESTION

            Can the amount be in USDT on Binanace Api Future Trade?
            Asked 2022-Feb-16 at 09:39
            import ccxt
            import pprint
            
            with open("D:/api.txt") as f:
                lines = f.readlines()
                api_key = lines[0].strip()
                secret  = lines[1].strip()
            
            binance = ccxt.binance({
                'apiKey' : api_key,
                'secret' :  secret,
                'enableRateLimit': True,
                'options': {
                    'defaultType': 'future'
                }
                })
            markets = binance.fetch_tickers()
            print(markets.keys())
            
            order = binance.create_limit_buy_order(
                symbol = 'ENSUSDT',
                amount = 1,
                price = 19.5,
                )
            
            pprint.pprint(order)
            
            ...

            ANSWER

            Answered 2022-Feb-16 at 09:39

            The closest you could do would be to multiply the contractSize by the price and the amount you want to spend

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

            QUESTION

            Nestjs - What is the right approach to have custom classes using 3rd party libraries available
            Asked 2022-Jan-16 at 13:11

            I am new to NestJS and I did not find any clear instruction to do what I need to.

            I wanted to build my backend using NestJS which I have never used before but only heard good things about. So the backend server I am going to build will be using a 3rd party module called ccxt from npmjs. In a normal node app, I would just create a random class for example CryptoManager, import the ccxt module and write some functions that are running on set intervals or whatever. Then I would create a controller class that instantiates an object of that CryptoManager class and from there on I can return it's responses.

            But how am I supposed to do this with NestJS? What do I have to do, in order to have a custom class that is running background tasks available in other nest controllers / services and so on?

            This class is just supposed to execute 3rd party (ccxt) module functions and store results in a database.But I want to be able to execute this classes methods from all points in the nestjs app (from all modules).

            I hope my question is clear, if not please let me know.

            ...

            ANSWER

            Answered 2021-Oct-03 at 23:07

            You'll need a combination of Modules and Providers to do this the "nest way", and then you can use dependency injection throughout your app.

            Generally speaking, the way that you'd approach adding 3rd party libraries is the following:

            1. Create a module to wrap your library, like "CryptoManagerModule".
            2. Create a custom provider that provides the CCXT library, and add this to your providers array.
            3. Create a service, "CryptoManagerService", and inject CCXT into the constructor.
            4. Export the "CryptoManagerService" from your module, so that you can inject it into the rest of your app.
            5. (Optionally) mark your module as "global", so that you only need to configure the module once in the AppModule to make it available to all other modules.

            Inside crypto-manager.module.ts

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

            QUESTION

            How to set time zone for historical price quotes retrieved using ccxt?
            Asked 2021-Dec-27 at 11:54

            The python example below from ccxt will fetch historical price quotes.

            https://github.com/ccxt/ccxt/blob/master/examples/py/binance-fetch-ohlcv-to-csv.py

            The code does not show how to set the time zone. How can I set the fetched price quote timestamp to Asian HK/Singapore time zone?

            I am using python 3.9

            ...

            ANSWER

            Answered 2021-Dec-27 at 11:54

            I think you can just pass datetime string with timezone like 2017-08-17T00:00:00+08:00 into scrape_candles_to_csv function from your example ([Asian HK/Singapore has UTC+8 timezone)

            Method exchange.parse8601 correctly handled strings with timezone

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

            QUESTION

            Python: how to get the price of a crypto at a given time in the past
            Asked 2021-Dec-16 at 22:44

            Is there any way I can use ccxt to extract the price of a crypto currency at a given time in the past?

            Example: get price of BTC on binance at time 2018-01-24 11:20:01

            ...

            ANSWER

            Answered 2021-Dec-12 at 04:18

            QUESTION

            CCXT ByBit Close Position
            Asked 2021-Nov-16 at 10:35

            I am using ccxt to connect to ByBit and create orders.

            ...

            ANSWER

            Answered 2021-Nov-16 at 10:35

            Add reduce_only to params to exit out of a futures order

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

            QUESTION

            python When use vpn, urllib3 connect raise a error “SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)”
            Asked 2021-Oct-28 at 10:48

            I am using ccxt to connect biance to fetch market, then raise error

            ...

            ANSWER

            Answered 2021-Oct-28 at 06:37

            I have no idea what VPN this is, but it looks like that it is messing with the traffic.

            This behavior is for example typical when using a company VPN, which also means to use the companies filtering when accessing the internet. Often Deep Packet Inspection is implemented here to control and limit access, and this can result in deliberately breaking outgoing connections.

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

            QUESTION

            Unable to plot multiple lines in a single graph
            Asked 2021-Oct-22 at 16:49

            I am having a weird issue, I am trying to plot multiple lines in a single graph but it is only one. I am sharing the screenshot as you can see the close values are different in both. It is not rendering binance graph as it seems to be overridden.

            Graph

            Update

            The code is given below

            ...

            ANSWER

            Answered 2021-Oct-22 at 16:49
            • Tested in python 3.8.12, pandas 1.3.3, matplotlib 3.4.3
            Existing Code
            • Works without any issues, however, 'Binance' is small compared to 'FTX', which can be resolved with ax.set_yscale('log')

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install ccxt

            The easiest way to install the CCXT library is to use a package manager:.
            ccxt in NPM (JavaScript / Node v7.6+)
            ccxt in PyPI (Python 3.5.3+)
            ccxt in Packagist/Composer (PHP 5.4+)
            js/ in JavaScript
            python/ in Python (generated from JS)
            php/ in PHP (generated from JS)

            Support

            The CCXT library currently supports the following 113 cryptocurrency exchange markets and trading APIs:. The list above is updated frequently, new crypto markets, exchanges, bug fixes, and API endpoints are introduced on a regular basis. See the Manual for more details. If you can't find a cryptocurrency exchange in the list above and want it to be added, post a link to it by opening an issue here on GitHub or send us an email. The library is under MIT license, that means it's absolutely free for any developer to build commercial and opensource software on top of it, but use it at your own risk with no warranties, as is.
            Find more information at:

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

            Find more libraries