question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BadSymbol: binance does not have market symbol BTC/USDT

See original GitHub issue
  • OS: Linux
  • Programming Language version: NodeJS
  • CCXT version: 2.2.45

My code has been running fine for a couple of years, yet today all of a sudden, I can’t fetch BTC/USDT from Binance spot market anymore. Below is the minimal code that I could use to reproduce the error.

const ccxt = require("ccxt");

async function test() {
  const exchange = new ccxt["binance"]();

  const fetchSince = Date.now() - 5 * 60 * 1000;

  const result = await exchange.fetchOHLCV("BTC/USDT", "1m", fetchSince, 5);
  console.log("result", result);
}

test();
BadSymbol: binance does not have market symbol BTC/USDT
    at binance.market (/DeepTrade_keras/nodeScripts/temp/node_modules/ccxt/js/base/Exchange.js:2437:15)
    at binance.fetchOHLCV (/DeepTrade_keras/nodeScripts/temp/node_modules/ccxt/js/binance.js:2472:29)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async test (/DeepTrade_keras/nodeScripts/temp/test.js:8:18) {
  constructor: [class BadSymbol extends BadRequest]
}

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AdolfoVillaloboscommented, Nov 30, 2022

Hello to everyone. I’m having a similar problem with the binance api (my code also runs on a US based cluster). I haven’t been able to find any official source

@ChenLi0830 exactly, We were also impacted by this, and yeah was a recent change from Binance. Basically, you will need to reallocate the instance or route the requests out of the US using a proxy

Hello to everyone. Do you have any official source for this event? I experimenting a similar problem in my USA-based cluster, and haven’t been able to find any official statement. I would greatly appreciate it if you could share it. Thanks!

1reaction
ChenLi0830commented, Nov 30, 2022

Thanks that makes sense. I am closing this issue since the root cause is not from ccxt. You might want to consider using a more explicit error message though. Thanks for the good work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ccxt.base.errors.BadSymbol: binance does not have market ...
Currently, I am getting Error of Binance testnet ccxt.base.errors.BadSymbol: binance does not have market symbol BTC/USDT, what is the issue, while the sam....
Read more >
Python ccxt binance does not have market symbol USDT/BTC ...
Just replace "USDT/BTC" to "BTC/USDT" . "BTC/USDT" means the amount USDT per 1 BTC and "USDT/BTC" means the amount of BTC per 1...
Read more >
Exchanges — ccxt 2.4.71 documentation
symbols : A non-associative array (a list) of symbols available with an exchange, sorted in alphabetical order. These are the keys of the...
Read more >
ccxt-dev/ccxt - Gitter
Is CCXT Pro a code library, like ccxt but with a unified WS API to communicate with ... The same endpoint is used...
Read more >
Trading Binance Perpetuals and COIN-M Futures - CoinsBench
Contract specification you can get from ccxt binance.py: ... Unlike BTCUSDT Perpetual which is a linear, BTCUSD is an inverse, “contractSize” is 100....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found