kandi background

ccxt | PHP cryptocurrency trading API | Cryptocurrency library

Download this library from

kandi X-RAY | ccxt Summary

ccxt is a JavaScript 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. You can install using 'npm i ccja' or download it from GitHub, npm.
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.

kandi-support Support

  • ccxt has a medium active ecosystem.
  • It has 24082 star(s) with 5938 fork(s). There are 929 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 569 open issues and 6293 have been closed. On average issues are closed in 2 days. There are 186 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of ccxt is current.

quality kandi Quality

  • ccxt has 0 bugs and 0 code smells.

securitySecurity

  • 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.

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.

buildReuse

  • ccxt releases are not available. You will need to build from source code and install.
  • Deployable package is available in npm.
  • 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

Coming Soon for all Libraries!

Currently covering the most popular Java, JavaScript and Python libraries. See a SAMPLE HERE.
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.

ccxt Key Features

support for many cryptocurrency exchanges — more coming soon

fully implemented public and private APIs

optional normalized data for cross-exchange analytics and arbitrage

an out of the box unified API that is extremely easy to integrate

works in Node 10.4+, Python 3, PHP 5.4+, and web browsers

ccxt Examples and Code Snippets

  • Install
  • JavaScript (NPM)
  • JavaScript (for use with the
  • Python
  • PHP
  • Docker
  • Intro
  • JavaScript
  • Python
  • PHP
  • fetch_balance method in ccxt won't return all assets
  • Installing private GitHub npm package in Firebase Cloud Functions
  • Sticky Header using shell less command
  • Can the amount be in USDT on Binanace Api Future Trade?
  • Nestjs - What is the right approach to have custom classes using 3rd party libraries available
  • How to set time zone for historical price quotes retrieved using ccxt?
  • Python: how to get the price of a crypto at a given time in the past
  • CCXT ByBit Close Position
  • Unable to plot multiple lines in a single graph
  • Python TA library, ATR getting errors in dataframe series

Install

git clone https://github.com/ccxt/ccxt.git  # including 1GB of commit history

# or

git clone https://github.com/ccxt/ccxt.git --depth 1  # avoid downloading 1GB of commit history

Community Discussions

Trending Discussions on ccxt
  • fetch_balance method in ccxt won't return all assets
  • Installing private GitHub npm package in Firebase Cloud Functions
  • Sticky Header using shell less command
  • Can the amount be in USDT on Binanace Api Future Trade?
  • Nestjs - What is the right approach to have custom classes using 3rd party libraries available
  • How to set time zone for historical price quotes retrieved using ccxt?
  • Python: how to get the price of a crypto at a given time in the past
  • CCXT ByBit Close Position
  • python When use vpn, urllib3 connect raise a error “SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)”
  • Unable to plot multiple lines in a single graph
Trending Discussions on ccxt

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:

exchange = ccxt.kucoinfutures(
    {
        'apiKey': API_KEY,
        'secret': API_SECRET,
        'password': API_PHRASE
    }
)

exchange.verbose = True
balance = exchange.fetch_balance()
print(balance)

Here's what I get from print(balance):

{'info': {'code': '200000', 'data': {'accountEquity': 0, 'unrealisedPNL': 0, 'marginBalance': 0, 'positionMargin': 0, 'orderMargin': 0, 'frozenFunds': 0, 'availableBalance': 0, 'currency': 'XBT'}}, 'timestamp': None, 'datetime': None, 'BTC': {'free': 0.0, 'used': 0.0, 'total': 0.0}, 'free': {'BTC': 0.0}, 'used': {'BTC': 0.0}, 'total': {'BTC': 0.0}}

Am I missing something?

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.

import ccxt

exchange = ccxt.kucoinfutures( ... )
exchange.load_markets()

currency = exchange.currency('USDT')
balance = exchange.fetch_balance({'currency': currency['id']})
print(balance)

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

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.

Build your Application

Share this kandi XRay Report

Try Top Libraries by ccxt