API Reference

Complete endpoint documentation for CLVRBRIDGE — The Wallet Engine of Web3.

🔐 Authentication

All API requests require an API key passed in the x-api-key header.

// Every request must include:
x-api-key: clvr_live_xxxxxxxxxxxxx

Your API key is sent via encrypted email during onboarding. Demo keys are available for testing with rate limits.

⚠️ Demo keys are rate-limited to 100 requests/day and cannot execute trades.

POST /api/quote

Get real-time quotes from all connected providers. Returns the best price, all competing quotes, and execution data.

Request Body

FieldTypeRequiredDescription
typestringTrade type: BUY, SELL, or SWAP
fiatCurrencystringBUY/SELLFiat currency code: USD, EUR, GBP
fiatAmountnumberBUYAmount of fiat to spend (min $10)
cryptoCurrencystringBUY/SELLCryptocurrency symbol: BTC, ETH, SOL, etc.
cryptoAmountnumberSELLAmount of crypto to sell
fromAssetstringSWAPSource asset: ETH, BTC, etc.
toAssetstringSWAPDestination asset: USDC, SOL, etc.
fromAmountnumberSWAPAmount of source asset to swap
networkstringOptionalBlockchain network (auto-detected if omitted)
walletAddressstringOptionalUser's wallet address for execution
countrystringOptionalUser's country code (default: US)

Example Request — BUY

const res = await fetch('https://api.clvrbridge.com/api/quote', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'clvr_live_xxxxxxxxxxxxx'
  },
  body: JSON.stringify({
    type: 'BUY',
    fiatCurrency: 'USD',
    fiatAmount: 500,
    cryptoCurrency: 'BTC',
    country: 'US'
  })
});

const data = await res.json();

Example Request — SWAP

const res = await fetch('https://api.clvrbridge.com/api/quote', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'clvr_live_xxxxxxxxxxxxx'
  },
  body: JSON.stringify({
    type: 'SWAP',
    fromAsset: 'ETH',
    toAsset: 'USDC',
    fromAmount: 0.1,
    network: 'ethereum'
  })
});

const data = await res.json();

Response

FieldTypeDescription
requestIdstringUnique request identifier
timestampnumberUnix timestamp of response
responseTimeMsnumberTotal response time in milliseconds
typestringEcho of request type
statusstringSUCCESS, PARTIAL_SUCCESS, or FAILED
totalQuotesnumberNumber of providers that returned quotes
providersRespondedarrayList of provider names that responded
quotesarrayAll quotes sorted by best price
bestQuoteobjectThe winning quote with execution data
messagestringHuman-readable summary

Example Response

{
  "requestId": "req_1784658454873_9bt9wy",
  "timestamp": 1784658458409,
  "responseTimeMs": 3536,
  "type": "SWAP",
  "status": "SUCCESS",
  "totalQuotes": 4,
  "providersResponded": ["0x", "kyberswap", "velora", "1inch"],
  "quotes": [
    {
      "provider": "kyberswap:ethereum",
      "fromAmount": 0.1,
      "fromCurrency": "ETH",
      "toAmount": 193.867287,
      "toCurrency": "USDC",
      "fee": 0,
      "effectiveRate": "1938.6729",
      "estimatedTimeMs": 30000,
      "successRate": 0.92
    }
  ],
  "bestQuote": {
    "provider": "kyberswap:ethereum",
    "toAmount": 193.867287,
    "toCurrency": "USDC",
    "fee": 0,
    "executionData": { ... }
  },
  "message": "Best from kyberswap:ethereum: 193.86728700 USDC"
}

Status Codes

CodeMeaning
200Quotes returned successfully
400Missing or invalid parameters
401Missing or invalid API key
429Volume limit reached for your tier
503No quotes available from any provider

POST /api/execute

Execute a trade using the bestQuote.executionData from a quote response.

⚠️ Demo keys cannot execute trades. Use a live API key for execution.

Request Body

FieldTypeRequiredDescription
providerstringProvider name from bestQuote.provider
quoteobjectThe full bestQuote object from quote response
walletAddressstringUser's wallet address
sidestringOptionalbuy or sell (for exchange trades)
symbolstringOptionalTrading pair symbol
amountnumberOptionalTrade amount

Example Request

const res = await fetch('https://api.clvrbridge.com/api/execute', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'clvr_live_xxxxxxxxxxxxx'
  },
  body: JSON.stringify({
    provider: 'kyberswap:ethereum',
    quote: quoteData.bestQuote,
    walletAddress: '0xUserWalletAddress'
  })
});

const result = await res.json();
// { success: true, provider: "kyberswap:ethereum", executionType: "CALLDATA", transaction: { ... } }

Execution Types

TypeDescriptionWhat You Do
CALLDATADEX swap transaction dataUser signs and submits the transaction
REDIRECTRedirect to provider's checkoutOpen the redirect URL for the user
EXCHANGECEX order placementOrder is placed on the exchange

GET /api/providers

Returns all connected providers with their capabilities, coverage, and current pricing tiers.

Example Response

{
  "providers": {
    "ccxt": { "capabilities": ["BUY", "SELL"], "coverage": "18 exchanges" },
    "0x": { "capabilities": ["SWAP"], "coverage": "Ethereum, L2s, 70+ sources" },
    "poloniex": { "capabilities": ["BUY", "SELL"], "coverage": "Established global exchange, 350+ pairs" }
  },
  "tiers": {
    "pilot": { "baseFee": "0%", "uplift": "100%", "commitment": "10%" },
    "tier1": { "baseFee": "2%", "uplift": "80%", "commitment": "10%" },
    "tier2": { "baseFee": "1.5%", "uplift": "85%", "commitment": "25%" },
    "tier3": { "baseFee": "1%", "uplift": "90%", "commitment": "50%+" }
  }
}

GET /api/dashboard

Returns your account metrics including trade volume, revenue earned, and provider performance.

Requires authentication. Returns client-specific data.

GET /health

Health check endpoint. Returns service status.

// Response:
{ "status": "healthy", "timestamp": 1784658458409 }
No authentication required.

GET /api/balance

Returns your current revenue balance and earnings breakdown.

Requires authentication.

📊 Rate Limits

PlanRequests / DayExecution
Demo100
Pilot1,000
Tier 110,000
Tier 2100,000
Tier 31,000,000