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.

ccxt.base.errors.BadSymbol: ftx does not have market symbol BTC/USD:USD

See original GitHub issue

I want to buy BTC/USD perpetual contract at market price

But is shows error as follows: ccxt.base.errors.BadSymbol: ftx does not have market symbol BTC/USD:USD

The code as follows:

symbol = 'BTC/USD:USD'
btc_price = ftx.fetch_ticker("BTC/USD")['bid']
btc_amount = 20 / btc_price
create_order = ftx.create_order(symbol, 'market', 'buy', btc_amount)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
qwe231cvbcommented, Jun 13, 2022

@qwe231cvb your version of CCXT is too old. Please, upgrade to 1.87.8+. Let us know if that does not resolve this issue for you.

When I upgrade to CCXT version 1.87.10, I can use symbol = 'BTC/USD:USD'

0reactions
qwe231cvbcommented, Jun 13, 2022

Characters can now be converted to floats,the code as follows:

ftx.load_markets()
symbol = 'BTC/USD:USD'
market = ftx.market(symbol)
pprint(market['info']['price'])
b = market['info']['price']
a = float(b)
pprint(a)
btc_amount = 20 / a
create_order = ftx.create_order(symbol, 'market', 'buy', btc_amount)
Read more comments on GitHub >

github_iconTop Results From Across the Web

BadSymbol: ftx does not have market symbol B #13512
ccxt -1.84.60 has the problem. ... BadSymbol: ftx does not have market symbol B #13512 ... No branches or pull requests. 2 participants....
Read more >
Python ccxt binance does not have market symbol USDT ...
I am using python ccxt module to create a sell order in some binance ... raise BadSymbol(self.id + ' does not have market...
Read more >
Exchanges — ccxt 2.4.71 documentation
Each class implements the public and private API for a particular crypto exchange. All exchanges are derived from the base Exchange class and...
Read more >
[FTX] Spot-Future Differences
This notebook fetches data from FTX and summarizes the difference between spot and its future price (e.g., BTC/USD and BTC-1231). ... Collecting ccxt==1.40.1 ......
Read more >
CCXT Integration - FTX Exchange
FTX is integrated with CCXT! CCXT is a library used to trade on over 100 cryptocurrency exchanges. It is perhaps the most popular...
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