Authentication

Every request needs X-API-Key. Wallet signup, key lifecycle, and x402 upgrade flows are there when the integration starts from a wallet.

Header
X-API-Key
Wallet
SIWE signup available
Keys
Separate by environment

API key header

Every request uses an API key. Put it in the X-API-Key header and keep separate keys for each environment.

curl -X GET "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC" \
-H "X-API-Key: 0xa_your_api_key"

Wallet signup

Use the wallet flow if your account starts from a wallet instead of email. Request a SIWE challenge, sign it with personal_sign, then submit it to /v1/web3/signup. The same pattern also unlocks web3 key management and x402 upgrades without a browser session.

# Step 1: Get a SIWE challenge
CHALLENGE=$(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..." }

Where to use the key next