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

# API Reference

> CashmereLabs REST API documentation

import { Card, CardGroup, Callout } from 'mintlify';

## Welcome

Cashmere exposes two public REST surfaces to help you quote transfers and monitor network activity. Everything is designed to work alongside the on-chain smart contracts documented in the developer guides.

## Base URLs

| Service            | Host                             | Purpose                                                                                        |
| ------------------ | -------------------------------- | ---------------------------------------------------------------------------------------------- |
| **Gas API**        | `https://gas.cashmere.exchange`  | Generate relayer fees, gas-drop quotes, and cryptographic signatures for smart contract calls. |
| **Monitoring API** | `https://kapi.cashmere.exchange` | Read-only analytics: transactions, points, leaderboards, wallet counts, and volumes.           |

## Authentication

Both APIs are currently open and do **not** require API keys. Please be respectful with request volumes—reach out at [contact@cashmere.exchange](mailto:contact@cashmere.exchange) for high-throughput access.

<Card title="Backend API Deep Dive" icon="code" href="/developers/backend-apis">
  Endpoints, payloads, and implementation notes
</Card>

## Core Endpoints

<CardGroup cols={2}>
  <Card title="Quote" icon="calculator" href="/api-reference/quote">
    Gas signatures and fees
  </Card>

  <Card title="Transfer" icon="arrow-right-arrow-left" href="/api-reference/transfer">
    Submit on-chain transfers with the quoted data
  </Card>

  <Card title="Analytics" icon="chart-bar" href="/api-reference/analytics">
    Track transactions, volumes, and points
  </Card>
</CardGroup>

## Rate Limits

We monitor usage but do not enforce formal tiers yet. If you plan to exceed \~120 requests per minute consistently, please coordinate with the team so we can provision dedicated capacity.

<Callout type="warning">
  The Gas API recalculates fees on every request. Avoid spamming duplicate calls; use the WebSocket feed to subscribe to fee updates instead.
</Callout>

## Error Handling

Errors are returned as JSON with the following structure:

```json theme={null}
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "Invalid source chain",
    "details": {}
  }
}
```

### Error Codes

* `INVALID_PARAMETER` – malformed or unsupported input
* `MISSING_PRICE_DATA` – Gas API cache is incomplete (retry later)
* `UNKNOWN_DOMAIN` – Source or destination domain not recognised
* `SERVER_ERROR` – Internal error (contact support if persistent)

## Response Format

All successful responses return JSON:

```json theme={null}
{
  "data": { ... }
}
```
