Polymarket.Geoblock (Polymarket v0.1.1)

Copy Markdown View Source

Client for Polymarket's geoblock check (https://polymarket.com/api/geoblock).

Reports whether the caller's IP is blocked from trading, based on the request's detected geolocation.

Summary

Functions

Checks whether the caller's IP is geoblocked by Polymarket.

Functions

get_geoblock()

@spec get_geoblock() ::
  {:ok, Polymarket.Schemas.Geoblock.t()} | {:error, :get_geoblock_failed}

Checks whether the caller's IP is geoblocked by Polymarket.

Returns a Polymarket.Schemas.Geoblock describing whether the request is blocked, along with the detected ip, country, and region.

Examples

Polymarket.Geoblock.get_geoblock()
#=> {:ok, %Polymarket.Schemas.Geoblock{blocked: false, ip: "145.79.198.2", country: "IE", region: "L"}}