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
1
vote
0 answers

Why do I get this Python script execution error? - ccxt binance code is working well on Windows, but running error on Ubuntu, Google Cloud

It is a strange phenomenon. The code works normally on Windows (PC), but an error message occurs in Google Cloud as well as AWS, Azure Given the following code: import ccxt import pandas as pd from pandas import DataFrame import numpy as np import…
Json 0x
  • 11
  • 4
1
vote
3 answers

Create Contract order with Take Profit and Stop Loss with ccxt

With ccxt library I can create orders on phemex. I use the following command: order = exchange.create_order(symbol, type, side, amount, price, params) But I want to do a leverage (contract) trade, how to set that? And how to change if the order is…
Dani
  • 29
  • 1
  • 8
1
vote
1 answer

ccxt FTX long/short position

i am trying to open and close short positions on FTX using ccxt with python. I do not find any kind of information or examples about how to do this. Does anyone know how to do that, or has any example on opening and closing short positions using…
dvlt
  • 41
  • 1
  • 3
1
vote
1 answer

How To Handle CCXT Binance Intermittent Network Error

I stumbled across an issue which causes the below script to throw an error every so often, like every other day on average. The script is being run 24/7 and dozens of instances similar to it are being run simultaneously. That seems to be relevant…
user3080698
  • 61
  • 1
  • 1
  • 9
1
vote
1 answer

CCXT binance fetch_ohlcv function

I wanted to get crypto market data from binance api with CCXT using the fetch_ohlcv(), but received error when running the code below. I have tried running without the since keyword and it worked fine. May I ask what is wrong with my startTime…
mkmkmkmk
  • 47
  • 1
  • 6
1
vote
1 answer

Can I get original exchange response from CCXT API call?

Is there a possibility to get the original response from the exchange (e.g. Binance)? Since CCXT offers the possibility to overrride API params, I thought it might be possible to get the original response as well. Right now I'm overriding the CCXT…
Joël Brigate
  • 237
  • 2
  • 13
1
vote
1 answer

How to use amountToPrecision ccxt library

I have quite hard time to understand how to use this. I'm playing with testing account, and succeeded to "buy" xrp with my usdt like this: NOTE: I use binance, and my orders is based on quote price. params = { 'quoteOrderQty': 20, } …
Masksway
  • 205
  • 3
  • 11
1
vote
1 answer

Can't install ccxt package becouse of pycares error

I am using python 3.9.2. I wanted to install ccxt package in a virtual environment I have created python3 -m venv venv_cryptofolio and I encountered an error, which I'm posting below (but not in full, because it's too big compared to the problem…
1
vote
0 answers

"Insufficient funds" error for short selling on Kraken with CCXT

I'm attempting to short sell with leverage on Kraken via the CCXT API with the following example code: exchange = ccxt.kraken({ 'apiKey': '****', 'secret': '****' }) amount = ((exchange.fetch_balance()['USD']['total'])-10) /…
CS1994
  • 143
  • 2
  • 7
1
vote
2 answers

Unable to place a trailing stop loss order with ccxt

I'm running an algorithm to predict prices and enter trades for me using the ccxt API in python. I wish to execute a trailing stop loss order and I enter such a long position like this: exchange = ccxt.binance({ 'enableRateLimit': True, …
CS1994
  • 143
  • 2
  • 7
1
vote
1 answer

CCXT Binance Future Order

I don't know Python very well and I'm trying to make a bot for Binance Futures with Python. And I encounter this error: client.futures_create_order()( TypeError: futures_create_order() missing 1 required positional argument: 'self' Here is my…
DarkPassenger
  • 11
  • 1
  • 4
1
vote
0 answers

ccxt format fetchtickers for bittrex

I can do the following to retrieve and write my holdings on Bittrex to a file so I can use that in another program: import ccxt exchange_id = 'bittrex' exchange_class = getattr(ccxt, exchange_id) exchange = exchange_class({ 'apiKey':…
Miguel Terlaak
  • 175
  • 1
  • 13
1
vote
1 answer

"Timestamp ahead 1000ms" error on binance api?

I'm developing on a mac and got this weird error def binance_object_creation(): api_key = 'my api key' secret = 'my secret no' binance = ccxt.binance(config={ 'apiKey': api_key, 'secret': secret, 'enableRateLimit': True, 'options':…
Taewoo.Lim
  • 211
  • 3
  • 14
1
vote
0 answers

Unable to install ccxt.pro via pipenv - pipenv requires an #egg fragment for version controlled dependencies

I try to install ccxt.pro via pipenv. I usually use python venv module to create virtual environment but I try to work with pipenv too. In ccxt.pro documentation, package should be installed via pip3 over https or ssh. Via github user and password I…
dorinand
  • 1,397
  • 1
  • 24
  • 49
1
vote
2 answers

"amount is invalid" error when i try to withdraw in Bitmex (ccxt)

This is my route: router.post('/withdraw', async (req, res, next) => { const {code, address, amount, otpToken, currency } = req.body; const exchange = await new ccxt.bitmex(); exchange.apiKey = "MY - KEY"; exchange.secret = "MY - SECRET"; …
Nicolas Urman
  • 153
  • 1
  • 1
  • 9