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
3
votes
0 answers

Phemex CCXT Python Add Stop Loss and Take Profit to orders

Hello fairly simple issue here, I am simply trying to use CCXT on Python to place margin limit orders on Phemex. Almost everything works great, I have the orders successfully going through. The issue I'm running into is adding a take profit and stop…
Tristan Neate
  • 83
  • 1
  • 7
3
votes
1 answer

create market order on FTX 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'm trying to create an API endpoint that…
Steve
  • 175
  • 1
  • 3
  • 13
3
votes
1 answer

How to use fetchBalance() parameters with ccxt

I'm new to ccxt and I'm trying to fetch my balance in USDT. This information is included in what the following code returns to me: (async () => { console.log (await exchange.fetchBalance ()) }) () But it also returns a lot of other data that I…
Nico
  • 404
  • 6
  • 17
3
votes
2 answers

How to get historical data with one minute interval?

I need to get historical trading data with one minute interval. I'm trying to get it using ccxt. But I'm getting several cycling values. What did I do wrong? import ccxt import pandas as pd import numpy as np import…
Ufx
  • 2,595
  • 12
  • 44
  • 83
3
votes
2 answers

Why is my function ending (using external library)

I need your help with some error handling. I'm using an external library but have no clue of what's happening with the error. Here's my code: //file name = playground.js var ccxt = require("ccxt"); ccxt.exchanges.map(r => { let…
Martin Carre
  • 1,157
  • 4
  • 20
  • 42
2
votes
1 answer

Getting multiple cryptos' ohlc values in ccxt or binance python api?

I'm trying to create an automated bot according to my strategy but I'm struggling with a few things: 1- In ccxt, I can get OHLC data of a specified symbol. But I couldn't find any data on both documentation and google etc, about getting multiple…
yktrcn
  • 29
  • 1
  • 6
2
votes
1 answer

Optimal grid trading strategy when price out of grid bounds

I'm considering various grid trading strategies and I'm wondering what's the optimal action (if any) to take when the price goes out of grid bounds. In the image below, the price is within a size 4 grid, with 2 buys below and 2 sells above. Say the…
wraithie
  • 343
  • 1
  • 6
  • 19
2
votes
1 answer

Get futures symbol list with CCXT nodeJS

Hi I want to get futures symbol list of coinex broker but exchange.loadMarkets only load spot symbols
Fardin
  • 23
  • 3
2
votes
1 answer

How to get spot order and price data with bybit python api?

In the official bybit api, the api for spot seems to be missing. The inverse perp api is still there, and you can get the order and price as follows import bybit client = bybit.bybit(test=False, api_key="yyyy",…
komandap
  • 87
  • 2
  • 7
2
votes
2 answers

Is there a Binance API endpoint to close all positions?

Is there a specific binance futures API endpoint with which you automatically close all positions? There is such an option in the GUI. Right now I can only imagine getting amounts of all positions and than selling that amount, but is there an easier…
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
2
votes
3 answers

How to created pandasData for backtrader with ccxt

I am trying to back test a strategy using backtrader. Most of the examples I have seen only are using a csv file. I was wondering if it is possible to just get data from an exchange and turn it into pandas dataframe and then use backtrader? When I…
Sarah James
  • 431
  • 5
  • 19
2
votes
1 answer

How to set a Take-Profit limit order with Binance

A sample code of mine: import ccxt binance = ccxt.binance({ 'enableRateLimit': True, 'apiKey': '****', 'secret': '****', 'options': {'defaultType': 'margin'} }) binance.create_order('BTC/USDT', 'take_profit_limit', 'buy', 0.1,…
CS1994
  • 143
  • 2
  • 7
2
votes
1 answer

Binance api futures error: {"code":-2015,"msg":"Invalid API-key} using private_post_order_oco (but ID works with everything else)

I am having a problem using the Binance Python API. I am using Python3.7 on Ubuntu Basically, when making the call below, I get an error: {"code":-2015,"msg":"Invalid API-key, The thing is that this ID has worked fine on the Binance TESTNET for…
Casey Harrils
  • 2,793
  • 12
  • 52
  • 93
2
votes
2 answers

Unable to set the STOP-LOSS limit order using Binance Python API

I am attempting to create a LONG TRADE that will contain a BUY ORDER and a STOP-LOSS using Python asyncio, ccxt API (which is calling the Binance API for the Binance Crypto Exchange). First I create the BUY ORDER. Afterwards, I am waiting until the…
Casey Harrils
  • 2,793
  • 12
  • 52
  • 93
2
votes
1 answer

CCXT / python - custom requests?

Is there any possibility of making custom GET or POST request with the CCXT API? I can't find some of them in the API requests list, for example, GET /api/account/v3/asset-valuation or POST /api/margin/v3/accounts/btc-usdt/leverage{"leverage":"10"}…
1
2
3
14 15