# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/kraken/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/kraken/get-asset-pairs \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kraken/get-assets \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kraken/get-ohlc \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kraken/get-spread \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kraken/get-ticker \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kraken/search-assets \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.