{
  "info": {
    "_postman_id": "globalbalance-fx-api-v1",
    "name": "Global Balance FX API",
    "description": "Live exchange rates and provider comparison API. Base URL: https://globalbalance.dev",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.3.0"
  },
  "variable": [
    { "key": "base_url", "value": "https://globalbalance.dev", "type": "string" }
  ],
  "item": [
    {
      "name": "Live mid-market rate",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/rates?from=USD&to=INR",
          "host": ["{{base_url}}"],
          "path": ["api", "rates"],
          "query": [
            { "key": "from", "value": "USD", "description": "ISO 4217 source currency (required)" },
            { "key": "to",   "value": "INR", "description": "ISO 4217 target currency (required)" }
          ]
        },
        "description": "Returns the current mid-market exchange rate for a currency pair. Cached 15 min."
      },
      "response": [
        {
          "name": "200 OK",
          "status": "OK",
          "code": 200,
          "body": "{\n  \"ok\": true,\n  \"from\": \"USD\",\n  \"to\": \"INR\",\n  \"rate\": 83.42,\n  \"source\": \"open.er-api.com\",\n  \"timestamp\": \"2026-04-07T00:00:00Z\",\n  \"checkedAt\": \"Mon, 07 Apr 2026 14:23:11 GMT\"\n}"
        }
      ]
    },
    {
      "name": "Provider comparison",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/compare?from=USD&to=MXN&amount=1000&sort=rate",
          "host": ["{{base_url}}"],
          "path": ["api", "compare"],
          "query": [
            { "key": "from",   "value": "USD",  "description": "Source currency (required)" },
            { "key": "to",     "value": "MXN",  "description": "Target currency (required)" },
            { "key": "amount", "value": "1000", "description": "Send amount in source currency (optional, default 1000)" },
            { "key": "sort",   "value": "rate", "description": "Sort by: rate | fee | spread (optional)" }
          ]
        },
        "description": "Compare transfer costs across all supported providers for a currency pair."
      },
      "response": []
    },
    {
      "name": "Cross-rate matrix",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/matrix?currencies=USD,EUR,GBP,INR,MXN",
          "host": ["{{base_url}}"],
          "path": ["api", "matrix"],
          "query": [
            { "key": "currencies", "value": "USD,EUR,GBP,INR,MXN", "description": "Comma-separated codes, max 10 (optional)" }
          ]
        },
        "description": "Returns rates[from][to] for every pair of the requested currencies."
      },
      "response": []
    },
    {
      "name": "Provider metadata",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/providers",
          "host": ["{{base_url}}"],
          "path": ["api", "providers"]
        },
        "description": "All supported providers with fee schedules, networks, and data notes."
      },
      "response": []
    },
    {
      "name": "Historical rates",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/history?from=USD&to=EUR&days=7",
          "host": ["{{base_url}}"],
          "path": ["api", "history"],
          "query": [
            { "key": "from", "value": "USD", "description": "Source currency (required)" },
            { "key": "to",   "value": "EUR", "description": "Target currency (required)" },
            { "key": "days", "value": "7",   "description": "Days of history (optional, max 30)" }
          ]
        },
        "description": "Time-series of mid-market rate snapshots stored every 15 min via cron. Up to 30 days."
      },
      "response": []
    }
  ]
}
