# Reported issues for CCXT

Pod holds 20 of 24 GitHub reports that passed its relevance review. This can include external user reports, maintainer-confirmed bugs, and concrete feature gaps. Treat them as evidence to inspect, not a count of distinct defects.

Back to [CCXT](/mcp/ccxt).

## Most discussed

### RequestTimeout: timed out due to a ping-pong keepalive missing on time

- OS: linux
- Programming Language version: node v16.17.1
- CCXT version: 2.0.31

```

client = new ccxt.pro['binance']({
      newUpdates: true
    });
while (true) {
              try {
                const trades = await client.watchTrades(symbol);
                //doing things here
              } catch (e) {
                // debugger;
                console.log(e);
                // do nothing and retry on next loop iteration
                // throw e // uncomment…

[Read the thread](https://github.com/ccxt/ccxt/issues/15343) · 2022-10-19 · closed · external user · 32 comments

### [Kucoin] Unable to recreate watchOrderbook after initial sync problem

Hi Fellows!

After initial error on watchOrderbook  "kucoin failed to synchronize WebSocket feed with the snapshot for symbol COV/USDT in 3 attempts": (kucoin.js)
```JavaScript
    retryFetchOrderBookSnapshot (client, message, subscription) {
        const symbol = this.safeString (subscription, 'symbol');
        const messageHash = this.safeString (subscription, 'messageHash');
        // console.log ('fetchOrderBookSnapshot', nonce, previousSequence, nonce >= previousSequence);…

[Read the thread](https://github.com/ccxt/ccxt/issues/14567) · 2022-08-02 · closed · external user · 9 comments

### exception in watch_orders, problem with scheduling watch_orders task

Hi, I have two questions:
1) when I run the code below, the exception below arises
2) when calling asyncio.gather, if I put   _listen_orders_updates(exchange, [c]) at the beginning of the list, everything works (and the exception of point 1) comes up), if I put it at the end, this function is never called and the orders are never watched. It does not make sense to me, am I doing anything wrong with asyncio or there is a problem with watch_orders? 

Thanks

```
import asyncio
from typing…

[Read the thread](https://github.com/ccxt/ccxt/issues/10511) · 2021-11-07 · closed · external user · 9 comments

### ccxtpro - memory leaks on workarounds for reinit websockets

Hi fellows,
currently you offer no possibility to recreate websockets connections/subscriptions in case they go wrong/dead. 
User workarounds have to be created, as you suggested - by creating new Exchange instances. However it is difficult/impossible, as the obsolete Exchange objects references cause memory leaks.

simple snippet:
```javascript

class ExchangeWS {
    constructor(exchangeName, params) {
        this.exchangeName = exchangeName;
        this.params = params;
    }…

[Read the thread](https://github.com/ccxt/ccxt/issues/10786) · 2021-12-06 · closed · external user · 8 comments

### Bybit ccxt.pro watch_positions does not work properly, returns error

### Operating System

Wndows 10

### Programming Languages

Python

### CCXT Version

4.1.97

### Description

This example returns error:
"<class 'ccxt.base.errors.BadSymbol'> bybit does not have market symbol I"

All other  WS watch_ function work well with this symbol 'ICP/USDT:USDT'.
In the error message the symbol is truncated to 1 character.


### Code

```
import ccxt.pro
import asyncio
from pprint import pprint

async def observe_positions(exchange, symbol):…

[Read the thread](https://github.com/ccxt/ccxt/issues/20527) · 2023-12-23 · closed · external user · 7 comments

### [huobi] watchOrderBook unreliable

Hi fellows,
watchOrderBook on huobi is unreliable. The orderbook ends with invalid orders hanging there after several hours. I faced similar issue on kucoin as well, however I am unable to debug it deeper as it is (nearly) impossible to compare watched orderbook with fetchOrderBook. You've got an issue there (https://github.com/ccxt/ccxt/issues/10539), with enhancements to be implemented to facilitate debugging these problems.

Several expensive lessons 5 months ago on kucoin forced me to…

[Read the thread](https://github.com/ccxt/ccxt/issues/12279) · 2022-03-10 · closed · external user · 7 comments

### (fix) Websocket disconnects with 1006 and 1001 errors

Hello,

A solution has been provided by the Hummingbot community for the bug reported in  #14557 and described below. That would be awesome if someone could incorporate the fix within CCXT. 

Thank you,

https://github.com/hummingbot/hummingbot/pull/5723

> The issue seems to be caused by several different root cause, but ending up closing the websocket connection either when HB expects it (1000 would be normal from the websocket with msg reporting the close status) or unexpectedly…

[Read the thread](https://github.com/ccxt/ccxt/issues/15338) · 2022-10-18 · closed · external user · 6 comments

### Error: too much request weight used; IP banned until ...

- OS: Google Cloud Functions
- Programming Language version: Python 3.8
- CCXT version: not sure

Error: ``` ccxt.base.errors.DDoSProtection: binance 418 I'm a teapot {"code":-1003,"msg":"Way too much request weight used; IP banned until 1660090423228. Please use the websocket for live updates to avoid bans." ```

I am getting this error quite often recently, which wasn't the case for a long time using the same code.
Does anyone know any solution for this, and what causes it?

The full…

[Read the thread](https://github.com/ccxt/ccxt/issues/14639) · 2022-08-10 · closed · external user · 5 comments

## Most recent

### fetchMyTradesWs keep application running

### Operating System

Ubuntu Linux

### Programming Languages

_No response_

### CCXT Version

4.1.65

### Description

Hi, when running:

`const trades = await binancePro.fetchMyTradesWs(symbol);
`

What happens is that I successfully receive my trades, but for some reason my process is still "running", while with a rest call (fetchMyTrades), the process ends right after the result is returned.

Maybe is due to the fact that under the hood a watch is created? (and…

[Read the thread](https://github.com/ccxt/ccxt/issues/20615) · 2023-12-31 · closed · external user · 2 comments

### Bitget fetch_ohlcv wrong arguments for Spot historical data

### Operating System

Windows

### Programming Languages

Python

### CCXT Version

4.1.80

### Description

Bitget provides 2 endpoints for ohclv data: last month and historical data.

These 2 endpoints take different arguments in parameter. Historical data endpoint requires "endTime" parameter.
However, if trying to "force" to use the historical endpoint for spot in the *params*, the parameters specified in the query are still the same as the last month data endpoint (ie…

[Read the thread](https://github.com/ccxt/ccxt/issues/20591) · 2023-12-29 · closed · external user · 4 comments

### Bitget fetch_ohlcv wrong start timestamp

### Operating System

Windows

### Programming Languages

Python

### CCXT Version

4.1.80

### Description

Similar issue than https://github.com/ccxt/ccxt/issues/20222.

On Bitget, if specifying only the start timestamp, the result will be starting 1 minute later, which is not consistent with other exchanges behavior. This is due to the way Bitget works: if specifying t start, the candlesticks returned will start at t+1.

Example:…

[Read the thread](https://github.com/ccxt/ccxt/issues/20587) · 2023-12-29 · closed · external user · 0 comments

### Binance SPOT Testnet seems to point to Futures Testnet

### Operating System

Mac

### Programming Languages

_No response_

### CCXT Version

4.1.98

### Description

Hi

I am seeing a strange behaviour. I use CCXT to connect to Binance testnet. If I use my Binance testnet futures account API keys it appears to work fine. however, it doesnt work with Spot. if I put exchange verbose = True, it shows me the Urls pointing to futures testnet. 

**fetch Request**: binance GET https://testnet.binancefuture.com/fapi/v1/leverageBracket..... 

**fetch…

[Read the thread](https://github.com/ccxt/ccxt/issues/20577) · 2023-12-28 · closed · external user · 4 comments

### why websocket function 'watch_order_book_for_symbols' will send rest request?

### Operating System

Ubuntu 20.04

### Programming Languages

Python

### CCXT Version

4.1.86

### Description

When I use the ccxt.pro websocket function 'binance.watch_order_book_for_symbols', my IP address is always be banned. so I print the verbose and find the function will send the rest request.
If the rest requests appear in the start stage will be known as the connection, but over a long time, the function will appear as continuous rest requests, and it will consume the…

[Read the thread](https://github.com/ccxt/ccxt/issues/20562) · 2023-12-27 · closed · external user · 2 comments

### AttributeError 'Retry' object has no attribute 'method_whitelist'

### Operating System

Windows 10

### Programming Languages

Python

### CCXT Version

4.1.99

### Description

For every method I am unable to retrieve any data through various exchanges. It seems to be only the case when api keys are passed into the ccxt class. 

It does seem to be working on my other computer, so also not sure whether it is a local error. 

### Code

```
  
client = ccxt.bybit({'apiKey': "", 'secret': ""})
client.fetch_balance()
```
Traceback (most recent call last):…

[Read the thread](https://github.com/ccxt/ccxt/issues/20561) · 2023-12-26 · closed · outside contributor · 2 comments

### TypeError in bitget.parseOrder due to Response String not being Parsed to Object

### Operating System

Ubuntu

### Programming Languages

JavaScript

### CCXT Version

4.1.98

### Description

Call to **.fetchOrder()** leads to the following error.

```
TypeError: Cannot use 'in' operator to search for 'posSide' in undefined
    at bitget.parseOrder (/sampo/node_modules/ccxt/dist/cjs/src/bitget.js:3849:44)
    at bitget.fetchOrder (/sampo/node_modules/ccxt/dist/cjs/src/bitget.js:4984:21)
    at process.processTicksAndRejections…

[Read the thread](https://github.com/ccxt/ccxt/issues/20555) · 2023-12-26 · closed · external user · 1 comment

### Bingx watch_ohlcv can not set market type to "swap" successfully

### Operating System

not relevant

### Programming Languages

Python

### CCXT Version

4.1.97

### Description

Hi,

The watch_ohlcv function in pro/bingx.py does not provide the "time" value for "swap" in the response, but instead returns None. E.g.,
`[[None, 43725.2, 43894.2, 43719.8, 43831.0, 581.0491]].
`
The root cause is that Bingx sends the OHLCV time in the 'T' parameter for "swap", as opposed to the expected "t" used in "spot". This bug was addressed and fixed in…

[Read the thread](https://github.com/ccxt/ccxt/issues/20533) · 2023-12-24 · closed · external user · 1 comment

### No response from BitMart watch_orders channel

### Operating System

Windows 10

### Programming Languages

_No response_

### CCXT Version

4.1.97

### Description

When I place an order, I get no response from the watch_orders function.
When I downgrade to ccxt 4.1.87, the watch_orders function works as expected.

### Code

```
 # Python
import ccxt.pro
from asyncio import run, gather
from pprint import pprint


async def place_delayed_order(exchange, symbol, amount, price):
    try:
        await…

[Read the thread](https://github.com/ccxt/ccxt/issues/20524) · 2023-12-23 · closed · external user · 1 comment

### Bitget OHLCV issues after 4.1.87

### Operating System

_No response_

### Programming Languages

JavaScript

### CCXT Version

_No response_

### Description

After 4.1.87 bitget OHLCV futures “1d” is having problems. 4.1.86 is all good.

if I'm taking a historical 1d like yesterday or any, it doesn't fetch the correct timestamp. this happens starting from 4.1.87. 4.1.86 is working correctly

bitget.fetchOHLCV(BTC/USDT:USDT, 1d, 1702684800000) or bitget.fetchOHLCV(BTC/USDT:BTC, 1d, 1702684800000)

### Code

```
  

```

[Read the thread](https://github.com/ccxt/ccxt/issues/20521) · 2023-12-23 · closed · external user · 2 comments

### Missing time info in Bingx watch_ohlcv response for "swap"

### Operating System

Linux/Windows

### Programming Languages

Python

### CCXT Version

4.1.96

### Description

Hi,

I've encountered an issue where the Bingx watch_ohlcv response returns "None" for the time information specifically for 'swap'. For example: 
`[[None, 43982.4, 44000.0, 43830.0, 43870.0, 1002.9271]]`

To cross-check:
1) I ran the same code for "spot", and it worked correctly.
2) I changed the exchange to Binance, and both spot and futures worked well.…

[Read the thread](https://github.com/ccxt/ccxt/issues/20515) · 2023-12-23 · closed · external user · 1 comment

### Binanceus watch_balance CCXTPRO does not work

await client.watch_balance() never produces anything, but await client.fetch_balance() does

[Read the thread](https://github.com/ccxt/ccxt/issues/14763) · 2022-08-21 · closed · external user · 2 comments

The remaining reports are on [the project's issue tracker](https://github.com/ccxt/ccxt/issues).
