Skip to content

Geographic Restrictions

Openfish blocks order placement from certain locations for regulatory and sanctions compliance. Applications should implement geoblock checks to give users feedback before they attempt to trade.


GET /api/geoblock

Base URL: https://api.openfish.fun

None required.

None. The endpoint uses the requesting IP address and proxy/CDN headers to determine location.

{
"blocked": false,
"closeOnly": false,
"ip": "203.0.113.42",
"country": "JP",
"region": ""
}
FieldTypeDescription
blockedbooleanWhether the user is fully blocked from trading
closeOnlybooleanWhether the user is in close-only mode (can sell but not buy)
ipstringDetected IP address
countrystringISO 3166-1 alpha-2 country code
regionstringRegion/state code (if available)

Fully restricted — all trading operations blocked:

CodeCountry
USUnited States
BYBelarus
CUCuba
IRIran
IQIraq
CICote d’Ivoire
LRLiberia
KPNorth Korea
SDSudan
SYSyria
ZWZimbabwe
MMMyanmar

Users can close/sell existing positions but cannot open new ones:

CodeCountry
PLPoland
SGSingapore
THThailand
TWTaiwan

Terminal window
curl https://api.openfish.fun/api/geoblock

The endpoint extracts the client IP from proxy headers in this order of priority:

  1. CF-Connecting-IP (Cloudflare)
  2. X-Real-IP
  3. X-Forwarded-For (first IP)

Country is determined from CF-IPCountry or X-Country-Code headers.