> ## 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.

# Testnet

> Build and test against Monaco's testnet on Sei Atlantic-2 with free test assets before you trade on mainnet.

Monaco runs a testnet next to mainnet. It has the same APIs, SDKs, and trading app, settles on the Sei Atlantic-2 testnet, and trades free test assets with no real-world value. Use it to build and test an integration before you point it at mainnet.

> [!WARNING]
>
> This page is the only place in these docs that names testnet endpoints. Every other page shows mainnet. When you copy an example from another page to testnet, swap in the values below.

> [!NOTE]
>
> Testnet may have downtime and service interruptions while backend and frontend functionality is updated. Balances can be reset.

## Endpoints

| | Testnet | Mainnet |
| - | - | - |
| Trading app | [staging.trade.0xmonaco.com](https://staging.trade.0xmonaco.com) | [trade.0xmonaco.com](https://trade.0xmonaco.com) |
| REST | `https://staging.apimonaco.xyz/api` | `https://apimonaco.xyz/api` |
| WebSocket | `wss://ws-staging.apimonaco.xyz/ws` | `wss://ws.apimonaco.xyz/ws` |
| gRPC | `staging.apimonaco.xyz:443` | `apimonaco.xyz:443` |
| Chain | Sei Atlantic-2 testnet (`atlantic-2`, chain ID 1328) | Sei mainnet (`pacific-1`, chain ID 1329) |
| Public Sei RPC | `https://evm-rpc-testnet.sei-apis.com` | `https://evm-rpc.sei-apis.com` |
| SDK `network` | `"staging"` | `"mainnet"` |
| viem / wagmi chain | `seiTestnet` | `sei` |

A client ID works on one network only. Email [team@0xmonaco.com](mailto:team@0xmonaco.com) for a testnet client ID.

## Connect An SDK

```typescript TypeScript theme={null}
import { MonacoSDK } from "@0xmonaco/core";
import { createWalletClient, custom } from "viem";
import { seiTestnet } from "viem/chains";

const [account] = await window.ethereum.request({
  method: "eth_requestAccounts",
});

const walletClient = createWalletClient({
  account,
  chain: seiTestnet,
  transport: custom(window.ethereum),
});

const sdk = new MonacoSDK({
  walletClient,
  network: "staging",
  seiRpcUrl: "https://evm-rpc-testnet.sei-apis.com",
});

await sdk.login("your-client-id");
```

```tsx React theme={null}
import { MonacoProvider } from "@0xmonaco/react";
import { WagmiProvider, createConfig, http } from "wagmi";
import { seiTestnet } from "wagmi/chains";

const wagmiConfig = createConfig({
  chains: [seiTestnet],
  transports: { [seiTestnet.id]: http() },
});

export function App() {
  return (
    <WagmiProvider config={wagmiConfig}>
      <MonacoProvider
        clientId="your-client-id"
        network="staging"
        seiRpcUrl="https://evm-rpc-testnet.sei-apis.com"
      >
        <YourComponents />
      </MonacoProvider>
    </WagmiProvider>
  );
}
```

```bash MCP server (Claude Code) theme={null}
claude mcp add monaco-testnet \
  -e MONACO_NETWORK=staging \
  -- npx -y @0xmonaco/mcp-server
```

The REST and gRPC examples elsewhere in these docs work on testnet once you replace the host with the testnet one.

## Get Test Assets

### In The Trading App

Open [staging.trade.0xmonaco.com](https://staging.trade.0xmonaco.com) and connect a wallet, or sign in with email or socials. Select the **droplet icon** in the top toolbar, then **Mint 2,000 USDC**: 1,000 USDC goes to your spot account and 1,000 USDC to your margin account. Trading is gasless after you connect.

### From Code

The faucet mints test assets to an authenticated wallet. It exists only on testnet; mainnet has no faucet.

| Surface | Use |
| - | - |
| TypeScript SDK | `sdk.faucet.mint()` · `sdk.faucet.getInfo()` |
| REST | `POST /api/v1/faucet/mint` · `GET /api/v1/faucet/info` |
| gRPC | `FaucetService` |
| MCP server | `request_faucet` · `get_faucet_info` |

Every mint needs a `turnstileToken`, a Cloudflare Turnstile captcha token from the widget rendered in your app. Requests without a valid token are rejected with `400`.

```typescript theme={null}
const info = await sdk.faucet.getInfo();
console.log(`${info.remainingRequests24h} of ${info.dailyLimit} requests left`);

try {
  const response = await sdk.faucet.mint({ turnstileToken });
  for (const token of response.minted ?? []) {
    console.log(`Minted ${token.amount} ${token.symbol}`, token.txHash);
  }
} catch (err) {
  // 429 quota exhausted, 502 mint failed or only partly confirmed,
  // 503 faucet unavailable (safe to retry).
  console.warn("Faucet mint did not fully succeed", err);
}
```

`mint()` resolves only when every token confirms on-chain. Otherwise it throws: `429` when the quota is used up, `502` when one or more mints failed or only partly confirmed (the error carries the minted and failed breakdown, and delivered legs still use quota), and `503` when the faucet is temporarily unavailable.

The quota is per wallet and per app, counted over a rolling 24-hour window. The default is one request. `getInfo()` returns `remainingRequests24h`, `dailyLimit`, `nextAvailableAt` (when the next request frees up; omitted when the window is empty or the limit is 0), and up to five `recentRequests`. Each `minted` entry is one on-chain deposit with an optional `txHash`, which is absent when that leg was submitted but never confirmed.

### Test SEI

The Monaco faucet is separate from the Sei gas faucet. Wallets still need test SEI from the [Sei testnet faucet](https://docs.sei.io/learn/faucet) for vault deposit and withdrawal transactions.

## Move To Mainnet

1. Change `network` to `"mainnet"`, the chain to `sei`, and `seiRpcUrl` to a mainnet RPC provider.
2. Use your mainnet client ID. Email [team@0xmonaco.com](mailto:team@0xmonaco.com) if you need one.
3. Remove faucet calls. Fund accounts through the [vault](/developers/vault.md).
4. Replace any hard-coded testnet hosts with the mainnet ones in the [Quickstart](/quickstart.md).


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