# Exchange API Documentation

The Spike Exchange API lets partners build fiat-to-crypto and crypto-to-fiat exchange experiences with quotes, exchange lifecycle tracking, reusable deposit addresses, wallet validation, and signed webhook notifications.

This documentation is organized in three layers. Read **Concepts** first to learn the model, then pick a **Flow** for the specific direction the partner is integrating, and keep **Operations** open for negative scenarios and reconciliation.

For exact endpoint, request, response, schema, and error details, see the **[API Reference](./api.html)** — it remains the source of truth for field-level behavior.

## Concepts

Foundational pages that apply to every flow. Read these once, then refer back from the flow pages.

- **[Exchange Lifecycle](/docs/partners/concepts/exchange-lifecycle.md)** — what an exchange is, all status values, on-ramp and off-ramp state machines, terminal states.
- **[Events and Webhooks](/docs/partners/concepts/events-and-webhooks.md)** — full event catalog, ordering and delivery guarantees, the idempotent handler pattern.
- **[Idempotency and Retries](/docs/partners/concepts/idempotency.md)** — `Idempotency-Key`, business identifiers, per-endpoint rules, retry pattern.
- **[Refunds](/docs/partners/concepts/refunds.md)** — when refunds happen, partner-initiated refunds, multiple refunds per exchange, refund address resolution.
- **[Addresses](/docs/partners/concepts/addresses.md)** — destination, deposit, and refund addresses; validation rules; reusable deposit-address semantics.

## Flows

Step-by-step walkthroughs for each integration shape.

- **[Non-Fixed Rate On-Ramp](/docs/partners/flows/non-fixed-rate-on-ramp.md)** — convert fiat funds into crypto and deliver the crypto to an external wallet.
- **[Non-Fixed Rate Off-Ramp](/docs/partners/flows/non-fixed-rate-off-ramp.md)** — convert user crypto deposits into fiat using reusable deposit addresses.

## Operations

References for running an integration in production.

- **[Failure Handling](/docs/partners/operations/failure-handling.md)** — async and operational failures with recovery actions, plus Bitfinex-mock walkthroughs for reproducing failures in dev and staging. Sync request errors live in the API Reference.
- **[Reconciliation](/docs/partners/operations/reconciliation.md)** — identifiers, what to record per order, polling cadence, end-of-day matching.

## API Reference

The [API Reference](./api.html) is generated from the OpenAPI specification and remains the source of truth for field-level behavior.
