🔗 MCP Historical API

Getting Started

Connect your MCP client to the FinFeedAPI Currencies Historical MCP server and start querying assets, point-in-time rates, and OHLC timeseries.

Getting Started with Currencies Historical MCP

This guide shows how to connect an MCP client to the hosted FinFeedAPI Currencies Historical MCP server.

Endpoint and authentication

  • MCP endpoint: https://api-historical.fx.finfeedapi.com/mcp
  • Header: X-APIKey: YOUR_API_KEY
  • Transport: HTTP streaming MCP

Cursor example

Add the Currencies Historical server to your MCP client configuration:

{
  "mcpServers": {
    "FinFeedAPI-Currencies-Historical": {
      "url": "https://api-historical.fx.finfeedapi.com/mcp",
      "headers": {
        "X-APIKey": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Replace YOUR_API_KEY_HERE with your real API key and restart the client if required by your MCP application.

First requests to try

1. List a few assets

Call exchange_rates_history_list_assets with:

{
  "filter_asset_id": "BTC;USD;EUR"
}

Example response excerpt:

[
  {
    "asset_id": "USD",
    "name": "US Dollar",
    "type_is_crypto": 0
  },
  {
    "asset_id": "EUR",
    "name": "Euro",
    "type_is_crypto": 0,
    "price_usd": 1.1558625
  },
  {
    "asset_id": "BTC",
    "name": "Bitcoin",
    "type_is_crypto": 1,
    "price_usd": 68302.0600822358
  }
]

2. List supported periods

Call exchange_rates_history_list_periods with no arguments.

Example response excerpt:

[
  { "period_id": "1SEC", "display_name": "1 Second" },
  { "period_id": "1MIN", "display_name": "1 Minute" },
  { "period_id": "1HRS", "display_name": "1 Hour" },
  { "period_id": "1DAY", "display_name": "1 Day" },
  { "period_id": "10DAY", "display_name": "10 Days" }
]

3. Fetch one historical rate

Call exchange_rates_history_get_rate with:

{
  "asset_id_base": "BTC",
  "asset_id_quote": "USD",
  "time": "2025-04-01T00:00:00Z"
}

Example response:

{
  "time": "2025-04-01T00:00:00Z",
  "asset_id_base": "BTC",
  "asset_id_quote": "USD",
  "rate": 82483.0216235516
}

4. Fetch a historical timeseries

Call exchange_rates_history_get_timeseries with:

{
  "asset_id_base": "BTC",
  "asset_id_quote": "USD",
  "period_id": "1DAY",
  "time_start": "2025-04-01T00:00:00Z",
  "time_end": "2025-04-05T00:00:00Z",
  "limit": 10
}

Example response excerpt:

[
  {
    "time_period_start": "2025-04-01T00:00:00Z",
    "time_period_end": "2025-04-02T00:00:00Z",
    "rate_open": 82540.0978344124,
    "rate_high": 85547.4383700691,
    "rate_low": 82413.5602781232,
    "rate_close": 85169.36822187
  },
  {
    "time_period_start": "2025-04-02T00:00:00Z",
    "time_period_end": "2025-04-03T00:00:00Z",
    "rate_open": 85168.0323531985,
    "rate_high": 88477.0133942306,
    "rate_low": 82316.7331138689,
    "rate_close": 82494.2073256052
  }
]

Historical snapshot workflow

  1. Call exchange_rates_history_list_assets.
  2. Choose asset_id_base and asset_id_quote.
  3. Call exchange_rates_history_get_rate for a single timestamp or exchange_rates_history_get_all_rates for one-to-many pricing.

Charting workflow

  1. Call exchange_rates_history_list_periods.
  2. Pick the target period_id.
  3. Request candles with exchange_rates_history_get_timeseries.
  4. Enable extended_gap_filling when you want the server to improve boundary continuity.

Troubleshooting

No tools appear in the client

  • Verify the endpoint URL is exactly https://api-historical.fx.finfeedapi.com/mcp.
  • Confirm the request includes the X-APIKey header.
  • Restart the MCP client after editing its configuration.

Timeseries returns fewer rows than expected

  • Check whether your time_start, time_end, and limit combination actually permits the expected number of candles.
  • Confirm the selected period_id exists in exchange_rates_history_list_periods.
  • Remember that sparse markets may produce fewer populated intervals than a naive range calculation suggests.

Asset or pair is rejected

  • Validate the asset codes with exchange_rates_history_list_assets.
  • Use uppercase identifiers such as BTC, USD, or EUR.
Service StatusGitHub SDK