bmoscon / cryptostore

A scalable storage service for cryptocurrency data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'BTC-USDT' is not supported on BINANCE

stupidanon opened this issue · comments

Describe the bug
No symbols are available on any exchange.

To Reproduce
Steps to reproduce the behavior:

  1. run command docker run -e EXCHANGE=COINBASE -e CHANNELS=trades -e SYMBOLS='ETH-BTC' -e BACKEND=TCP -e HOST=tcp://127.0.0.1 -e PORT=8080 ghcr.io/bmoscon/cryptostore:latest
  2. Try with any combination of exchange and symbols, even tried with MONGO backend. All give the same error:
C:\Users\stupidanon\Desktop\cryptostorecommands>docker run -e EXCHANGE=COINBASE -e CHANNELS=trades -e SYMBOLS='ETH-BTC' -e BACKEND=TCP -e HOST=tcp://127.0.0.1 -e PORT=8080 ghcr.io/bmoscon/cryptostore:latest
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/cryptofeed/exchange.py", line 137, in std_symbol_to_exchange_symbol
    return self.normalized_symbol_mapping[symbol]
KeyError: "'ETH-BTC'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/cryptostore.py", line 161, in <module>
    main()
  File "/cryptostore.py", line 155, in main
    cfg = load_config()
  File "/cryptostore.py", line 150, in load_config
    return EXCHANGE_MAP[exchange](candle_intterval=candle_interval, symbols=symbols, channels=channels, config=config, callbacks=cbs)
  File "/usr/local/lib/python3.9/site-packages/cryptofeed/exchanges/coinbase.py", line 53, in __init__
    super().__init__(callbacks=callbacks, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/cryptofeed/feed.py", line 114, in __init__
    symbols = [self.std_symbol_to_exchange_symbol(symbol) for symbol in symbols]
  File "/usr/local/lib/python3.9/site-packages/cryptofeed/feed.py", line 114, in <listcomp>
    symbols = [self.std_symbol_to_exchange_symbol(symbol) for symbol in symbols]
  File "/usr/local/lib/python3.9/site-packages/cryptofeed/exchange.py", line 139, in std_symbol_to_exchange_symbol
    raise UnsupportedSymbol(f'{symbol} is not supported on {self.id}')
cryptofeed.exceptions.UnsupportedSymbol: 'ETH-BTC' is not supported on COINBASE

Operating System:

  • Windows 10

Cryptofeed Version
Latest

I noticed

KeyError: "'ETH-BTC'"

see ' inside "

I think you problem is related to the fact your are invoking docker cli from a system which is different from Linux and so the way you are sending environment variable may be different (if using cmd on Windows, PowerShell on Windows or Bash on Linux...)

My opinion is that a docker-compose.yml file could simplify that.

https://www.composerize.com/ can help to convert docker cli to docker-composer.yml

Moreover if I where @bmoscon I'd add "..." in the exception to make this kind of error more explicit

Maybe a first try could be to use BACKEND=TTY ?