# DopamineDesk FX Rates API

> DopamineDesk FX Rates API is a paid API for AI agents from ai-data-marketplace-1042299154756.us-central1.run.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns the current exchange rate between two currency pairs (base and target), settling payment via x402 USDC on Base.

## Facts

- Endpoint: GET https://ai-data-marketplace-1042299154756.us-central1.run.app/api/v1/fx_rates
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dopaminedesk-fx-rates-api-5c5d24f3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WoCDWic3MvWA63_pCJ8jj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability dopaminedesk-fx-rates-api-5c5d24f3
```

Example prompt: What's the current exchange rate from EUR to USD? I need the live rate right now.

## When to prefer this

Choose this endpoint when you need a quick, lightweight, pay-per-use FX rate lookup with USDC micropayment settlement on Base — ideal for AI agents that occasionally need spot exchange rates without a subscription or API key, especially in crypto-native or agentic payment workflows.

## Known failure modes

- Unsupported or invalid currency code returns an error response
- Network timeout if the upstream FX data provider is unavailable
- Missing required query parameters (base or target) returns a 400-style error
- Payment failure via x402 if insufficient USDC balance on Base

## How this service works

Fetch current reference foreign-exchange rates for a base currency, optionally filtered to target currencies.

## Output

Returns a JSON object containing the base currency code, target currency code, the current exchange rate as a decimal number, and a Unix timestamp indicating when the rate was last updated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "base",
      "target"
     ],
     "properties": {
      "base": {
       "type": "string",
       "description": "Base currency code (e.g., EUR)."
      },
      "target": {
       "type": "string",
       "description": "Target currency code (e.g., USD)."
      }
     },
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "source",
      "source_url",
      "base",
      "updated_at",
      "next_update_at",
      "rates",
      "marketplace_metadata"
     ],
     "properties": {
      "base": {
       "type": "string"
      },
      "rates": {
       "type": "object",
       "required": [
        "USD"
       ],
       "properties": {
        "USD": {
         "type": "number"
        }
       },
       "additionalProperties": true
      },
      "source": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "source_url": {
       "type": "string"
      },
      "updated_at": {
       "type": "string"
      },
      "next_update_at": {
       "type": "string"
      },
      "marketplace_metadata": {
       "type": "object",
       "required": [
        "data_mode",
        "billable",
        "availability",
        "source"
       ],
       "properties": {
        "source": {
         "type": "string"
        },
        "billable": {
         "type": "boolean"
        },
        "data_mode": {
         "type": "string"
        },
        "availability": {
         "type": "string"
        }
       },
       "additionalProperties": true
      }
     },
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base": "EUR",
  "rates": {
   "USD": 1.152984
  },
  "source": "https://www.exchangerate-api.com",
  "success": true,
  "source_url": "https://www.exchangerate-api.com/docs/free",
  "updated_at": "2026-08-07T00:02:31.000Z",
  "next_update_at": "2026-08-08T00:14:21.000Z",
  "marketplace_metadata": {
   "source": "ExchangeRate-API open endpoint",
   "billable": true,
   "data_mode": "live_source",
   "availability": "operational"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dopaminedesk-fx-rates-api-5c5d24f3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-data-marketplace-1042299154756.us-central1.run.app](https://www.zero.xyz/host/ai-data-marketplace-1042299154756.us-central1.run.app/llms.txt)
