Coder Social home page Coder Social logo

Comments (8)

carlosmiei avatar carlosmiei commented on June 4, 2024 1

@egabosh Thanks, we found indeed an issue but we will patch it shortly.

from ccxt.

carlosmiei avatar carlosmiei commented on June 4, 2024

Hello @egabos, thanks for reporting it. Can you please post a verbose log?

How to enable the verbose log:

await exchange.load_markets()
exchange.verbose = True

from ccxt.

egabosh avatar egabosh commented on June 4, 2024

Moin,

here the output:

fetch Request: binance GET https://api.binance.com/sapi/v1/convert/tradeFlow?timestamp=1714028108127&startTime=1691618400000&endTime=1693519200000&limit=200&recvWindow=10000&signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX RequestHeaders: {'X-MBX-APIKEY': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'User-Agent': 'python-requests/2.28.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'} RequestBody: None

fetch Response: binance GET https://api.binance.com/sapi/v1/convert/tradeFlow?timestamp=1714028108127&startTime=1691618400000&endTime=1693519200000&limit=200&recvWindow=10000&signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 200 ResponseHeaders: {'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Thu, 25 Apr 2024 06:55:08 GMT', 'Server': 'nginx', 'Vary': 'Accept-Encoding', 'X-SAPI-USED-UID-WEIGHT-1M': '3000', 'Strict-Transport-Security': 'max-age=31536000; includeSubdomains', 'X-Frame-Options': 'SAMEORIGIN', 'X-Xss-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Security-Policy': "default-src 'self'", 'X-Content-Security-Policy': "default-src 'self'", 'X-WebKit-CSP': "default-src 'self'", 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, HEAD, OPTIONS', 'Content-Encoding': 'gzip', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 def5acc189db6e2856a956225d5cd100.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FRA56-P6', 'X-Amz-Cf-Id': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'} ResponseBody: {"list":[{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"USDT","fromAmount":"10.5","toAsset":"SFP","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693320370590,"orderType":"MARKET","side":"BUY"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"USDT","fromAmount":"10.5","toAsset":"KDA","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693322165993,"orderType":"MARKET","side":"BUY"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1534097592974412619,"orderStatus":"SUCCESS","fromAsset":"USDT","fromAmount":"1.0000000","toAsset":"DOT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693328465806,"orderType":"MARKET","side":"BUY"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"BNB","fromAmount":"1.00000008","toAsset":"USDT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693341057389,"orderType":"MARKET","side":"SELL"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"ANT","fromAmount":"1.0000000","toAsset":"USDT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693351849368,"orderType":"MARKET","side":"SELL"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"KDA","fromAmount":"1.0000000","toAsset":"USDT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693366248195,"orderType":"MARKET","side":"SELL"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"ADA","fromAmount":"1.0000000","toAsset":"USDT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693406750163,"orderType":"MARKET","side":"SELL"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXa","orderId":1,"orderStatus":"SUCCESS","fromAsset":"DYDX","fromAmount":"1.0000000","toAsset":"USDT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693407662909,"orderType":"MARKET","side":"SELL"},{"quoteId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXX","orderId":1,"orderStatus":"SUCCESS","fromAsset":"BNB","fromAmount":"1.0000000","toAsset":"USDT","toAmount":"1.0000000","ratio":"1.0000000","inverseRatio":"1.0000000","createTime":1693409448970,"orderType":"MARKET","side":"SELL"}],"startTime":1691618400000,"endTime":1693519200000,"limit":200,"moreData":false}
Traceback (most recent call last):
  File "/ccxt/examples/py/fetch-orders.py", line 56, in <module>
    print(exchange.fetchConvertTradeHistory(limit=200, since=1691618400000, params={'until': 1693519200000}))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/binance.py", line 11884, in fetch_convert_trade_history
    return self.parse_conversions(rows, fromCurrencyKey, toCurrencyKey, since, limit)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/base/exchange.py", line 5703, in parse_conversions
    return self.filter_by_currency_since_limit(sorted, code, since, limit)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/base/exchange.py", line 4909, in filter_by_currency_since_limit
    return self.filter_by_value_since_limit(array, 'currency', code, since, limit, 'timestamp', tail)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/base/exchange.py", line 2065, in filter_by_value_since_limit
    entryFiledEqualValue = entry[field] == value
                           ~~~~~^^^^^^^
KeyError: 'currency'

XXXX'ed some things out and set amount/Ratios to 1.00000 but looks like the response from binance is OK.

from ccxt.

egabosh avatar egabosh commented on June 4, 2024

Great, thank you!

from ccxt.

ttodua avatar ttodua commented on June 4, 2024

@egabosh the PR was merged, in few hours update your package and retry, the issue should be gone. if not, let us know again. thanks

from ccxt.

carlosmiei avatar carlosmiei commented on June 4, 2024

@egabosh We just released a new version, can you please update your ccxt version and try again?

from ccxt.

egabosh avatar egabosh commented on June 4, 2024

Thanks a lot! I am now receiving data.
But there seem to be other problems.

If I enter a period of more than 6 months, I get nothing or '[]'.

If there are tokens in the selected period that are no longer traded on Binance, I get the following error:

Traceback (most recent call last):
  File "/ccxt/examples/py/fetch-orders.py", line 57, in <module>
    print(exchange.fetchConvertTradeHistory(limit=200, since=1672527600000, params={'until': 1688248800000}))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/binance.py", line 11886, in fetch_convert_trade_history
    return self.parse_conversions(rows, code, fromCurrencyKey, toCurrencyKey, since, limit)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/base/exchange.py", line 5698, in parse_conversions
    toCurrency = self.currency(toId)
                 ^^^^^^^^^^^^^^^^^^^
  File "/ccxt/python/ccxt/base/exchange.py", line 4659, in currency
    raise ExchangeError(self.id + ' does not have currency code ' + code)
ccxt.base.errors.ExchangeError: binance does not have currency code TOMO

from ccxt.

egabosh avatar egabosh commented on June 4, 2024

Created new issues for this.
#22287
#22289

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.