8 days ago
A single unauthenticated GET to https://www.okx.com/api/v5/public/time returns HTTP 403 from Railway, but succeeds from Safari on my iPad using 5G.
Service: okx-public-connectivity-check
Service ID: 8ba4ba5b-4471-484f-9cdd-e0b7175ac8f3
Deployment: e9a6b4f8-127f-421a-986a-db938d061493
Region: Amsterdam (ams)
Log timestamp: 2026-09-13 03:49:42 UTC
Structured log attributes show PUBLIC_ENDPOINT_BLOCKED, http_status: 403, and credentials_sent: false.
Pinned Solution
8 days ago
Resolved for our public connectivity test—thank you everyone, especially for identifying the User-Agent difference.
OKX’s technical team confirmed we should replace the default Python-urllib/3.12 with:
User-Agent: okx-public-connectivity-check/1.0
We applied that change to our existing Railway Amsterdam deployment, using https://us.okx.com/api/v5/public/time as instructed by OKX for our Australian account.
Before: HTTP 403, Cloudflare error 1010
After: HTTP 200, OKX code "0" and valid timestamp data
Successful test: 13 September 2026, 07:22:28 UTC
The region and endpoint stayed unchanged between those tests; only the User-Agent changed. No proxy, VPN or browser impersonation was needed.
6 Replies
8 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 8 days ago
8 days ago
mayori
How do you test the connection? I tested it by running a command inside a Railway Sandbox and Service Console and both return the expected timestamp data  
8 days ago
Thanks for testing this. We’ve now captured the response details from our failing service:
Endpoint: https://www.okx.com/api/v5/public/time
Method: GET
Client: Python 3.12 using standard urllib.request
Hosting region: Amsterdam (ams)
No API credentials, custom headers or request body; redirects disabled
HTTP status: 403
Server: cloudflare
Response body: error code: 1010
CF-RAY: a3a46cda59716624-AMS
Timestamp: 2026-09-13 04:31:56 UTC
Cloudflare documents 1010 as a client/browser-signature block. Your successful test used curl, so the client difference may be relevant alongside the region.
@mayori, could you confirm the regions of your working tests and try this Python request in the same environment?
import urllib.request
import urllib.error
url = "https://www.okx.com/api/v5/public/time"
try:
with urllib.request.urlopen(url, timeout=15) as response:
print(response.status)
print(response.read().decode())except urllib.error.HTTPError as error:
print(error.code)
print(error.headers)
print(error.read().decode())Regarding eea.okx.com: my account is Australian. The FAQ cited describes EEA users and error 50119, whereas ours is Cloudflare 1010 on an unauthenticated endpoint. Can OKX confirm whether that regional hostname applies to an Australian account hosted in Amsterdam before we change the integration?
8 days ago
Thanks again for investigating. We have an update from our Railway service:
OKX support instructed us to use us.okx.com for our Australian account. We tested that hostname from the same Amsterdam service, keeping Python’s default User-Agent and sending no credentials.
Endpoint: https://us.okx.com/api/v5/public/time
User-Agent: Python-urllib/3.12
Result: HTTP 403
Response body: error code: 1010
Server: Cloudflare
CF-RAY: a3a4d6ead8470e2e-AMS
Time: 2026-09-13 05:44:20 UTC
Changing the hostname alone did not resolve it. This remains consistent with your User-Agent finding.
OKX’s technical team is investigating the UA under ticket 7002843. We’ve asked them to confirm that the descriptive identifier okx-public-connectivity-check/1.0 is supported. We haven’t applied or tested that change on our service yet.
We’ll keep this thread open and report back with the verified result.
8 days ago
Could you test the same endpoint from the Railway deployment with:
-
curl -4 -i https://www.okx.com/api/v5/public/time
-
curl -6 -i https://www.okx.com/api/v5/public/time
-
curl -i -A "Mozilla/5.0" https://www.okx.com/api/v5/public/time
Please share the HTTP status and response headers/body for each test.
samikhkankhan
Could you test the same endpoint from the Railway deployment with: 1. curl -i https://www.okx.com/api/v5/public/time 2. curl -4 -i https://www.okx.com/api/v5/public/time 3. curl -6 -i https://www.okx.com/api/v5/public/time 4. curl -i -A "Mozilla/5.0" https://www.okx.com/api/v5/public/time Please share the HTTP status and response headers/body for each test.
8 days ago
Our Railway service currently has IPv6 egress disabled. We’ve also confirmed the Python request returns Cloudflare 1010, with the response details posted above.
Could you clarify what the curl tests would establish beyond the client-signature difference already reproduced? We’re awaiting OKX’s confirmation of a supported, descriptive User-Agent rather than using a browser identifier.
8 days ago
Resolved for our public connectivity test—thank you everyone, especially for identifying the User-Agent difference.
OKX’s technical team confirmed we should replace the default Python-urllib/3.12 with:
User-Agent: okx-public-connectivity-check/1.0
We applied that change to our existing Railway Amsterdam deployment, using https://us.okx.com/api/v5/public/time as instructed by OKX for our Australian account.
Before: HTTP 403, Cloudflare error 1010
After: HTTP 200, OKX code "0" and valid timestamp data
Successful test: 13 September 2026, 07:22:28 UTC
The region and endpoint stayed unchanged between those tests; only the User-Agent changed. No proxy, VPN or browser impersonation was needed.
Status changed to Solved lauragarden • 8 days ago