# Fintech & API Integration

BlueGamma's REST API gives fintechs and platforms programmatic access to live forward curves, swap rates, and FX data across 47+ indices and 30+ currencies — plus an MCP server for AI agent integration.

## Why Fintechs Need Programmatic Rate Access

If you're building a lending platform, treasury tool, or financial analytics product, you need reliable interest rate data in your stack — not in a spreadsheet. Common use cases:

* **Embed live swap rates** in client-facing dashboards
* **Automate loan pricing** with real-time forward curves
* **Power hedging recommendation engines** with current market data
* **Feed financial models** with discount factors and zero rates
* **Build AI agents** that can query rate data autonomously

## BlueGamma API Overview

* **Protocol:** REST (HTTPS)
* **Authentication:** `x-api-key` header
* **Coverage:** 47+ interest rate indices, 30+ currencies, plus FX and government bonds
* **Response format:** JSON
* **Endpoints:** Forward curves, swap rates, discount factors, zero rates, FX forwards, government bond yields, and more

Full documentation: [API Reference →](https://bluegamma.io/documentation/integrations/api/api-reference)

## Quick Start

### cURL — Fetch a SOFR Swap Rate

```bash
curl -X GET "https://api.bluegamma.io/v1/swap_rate?index=SOFR&start_date=2026-03-02&maturity_date=2031-03-02&fixed_leg_frequency=6M" \
  -H "x-api-key: YOUR_API_KEY"
```

### Python — Fetch a SOFR Swap Rate

```python
import requests

response = requests.get(
    "https://api.bluegamma.io/v1/swap_rate",
    params={
        "index": "SOFR",
        "start_date": "2026-03-02",
        "maturity_date": "2031-03-02",
        "fixed_leg_frequency": "6M",
    },
    headers={"x-api-key": "YOUR_API_KEY"},
)

data = response.json()
print(f"5Y SOFR swap rate: {data['rate']}")
```

More examples: [How to Price a Swap Using the API →](https://bluegamma.io/documentation/integrations/api/how-to-guides/how-to-price-a-swap-using-the-api)

## Authentication

Generate your API key from your BlueGamma account settings. Pass it via the `x-api-key` header on every request. [Authentication guide →](https://bluegamma.io/documentation/integrations/api/authentication)

## Rate Limits & Best Practices

BlueGamma enforces rate limits to ensure fair usage. Cache responses where possible and avoid polling for unchanged data. [Rate limits & best practices →](https://bluegamma.io/documentation/integrations/api/rate-limits)

## MCP Server for AI Agents

BlueGamma provides a [Model Context Protocol (MCP)](https://bluegamma.io/documentation/integrations/model-context-protocol) server, allowing AI agents and LLM-powered tools to query interest rate data directly. If you're building AI-powered financial tools, the MCP server lets your agents fetch curves and swap rates without custom API integration code.

## Available Data

| Data Type              | Example Endpoint            |
| ---------------------- | --------------------------- |
| Forward curves         | `/v1/forward_curve`         |
| Swap rates             | `/v1/swap_rate`             |
| Discount factors       | `/v1/discount_factors`      |
| Zero rates             | `/v1/zero_rates`            |
| FX forward rates       | `/v1/fx_forward`            |
| Government bond yields | `/v1/government_bond_curve` |
| Fixing rates           | `/v1/fixing`                |

Full endpoint reference: [API Reference →](https://bluegamma.io/documentation/integrations/api/api-reference)

## Frequently Asked Questions

### What's the API latency?

Typical response times are under 500ms for most endpoints. Forward curves and swap pricing may take slightly longer depending on the complexity of the request.

### How do I authenticate?

Pass your API key via the `x-api-key` header. [Authentication guide →](https://bluegamma.io/documentation/integrations/api/authentication)

### Do you have an MCP server?

Yes. BlueGamma's MCP server lets AI agents query interest rate data using the Model Context Protocol. [MCP docs →](https://bluegamma.io/documentation/integrations/model-context-protocol)

### What indices are available via the API?

All 47+ indices available in BlueGamma are accessible through the API. [Full list →](https://bluegamma.io/documentation/integrations/available-indices)

### Can I stream real-time data?

Yes — BlueGamma supports real-time FX data streaming. [Streaming guide →](https://bluegamma.io/documentation/integrations/api/how-to-guides/streaming-real-time-fx-data)
