Questions tagged [ccxt]

The CCXT library is used to connect & trade with cryptocurrency / altcoin exchanges & payment processing services worldwide. It provides quick access to market data for storage, analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, webshop integration and related software engineering. Use with topics related to the CCXT library which unifies a vast amount of crypto exchange APIs into one.

The CCXT library is used to connect and trade with cryptocurrency / altcoin 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, webshop integration 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 on top of it.

217 questions
2
votes
1 answer

ccxt crypto API - Does it support OAuth access tokens?

The API for ccxt.coinbase accepts API keys and secrets. How do I pass it an accessToken? That attribute does not seem to be valid. All examples I see in the documentation (https://github.com/ccxt/ccxt/wiki/Manual) use API keys and I have not found…
2
votes
1 answer

Python JSON Trying to filter return traffic for specific identifiers/keys

I need to pull the price from the returned json data. I have searched and search. I only want the price printed from the pprint. The pprint at the bottom no matter how I slice it I cant filter it. Not sure if it need to be put into a dictionary…
snub-fighter
  • 161
  • 2
  • 14
1
vote
0 answers

Fetch balances from Binance using NextJS, ccxt and TypeScript

I'm trying to fetch balances from Binance in my NextJS 13 application, which uses the /src/app dir and TypeScript. async function getData() { const exchange = new ccxt.binance ({ "apiKey": "mykey", "secret": "mysecret", }) return…
Sergey Sypalo
  • 1,223
  • 5
  • 16
  • 35
1
vote
0 answers

How can I place a market or limit spot order using pybit/bybit?

Here is some code that is working. However I cant confirm that the stop loss and take profits are being placed. I can see my buy order on bybit through the trading view, but nothing to indicate there is a tp or sl. Could someone please provide some…
Jon Cianci
  • 61
  • 1
  • 8
1
vote
0 answers

How do I force HTTP connections to use IPv4 instead of IPv6 in Python?

When attempting to connect to the Binance REST API from a Windows 11 computer, I got the following error: ccxt.base.errors.ExchangeError: binanceus {"code":-71012,"msg":"IPv6 not supported"} In this particular example I am using the ccxt Python…
1
vote
0 answers

CCXT Bybit, Cannot create order in One-Way Mode

The below script works fine in "Hedge Mode". However, if I change the Position Mode to "One-Way Mode", I got an error, "position idx not match position mode". I've googled for a while and still cannot find the solution, please kindly help,…
1
vote
0 answers

How can I create a MARKET order with SL/TP in Bybit using CCXT?

I need to make this code works for MARKET orders, I can't find how to get it. exchange.create_order( symbol='ADA/USDT:USDT', type='market', side='sell', amount=60, params={ 'leverage': 1, 'stopLossPrice': SL_PRICE, …
Carlos Diaz
  • 321
  • 1
  • 15
1
vote
1 answer

CCXT.load_markets() function running fail in EC2

I have a problem running ccxt.load_markets() function in EC2 server but I check running is OK in local PC enviroment. Please me help for solution Code and Error msg is as below. python version : 3.7.15 CCXT version : 2.2.95 import ccxt import…
zawoon
  • 11
  • 3
1
vote
2 answers

how to change SL/TP with CCXT (python) on Binance Futures

How can I change the take profit or stop loss of an order already created via ccxt python in Binance futures? I would like an already created order to be able to change the stop loss, as if I did it from the binance web cli, there is some way, I…
1
vote
0 answers

How to use ccxt methods like fetchticker, etc on user-defined variable, attribute?

I am relatively new to Python and Software development in general. I have made the following code, and my query at this stage is, How do I connect to CCXT library using a user defined parameter or variable? ` class Exchange: """ docstring goes…
1
vote
1 answer

how to connect proxies in the ccxt library?

I try to call a function (sell/buy, whatever) through a proxy, but it gives an error. What am I doing wrong? account_binance = ccxt.binance({ 'apiKey': API_KEY, 'secret': API_SECRET, 'enableRateLimit': True, 'options': { …
1
vote
2 answers

Create market order on Bybit using CCXT with SL and TP using python?

Does anyone have an example of how to create a market order with take profit and stop loss? I have been through the docs and because this is the first time i've done anything like this I don't really get it! I have everything working except for…
maxixmo
  • 45
  • 1
  • 6
1
vote
1 answer

CCXT fetch deposit show only past 1 month data

I use CCXT to fetchDeposits from FTX. My aim is to find the sum of all Bitcoin deposits to this specific FTX address. Problem happens when I try to get all historical deposits (older than 1 month). FTX only returns past 1 month data. Start date of…
Alphatio
  • 47
  • 5
1
vote
1 answer

Can't fetch binance futures data from ccxt

I need to fetch funding rate history data from binance, but it only shows spot markets even when I type : binance = ccxt.binance({'option': {'defaultType': 'future'}}) binance.fetch_markets() How is it possible to fix?
Marco Polo
  • 21
  • 2
1
vote
1 answer

how can I close position on OKX V5 based on CCXT Python?

I use this fuction : exchange.create_order(t[0][1], 'market', 'sell', 1, params={'reduceOnly': True}) can close positon on FTX, but I don't find the right way to deal on OKX exchange. Could you please let me know how to close postion on OKX?
Kim
  • 11
  • 1
1 2
3
14 15