# Kraken — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Get live Kraken exchange market data including supported assets, trading pairs metadata, tickers, OHLCV candlesticks, and bid/ask spread history.

**Category:** Web3 & Onchain | **Website:** [kraken.com/](https://kraken.com/) | **Docs:** [parse.bot/marketplace/4158fae4-4419-4363-86c2-22fc9ab29ade/kraken-com-api](https://parse.bot/marketplace/4158fae4-4419-4363-86c2-22fc9ab29ade/kraken-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_asset_pairs

Get all trading pairs available on Kraken with metadata including fees, maker fees, leverage, margin, and order limits. No filtering — the full catalog is returned.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/get_asset_pairs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_assets

Get list of all available crypto assets on Kraken exchange. Returns every asset with its metadata including display name, decimals, and status. No filtering or pagination — the full catalog is returned in one call.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/get_assets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_ohlc

Get OHLCV (Open, High, Low, Close, Volume) candlestick historical data for a trading pair. Returns up to 720 data points per request. The last_timestamp field can be passed as the since parameter to paginate forward.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `interval` | integer | No | Candlestick interval in minutes. Accepted values: 1, 5, 15, 30, 60, 240, 1440, 10080, 604800. |
| `pair` | string | Yes | Trading pair name as recognized by Kraken (e.g. 'XBTUSD' for Bitcoin/USD). |
| `since` | integer | No | Unix timestamp to retrieve data from. Kraken returns the most recent data available regardless; this acts as a hint for pagination via the returned last_timestamp. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/get_ohlc \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"interval":"<integer>","pair":"<string>","since":"<integer>"}'
```

### get_spread

Get recent bid/ask spread data for a trading pair. Returns up to 250 entries of recent spread snapshots showing bid and ask prices at each timestamp.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pair` | string | Yes | Trading pair name as recognized by Kraken (e.g. 'XBTUSD'). |
| `since` | integer | No | Unix timestamp to retrieve data from. Kraken returns the most recent spread data available. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/get_spread \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pair":"<string>","since":"<integer>"}'
```

### get_ticker

Get ticker information (price, volume, bid/ask) for one or more trading pairs. Pair names must match Kraken's internal naming (use get_asset_pairs to discover valid pair names). Some assets use X/Z prefixes (e.g. XXBTZUSD for Bitcoin/USD). Returns upstream_error if any pair in the request is unrecognized.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pairs` | string | Yes | Comma-separated trading pair names as recognized by Kraken (e.g. 'XBTUSD,ETHUSD'). Use altname or id values from get_asset_pairs. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/get_ticker \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pairs":"<string>"}'
```

### search_assets

Search for assets by name or symbol. Performs a case-insensitive substring match against asset id and altname fields. Returns all matching assets from the full Kraken asset catalog.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search term to match against asset id or altname (e.g. 'XBT', 'ETH', 'SOL'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kraken-com-api-4158fae4/search_assets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
