-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aiohttp request with proxy params in ccxt.async #358
Comments
Hi! Thx for opening this issue! I'll add support for passing the existing proxy property to the session in a few minutes. |
This feature is available as of 1.9.214+. Cheers! |
Thank you very much. If you don't mind, could you show me how to use it? |
Just like you would do with any other property of a class instance: # initialization
import ccxt.async as ccxt
exchange = ccxt.bittrex ({
'aiohttp_proxy': YOUR_PROXY,
})
# or
exchange = ccxt.bittrex ()
exchange.aiohttp_proxy = YOUR_PROXY
# the rest of your code goes here, fetching tickers, orderbooks, etc... |
@kroitor Thank you :) |
@kroitor I think non-async ccxt module doesn't support proxy too. When I try it, it doesn't work... Can you check it please? |
@kroitor I got it. I didn't know about the concept of CORS proxies. When I tried it using non-async module again just before, I got an error message from bittrex, saying some reasons like DDos Protection or rate-limiting. |
Yes, see here ;) Basically, all your questions most likely have already been answered somewhere nearby ;) Also, I'd recommend reading the Manual and browsing through examples. Just take a look around ;) That is until we implement the improved support for proxies, and we will notify our users of it then. Stay tuned, more updates coming soon ) |
@kroitor Thank you. I always appreciate your effort. |
I want to use |
@xgdgsc without seeing your instantiation code it's hard to tell the reason, but most likely you don't need to use both .proxy and .aiohttp_proxy. The |
I just want to make sure when I set |
@xgdgsc it should (we tested it earlier). Let us know if you have any difficulties with it. |
OK. Thanks! |
aiohttp_proxy seems not supporting socks5 proxy. ccxt version 1.18.195. |
Today, 19/06/2019, do we have support for SOCKS4 and SOCKS5 proxies for aiohttp_proxy param? If so, any exemple on using it? |
@owneroxxor using an external session + socks connector could work:
The example code could look close to this: import ccxt.async_support as ccxt
import aiohttp
import aiohttp_socks
connector = aiohttp_socks.SocksConnector.from_url('socks5://user:[email protected]:1080')
session = aiohttp.ClientSession(connector=connector)
exchange = ccxt.binance({
'session': session,
'enableRateLimit': True,
# ...
})
# ... Make sure you |
Wow awsome! I can bet many out there were searching for this. Thanks a lot.
|
Hi everyone, I am using to a proxy of smartproxy and this is not work. proxy: http://username:[email protected]:7000
Thanks |
Hollaex :: fix reconnection problem
Hello.
I want to fetch orderbooks from bittrex using
ccxt.async
through my proxy server.I know that
fetch_order_book
usesaiohttp
module in it, and I want to pass my proxy address toaiohttp.ClientSession().get()
as a parameter, as shown below.So, I think I need to override
fetch_order_book()
.How do I get through this?
The text was updated successfully, but these errors were encountered: