# Fallback URLs

> This page covers **Oracle API** fallback URLs. The GMX API uses a different redundancy model — see [GMX API peer deployments](#gmx-api-peer-deployments) below.

# Fallback URLs

This page covers **Oracle API** fallback URLs. The GMX API uses a different redundancy model — see [GMX API peer deployments](#gmx-api-peer-deployments) below.

## Oracle API Fallbacks

The Oracle API uses chain-specific primary endpoints such as `https://arbitrum-api.gmxinfra.io`. When the primary Oracle API endpoint is unavailable for a chain, use the corresponding fallback endpoint below.

| Network   | Fallback 1                                       | Fallback 2                                        |
| --------- | ------------------------------------------------ | ------------------------------------------------- |
| Arbitrum  | <CopyUrl url="https://arbitrum-api-fallback.gmxinfra.io" />  | <CopyUrl url="https://arbitrum-api-fallback.gmxinfra2.io" />  |
| Avalanche | <CopyUrl url="https://avalanche-api-fallback.gmxinfra.io" /> | <CopyUrl url="https://avalanche-api-fallback.gmxinfra2.io" /> |

## GMX API peer deployments

The GMX API does not use a primary-plus-fallback pattern. It is deployed per chain across **two independent peer base URLs**, both user-facing:

| Network | Peer A (`.io`) | Peer B (`.ai`) |
|---------|----------------|----------------|
| Arbitrum | `https://arbitrum.gmxapi.io/v1` | `https://arbitrum.gmxapi.ai/v1` |
| Avalanche | `https://avalanche.gmxapi.io/v1` | `https://avalanche.gmxapi.ai/v1` |
| MegaETH | `https://megaeth.gmxapi.io/v1` | `https://megaeth.gmxapi.ai/v1` |

Both peers receive the same data and accept the same requests, except the generic `/relay/*` routes, which only the `.io` base URLs serve. Either base URL can be used on its own, and direct integrators are encouraged to rotate across both for reads rather than hard-coding a single peer.

The peers don't share order-transaction records. Keep an express order's prepare, submit, and status calls on the peer that served prepare, and prepare again instead of failing over to the other peer mid-chain. See [Idempotency and race conditions](../integration-guide.md#idempotency-and-race-conditions).

Protocol stats under `/v1/stats` are computed only by the Arbitrum deployment. The `gmxapi.io` hosts of the other chains forward these requests to it, while the `gmxapi.ai` hosts of the other chains answer with a `308` redirect to `https://arbitrum.gmxapi.ai`, so clients of those hosts must follow redirects.

These URLs describe direct HTTP deployments. SDK clients use the fallback hosts configured by the installed package or supplied by the application. In the current published `latest`, `@gmx-io/sdk` `2.4.0`, `getApiFallbackUrls()` returns an empty array for every chain, so an SDK integration that needs peer rotation must supply the second host itself. With a second host configured, SDK `2.1.1` and later keep each express order chain on the host that served its prepare.

GMX no longer supports Botanix. Its GMX API, Oracle API, and GraphQL endpoints are no longer available.
