Support custom proxy configuration to enable >4 simultaneous streams per IP
I’m currently hitting the 4-stream-per-IP limit when using PocketOptionAsync for real-time candle subscriptions and there doesn’t appear to be any proxy configuration option.
Is there a supported way to pass an HTTP/SOCKS proxy (e.g. proxy_url) into PocketOptionAsync or its Config so that each WebSocket connection goes through that proxy?
If not, could proxy support be added (e.g. a proxy_url parameter) so I can spin up multiple instances—each on a different proxy—and exceed the per-IP subscription cap?
Any guidance or recommended workaround would be appreciated.
The 4-stream limit you're encountering is actually a restriction from Pocket Option's platform itself - they only allow real-time candle data for a maximum of 4 assets simultaneously per session. However, there are a couple of potential workarounds you could try:
Multiple Instances: You can create multiple PocketOptionAsync instances even with the same SSID. Each instance should theoretically be able to handle its own set of 4 subscriptions. Something like:
# First instance for 4 subscriptions
client1 = PocketOptionAsync(your_ssid)
# Second instance for 4 more subscriptions
client2 = PocketOptionAsync(your_ssid)
Separate Accounts: Since I haven't extensively tested the multiple instances approach with the same SSID, a more reliable solution would be to: Create a secondary Pocket Option account using a temporary email service Use that account's SSID purely for data collection Keep your main account (and its SSID) for actual trading For example:
# Data collection client
data_client = PocketOptionAsync(data_collection_ssid)
# Trading client
trading_client = PocketOptionAsync(your_real_ssid)
# Use data_client for subscriptions
await data_client.subscribe_symbol("EURUSD")
# Use trading_client for actual trades
await trading_client.buy("EURUSD", amount, time)
This way you can separate your concerns: one account for data collection and another for trading, avoiding any potential issues with session management.
Let me know if you try either approach and how it works out for you!
I have tried second approach. It didn’t help me, and my IP got banned :) Proposed proxy feature or any other walkaround would be great
Great! Thanks for your feedback 😀