Authentication
Every client uses X-API-Key. Wallet auth exists for wallet-managed signup, keys, and x402 billing.
API key header
Send X-API-Key on every request. That is the standard auth model for REST, WebSocket, SDKs, CLI, and AI clients.
curl -X GET "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC" \ -H "X-API-Key: 0xa_your_api_key"Wallet auth
Wallet auth is for scripts that sign in from a wallet, mint keys, revoke keys, or pay through x402 without touching the dashboard. Request a SIWE challenge, sign it with personal_sign, then submit it to /v1/web3/signup.
# Step 1: Get a SIWE challengeCHALLENGE=$(curl -s -X POST "https://api.0xarchive.io/v1/auth/web3/challenge" \ -H "Content-Type: application/json" \ -d '{"address": "0xYourWalletAddress"}')
# Step 2: Sign the message with your wallet (personal_sign / EIP-191)# Then submit the signed message to create your account:curl -s -X POST "https://api.0xarchive.io/v1/web3/signup" \ -H "Content-Type: application/json" \ -d '{"message": "<SIWE message>", "signature": "0x<your_signature>"}'# Returns: { "api_key": "0xa_live_...", "tier": "free", "wallet_address": "0x..." }