sammchardy / python-binance-chain

Binance Chain Exchange API python implementation for automated trading
http://python-binance-chain.rtfd.io
MIT License
302 stars 132 forks source link

HttpApiClient does not use provided api_url #22

Closed skinderis closed 5 years ago

skinderis commented 5 years ago

I try to initiate http client: client = HttpApiClient(api_url='https://custom-url.com')

but it doesn't use https://custom-url.com, it uses PROD env, how can I provide my custom api url?

sammchardy commented 5 years ago

Hi @skinderis there is some out of date docs around that.

Check the docs around the envinronment here https://github.com/sammchardy/python-binance-chain#environments

from binance_chain.environment import BinanceEnvironment

# create custom environment
my_env = BinanceEnvironment(api_url='https://custom-url.com', wss_url="<wss_url>", hrp="<hrp>")
client = HttpApiClient(env=my_env)
skinderis commented 5 years ago

Yeah, I managed to handle it. Just wanted to point it out as some people might get lost here. Thanks!