
On a Tuesday I opened my trading dashboard and every number was missing. The ticker had a red box where the price should be, and the chart drew nothing at all. I checked the server, the process, and the token, and all three were fine. The request never reached Bybit, and the reason sat inside an error I had been reading wrong for months.
Python reported an SSLCertVerificationError when it tried to reach api.bytick.com that morning. The certificate it received did not belong to Bybit. Its common name was blockpage.xlaxiata.id, which is the address my ISP uses for a block page.
Most people treat that as a dead end and reach for a VPN. I did that first, and it worked, which is exactly why I stopped trusting it as the answer.
The certificate told me who actually answered
When a request fails with a certificate mismatch, the usual instinct is to blame the library. The clock and an outdated CA bundle are the next suspects, and I have burned hours on all three. This time the message was specific enough to be a fact. The name on the certificate was not the name of the host I had asked for.
That matters because a certificate is a receipt. It tells you who picked up the phone, not only that the line was busy. Both api.bybit.com and api.bytick.com answered with CN=blockpage.xlaxiata.id on that first check. Two different hostnames, one answerer, and that answerer was my ISP's filter.
The root problem is not the API and not my code. It is that I assumed every hostname in my list resolves to the same service, everywhere. A block page is not the same thing as an outage, and that difference matters here. It is a local answer dressed up as a remote one.
Finding endpoints that survive the same network
Here is the part that changed my mind. I tested api.bybit.nl and api.bybit.eu from the same machine, on the same connection, minutes later. Both returned 200 with real ticker data, minutes after the failed request. The ISP was not blocking Bybit as a service. It was blocking the specific hostnames I had hardcoded.
I do not know why those two domains escaped. I did not test enough to explain it, and one afternoon is not evidence of a stable pattern. What I do know is that the same client code worked the moment I changed the host. That moved the problem from networking into configuration, where I can actually fix it.
So the first fix is a hostname list, not a VPN. A VPN hides the problem, costs a subscription, and adds a failure mode I cannot debug at seven in the morning. A second hostname costs one line and fails loudly when it is also blocked.
Fallback in three layers, each with a job
My price fetch now walks a short chain, and each layer exists for a different reason.
- Bybit
nlandeufirst, because klines and tickers arrive with the shape I already parse. - CoinGecko next, because it is a different provider on different infrastructure.
- Indodax last, because it answers in IDR and needs a conversion step.
The order is not a ranking of quality. It is a ranking of how much I have to change the data afterward. Bybit gives me the fields I need, and CoinGecko gives me most of them. Indodax gives me rupiah, which I must convert before the chart can use it.
Every layer logs which source answered and when. Without that line I would be guessing again. I would not know whether a quiet chart meant a blocked API or a broken parser.
The cache does more work than the fallback
Fallback without a cache just moves the traffic somewhere else. When the first host was blocked, my dashboard retried on every page load and every five seconds from the mobile view. That is a small denial-of-service attack against my own sources.
I cache the ticker for sixty seconds and the klines for fifteen minutes. Sixty seconds is short enough that the number still looks alive, and long enough that a refresh storm never leaves the machine. Fifteen minutes matches how often a one-hour candle changes in practice.
The cache also makes the fallback honest, and that was not the reason I added it. A source that answers once per minute receives one request per minute. A failing provider therefore sees a trickle instead of a flood. When you add a fourth layer later, the cache is what keeps the whole chain polite.
What this setup does not fix
It does not prove that api.bybit.nl will stay reachable. It answered on the day I tested it, from my connection, and that is the entire claim. If the block widens, the second layer becomes the first and the chain loses its cheapest option.
CoinGecko and Indodax are not substitutes for exchange data. The two prices differ by spread and by timing on every single candle. A chart that silently switches sources can therefore show a jump that never happened. I have not solved that, and no data yet tells me how large the error is.
I also cannot tell you that blocking is the only reason a request fails this way. A proxy, a captive portal, or a misconfigured local resolver can produce the same shape. Reading the common name tells you who answered, not why the request was routed there.
If you hit this, the sequence that worked for me was short. Read the certificate name, test sibling hostnames from the same machine, then add a cache before you add a provider. It took one evening and cost nothing beyond electricity. What does your fallback chain look like when the first host is the one your ISP decided to intercept?
Cover photo: Bercik, BSD, via Wikimedia Commons.
