> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xmonaco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Region Status

> Whether trading is available in the caller's region

Trading on Monaco is not available in some jurisdictions. A caller from a restricted region can still read everything (market data, balances, positions, orders, withdrawal lists), use the WebSocket API, sign in and withdraw. Every other write — placing, replacing or cancelling orders, closing positions, deposits, transfers and account changes — is refused with HTTP `451` and the error code `REGION_RESTRICTED`. The region status endpoint is **public** — no authentication is required — and answers from every region, so a frontend can show a region notice and hide trading up front instead of failing on the next write. The restriction applies to production only: on the testnet environments `restricted` is always `false` and no request is refused for its region.

```typescript theme={null}
import { MonacoSDK } from "@0xmonaco/core";

// Public — works without a wallet or session
await sdk.compliance.getRegionStatus();
```

## Get Region Status

**getRegionStatus** `() =\> Promise\<GetRegionStatusResponse\>`

Fetch the caller's region status. No authentication required.

**Returns:** `GetRegionStatusResponse`:

* `restricted`: boolean — `true` when trading is not available in the caller's region.
* `country`: string — the ISO 3166-1 alpha-2 country code the edge geolocated (`T1` for Tor, `XX` for unknown); empty when the request carried no location.

**Example:**

```typescript theme={null}
const { restricted } = await sdk.compliance.getRegionStatus();
if (restricted) {
  showRegionNotice();
  disableTrading();
}
```

## Refused requests

A refused write gets this body:

```json theme={null}
{
  "error": "REGION_RESTRICTED",
  "message": "Trading is not available in your region.",
  "statusCode": 451,
  "details": { "reason": "edge_geo_block" }
}
```

`details.reason` is `edge_geo_block` when the edge refused the request and `app_geo_block` when the API did. Branch on `error`, not on the reason. In the SDK the refusal is an `APIError` with `statusCode` `451` and `retryable: false`. A browser reads it too: the edge's `451` carries the same CORS headers the API sends, and the region gate never refuses a preflight (`OPTIONS`), so a browser caller always gets `statusCode` `451` and this body rather than a network error. gRPC writes fail with `PERMISSION_DENIED` (see [ComplianceService](https://docs.0xmonaco.com/grpc/protos/compliance.md)).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.