Giter Club home page Giter Club logo

Comments (11)

samgermain avatar samgermain commented on September 24, 2024

What are you asking? The method works fine for me

Python v3.9.6
CCXT v4.3.29

binance.watchTicker(BTC/USDT)
{'ask': 69522.55,
 'askVolume': 0.00583,
 'average': 69501.945,
 'baseVolume': 273.02608,
 'bid': 69522.49,
 'bidVolume': 0.00403,
 'change': 45.67,
 'close': 69524.78,
 'datetime': '2024-05-23T04:58:03.552Z',
 'high': 74739.0,
 'info': {'A': '0.00583000',
          'B': '0.00403000',
          'C': 1716440283552,
          'E': 1716440283553,
          'F': 1461264,
          'L': 1547582,
          'O': 1716353883552,
          'P': '0.066',
          'Q': '0.00014000',
          'a': '69522.55000000',
          'b': '69522.49000000',
          'c': '69524.78000000',
          'e': '24hrTicker',
          'h': '74739.00000000',
          'l': '62098.00000000',
          'n': 86319,
          'o': '69479.11000000',
          'p': '45.67000000',
          'q': '18992345.03476140',
          's': 'BTCUSDT',
          'v': '273.02608000',
          'w': '69562.38405782',
          'x': '69479.11000000'},
 'last': 69524.78,
 'low': 62098.0,
 'open': 69479.11,
 'percentage': 0.066,
 'previousClose': 69479.11,
 'quoteVolume': 18992345.0347614,
 'symbol': 'BTC/USDT',
 'timestamp': 1716440283552,
 'vwap': 69562.38405782}

from ccxt.

yyqiekenao avatar yyqiekenao commented on September 24, 2024

你问的是什么?这个方法对我来说很有效。

Python v3.9.6 CCXT v4.3.29

binance.watchTicker(BTC/USDT)
{'ask': 69522.55,
 'askVolume': 0.00583,
 'average': 69501.945,
 'baseVolume': 273.02608,
 'bid': 69522.49,
 'bidVolume': 0.00403,
 'change': 45.67,
 'close': 69524.78,
 'datetime': '2024-05-23T04:58:03.552Z',
 'high': 74739.0,
 'info': {'A': '0.00583000',
          'B': '0.00403000',
          'C': 1716440283552,
          'E': 1716440283553,
          'F': 1461264,
          'L': 1547582,
          'O': 1716353883552,
          'P': '0.066',
          'Q': '0.00014000',
          'a': '69522.55000000',
          'b': '69522.49000000',
          'c': '69524.78000000',
          'e': '24hrTicker',
          'h': '74739.00000000',
          'l': '62098.00000000',
          'n': 86319,
          'o': '69479.11000000',
          'p': '45.67000000',
          'q': '18992345.03476140',
          's': 'BTCUSDT',
          'v': '273.02608000',
          'w': '69562.38405782',
          'x': '69479.11000000'},
 'last': 69524.78,
 'low': 62098.0,
 'open': 69479.11,
 'percentage': 0.066,
 'previousClose': 69479.11,
 'quoteVolume': 18992345.0347614,
 'symbol': 'BTC/USDT',
 'timestamp': 1716440283552,
 'vwap': 69562.38405782}

The response sometimes has an None value
{"symbol": null, "timestamp": 1716431646502, "datetime": "2024-05-23T02:34:06.502Z", "high": null, "low": null, "bid": null, "bidVolume": null, "ask": null, "askVolume": null, "vwap": null, "open": null, "close": null, "last": null, "previousClose": null, "change": null, "percentage": null, "average": null, "baseVolume": null, "quoteVolume": null, "info": {"result": null, "id": 1}}

from ccxt.

samgermain avatar samgermain commented on September 24, 2024

The response sometimes has an None value

Can you explain how to reproduce this error? I'm not receiving it

from ccxt.

yyqiekenao avatar yyqiekenao commented on September 24, 2024

This problem will occur if you subscribe for a long time

from ccxt.

samgermain avatar samgermain commented on September 24, 2024

This problem will occur if you subscribe for a long time

can you please set verbose to true for your exchange object and share the output of that

from ccxt.

ttodua avatar ttodua commented on September 24, 2024

@yyqiekenao as commented by @samgermain it would be ideal if you try to enable verbose mode and provide us what raw-data is coming in which causes those nulled valued.

from ccxt.

yyqiekenao avatar yyqiekenao commented on September 24, 2024

@yyqiekenao as commented by @samgermain it would be ideal if you try to enable verbose mode and provide us what raw-data is coming in which causes those nulled valued.

It's difficult to reproduce, but the log output does contain None.

from ccxt.

yyqiekenao avatar yyqiekenao commented on September 24, 2024

This problem will occur if you subscribe for a long time

can you please set verbose to true for your exchange object and share the output of that

2024-05-27T07:06:35.437Z connecting to wss://stream.binance.com:9443/ws/0 with timeout 10000 ms
2024-05-27T07:06:36.062Z connected
2024-05-27T07:06:36.062Z ping loop
2024-05-27T07:06:36.063Z sending {'method': 'SUBSCRIBE', 'params': ['ldousdt@ticker'], 'id': 1}
2024-05-27T07:06:36.303Z pong WSMessage(type=<WSMsgType.PONG: 10>, data=bytearray(b''), extra='')
2024-05-27T07:06:36.303Z message {"result":null,"id":1}

from ccxt.

carlosmiei avatar carlosmiei commented on September 24, 2024

@yyqiekenao This message is expected and is received every time, so I don't think it's causing the crash

2024-05-27T08:13:08.302Z onMessage { result: null, id: 1 }

from ccxt.

yyqiekenao avatar yyqiekenao commented on September 24, 2024

@yyqiekenao此消息是预期的,并且每次都会收到,因此我认为它不是导致崩溃的原因

2024-05-27T08:13:08.302Z onMessage {结果:null,id:1}

tks

from ccxt.

ttodua avatar ttodua commented on September 24, 2024

@yyqiekenao it would be good if you somehow log the incoming raw data, and whenever that error happens, paste here the related last part of log, it would help us to undersatnd and fix it.

from ccxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.