> ## Documentation Index
> Fetch the complete documentation index at: https://docs.marketdataset.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first MarketDataset API request in under 2 minutes

## Step 1: Get your API key

1. Sign in at [marketdataset.ai/dashboard](https://marketdataset.ai/dashboard)
2. Navigate to the **Overview** section
3. Click **Create API Key**, enter a name, and copy your key

<Warning>
  Your API key is only shown once. Store it securely — treat it like a password.
</Warning>

## Step 2: Add credits

New accounts have \$0 balance. Add credits from the [Billing page](https://marketdataset.ai/billing/credits).

Starting amount: **\$5** — enough for \~1,000 forex requests or \~250 COT report queries.

## Step 3: Make a request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketdataset.ai/forex/prices?pair=EURUSD&interval=hour&limit=5" \
    -H "X-API-KEY: sk_your_key_here"
  ```

  ```python Python theme={null}
  import requests

  api_key = "sk_your_key_here"
  base_url = "https://api.marketdataset.ai"

  response = requests.get(
      f"{base_url}/forex/prices",
      params={
          "pair": "EURUSD",
          "interval": "hour",
          "limit": 5,
      },
      headers={"X-API-KEY": api_key},
  )

  data = response.json()
  for candle in data["forex_prices"]:
      print(f"{candle['time']}  O:{candle['open']}  H:{candle['high']}  L:{candle['low']}  C:{candle['close']}")
  ```

  ```typescript TypeScript theme={null}
  const apiKey = "sk_your_key_here";
  const baseUrl = "https://api.marketdataset.ai";

  const response = await fetch(
    `${baseUrl}/forex/prices?pair=EURUSD&interval=hour&limit=5`,
    { headers: { "X-API-KEY": apiKey } }
  );

  const data = await response.json();
  console.log(data.forex_prices);
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "forex_prices": [
    {
      "pair": "EURUSD",
      "interval": "hour",
      "interval_multiplier": 1,
      "open": 1.08421,
      "high": 1.08589,
      "low": 1.08397,
      "close": 1.08534,
      "volume": 12847.0,
      "time": "2024-11-01T15:00:00+00:00"
    }
  ],
  "next_page_url": null,
  "meta": {
    "request_id": "req_abc123",
    "credits_used": 0.005,
    "credits_remaining": 4.995
  }
}
```

## What's next?

<CardGroup cols={2}>
  <Card title="Forex Prices" icon="chart-line" href="/api-reference/forex/prices">
    Full parameter reference for the forex prices endpoint.
  </Card>

  <Card title="Crypto Funding Rates" icon="bitcoin" href="/api-reference/crypto/funding-rates">
    Fetch perpetual futures funding rate history.
  </Card>

  <Card title="MCP Server" icon="robot" href="/sdks/mcp-server">
    Use MarketDataset as an MCP tool in Claude.
  </Card>

  <Card title="Rate Limits" icon="gauge" href="/rate-limits">
    Understand request limits for your plan.
  </Card>
</CardGroup>
