# 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 →](/documentation/integrations/api/api-reference.md)

## 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 →](/documentation/integrations/api/how-to-guides/how-to-price-a-swap-using-the-api.md)

## Authentication

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

## 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 →](/documentation/integrations/api/rate-limits.md)

## MCP Server for AI Agents

BlueGamma provides a [Model Context Protocol (MCP)](/documentation/integrations/model-context-protocol.md) 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 →](/documentation/integrations/api/api-reference.md)

## 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 →](/documentation/integrations/api/authentication.md)

### 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 →](/documentation/integrations/model-context-protocol.md)

### What indices are available via the API?

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

### Can I stream real-time data?

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluegamma.io/documentation/use-cases/fintech-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
