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

# Get Markets

> Returns the live protocol orderbook (all funded, available provider quotes across corridors × tokens × networks)
plus network-wide aggregate statistics.

**Public endpoint** — no authentication required, CORS open.
Responses are cached for ~10 s. Requests are per-IP rate limited.

Provider balances and success rates are intentionally public to support integrator tooling and the Paycrest Markets dashboard.


Returns the live protocol **orderbook** (every funded, available provider quote across corridors × tokens × networks) plus **network-wide aggregate statistics**. Use this endpoint to display live liquidity, rates, and protocol health without requiring authentication.

<Note>
  **Public endpoint** — no API key or HMAC signature required. CORS is open. Responses are cached for \~10 s and are per-IP rate limited.
</Note>

## Response shape (`data`)

| Field        | Type              | Description                                    |
| ------------ | ----------------- | ---------------------------------------------- |
| `asOf`       | string (ISO 8601) | Timestamp when the response was generated      |
| `aggregates` | object            | Network-wide aggregate statistics (see below)  |
| `book`       | array             | Provider quote rows forming the live orderbook |

## Book row fields

Each element of `book` is a single provider quote for one `side` on one `network`:

| Field             | Type           | Description                                                                      |
| ----------------- | -------------- | -------------------------------------------------------------------------------- |
| `providerId`      | string         | Provider identifier                                                              |
| `side`            | string         | `sell` = offramp (crypto → fiat); `buy` = onramp (fiat → crypto)                 |
| `token`           | string         | Token symbol, e.g. `USDT`, `USDC`                                                |
| `fiat`            | string         | Fiat currency code, e.g. `NGN`, `KES`                                            |
| `network`         | string         | Network identifier, e.g. `base`, `ethereum`                                      |
| `rate`            | string         | Provider's effective rate (fiat per crypto for sell; crypto per fiat for buy)    |
| `rateType`        | string         | `fixed` or `floating`                                                            |
| `min`             | string         | Minimum order amount for this corridor                                           |
| `max`             | string         | Maximum order amount for this corridor                                           |
| `balance`         | string         | Available liquidity: fiat amount for sell rows, token amount for buy rows        |
| `balanceCurrency` | string         | Currency of `balance` — fiat code for sell, token symbol for buy                 |
| `balanceUsd`      | string         | Balance normalised to USD                                                        |
| `settled`         | integer        | Total settled orders for this provider in this corridor                          |
| `successPercent`  | string \| null | Success rate as a percentage string (`null` when no settled or refunded history) |

<Note>
  `balance` is a **shared pool** repeated across a provider's networks for the same fiat (sell) or token (buy). De-duplicate by `providerId + fiat` (sell) or `providerId + token` (buy) when summing total depth to avoid double-counting.
</Note>

**Qualifying offer filters:** `is_available = true`, funded (positive balance), enabled fiat/token, non-testnet network. All book rows are public regardless of a provider's visibility setting—visibility only affects the narrower position benchmark pool on the [Get Market Rate](/api-reference/provider/get-market-rate) endpoint.

## Aggregates fields

| Field                   | Type     | Description                                                                                  |
| ----------------------- | -------- | -------------------------------------------------------------------------------------------- |
| `settledVolumeUsd`      | windowed | USD volume of settled orders — `24h`, `7d`, `30d`, `all` (strings)                           |
| `settledTxns`           | windowed | Count of settled transactions — `24h`, `7d`, `30d`, `all` (integers)                         |
| `networkSuccessPercent` | windowed | Network success rate (settled / (settled + refunded)) — `24h`, `7d`, `30d` (strings or null) |
| `medianDeliverySecs`    | windowed | Median order delivery time in seconds — `24h`, `7d`, `30d` (integers or null)                |
| `activeProviders`       | windowed | Distinct providers with ≥1 settled order — `24h`, `7d`, `30d`, `all` (integers)              |
| `activeSenders`         | windowed | Distinct senders with ≥1 settled order — `24h`, `7d`, `30d`, `all` (integers)                |
| `liveLiquidityUsd`      | string   | Total available USD-denominated liquidity across all book rows                               |
| `corridors`             | integer  | Distinct token/fiat pairs in the current book                                                |
| `tokens`                | integer  | Distinct tokens in the current book                                                          |
| `networks`              | integer  | Distinct networks in the current book                                                        |

Windowed success and median fields are `null` for a window when no terminal orders exist in that period.

## Example

```bash theme={null}
GET https://api.paycrest.io/v2/markets
```

```json theme={null}
{
  "status": "success",
  "message": "OK",
  "data": {
    "asOf": "2026-06-08T14:30:00Z",
    "aggregates": {
      "settledVolumeUsd": { "24h": "48200.00", "7d": "312500.00", "30d": "1420000.00", "all": "9800000.00" },
      "settledTxns":       { "24h": 118,         "7d": 790,         "30d": 3350,         "all": 43000 },
      "networkSuccessPercent": { "24h": "98.30", "7d": "97.60", "30d": "97.10" },
      "medianDeliverySecs": { "24h": 175, "7d": 190, "30d": 205 },
      "activeProviders":   { "24h": 42, "7d": 49, "30d": 55, "all": 115 },
      "activeSenders":     { "24h": 1150, "7d": 8200, "30d": 33000, "all": 490000 },
      "liveLiquidityUsd": "2350000.00",
      "corridors": 11,
      "tokens": 3,
      "networks": 4
    },
    "book": [
      {
        "providerId": "AbCdEfGh",
        "side": "sell",
        "token": "USDT",
        "fiat": "NGN",
        "network": "base",
        "rate": "1605.50",
        "rateType": "floating",
        "min": "500.00",
        "max": "500000.00",
        "balance": "12000000.00",
        "balanceCurrency": "NGN",
        "balanceUsd": "7462.69",
        "settled": 3200,
        "successPercent": "98.90"
      },
      {
        "providerId": "IjKlMnOp",
        "side": "buy",
        "token": "USDC",
        "fiat": "KES",
        "network": "ethereum",
        "rate": "130.25",
        "rateType": "fixed",
        "min": "100.00",
        "max": "100000.00",
        "balance": "9500.00",
        "balanceCurrency": "USDC",
        "balanceUsd": "9500.00",
        "settled": 850,
        "successPercent": "97.20"
      }
    ]
  }
}
```

## Errors

| HTTP    | Cause                      |
| ------- | -------------------------- |
| **429** | Per-IP rate limit exceeded |
| **500** | Internal error             |


## OpenAPI

````yaml openapi-v2.yaml GET /markets
openapi: 3.0.3
info:
  title: Paycrest Aggregator API
  version: 1.0.0
  description: >
    OpenAPI schema for the Paycrest Aggregator API. This covers sender,
    provider, and general endpoints.
servers:
  - url: https://api.paycrest.io/v2
security: []
tags:
  - name: Sender
    description: Endpoints for senders to create and manage payment orders
  - name: Provider
    description: Endpoints for providers to manage and fulfill orders
  - name: General
    description: General protocol and utility endpoints
paths:
  /markets:
    get:
      tags:
        - General
      summary: Get markets orderbook
      description: >
        Returns the live protocol orderbook (all funded, available provider
        quotes across corridors × tokens × networks)

        plus network-wide aggregate statistics.


        **Public endpoint** — no authentication required, CORS open.

        Responses are cached for ~10 s. Requests are per-IP rate limited.


        Provider balances and success rates are intentionally public to support
        integrator tooling and the Paycrest Markets dashboard.
      responses:
        '200':
          description: Markets orderbook and aggregates
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/MarketsResponse'
        '429':
          description: Too many requests (per-IP rate limit exceeded)
      servers:
        - url: https://api.paycrest.io/v2
components:
  schemas:
    StandardResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
          example: Operation successful
        data:
          type: object
          description: The actual response data (e.g., ReceiveAddressResponse, etc.)
    MarketsResponse:
      type: object
      description: Public markets orderbook and network-wide aggregates.
      properties:
        asOf:
          type: string
          format: date-time
          description: Timestamp when the response was generated (ISO 8601 UTC).
        aggregates:
          $ref: '#/components/schemas/MarketsAggregates'
        book:
          type: array
          items:
            $ref: '#/components/schemas/MarketOffer'
          description: Array of provider quote rows forming the live orderbook.
    MarketsAggregates:
      type: object
      description: Network-wide stats block included in the markets response.
      properties:
        settledVolumeUsd:
          allOf:
            - $ref: '#/components/schemas/MarketsWindowedVolume'
          description: USD volume of settled orders across windows.
        settledTxns:
          allOf:
            - $ref: '#/components/schemas/MarketsWindowedCount'
          description: Count of settled transactions across windows.
        networkSuccessPercent:
          allOf:
            - $ref: '#/components/schemas/MarketsWindowedSuccess'
          description: >-
            Network-wide success rate (settled / (settled + refunded)) across
            windows.
        medianDeliverySecs:
          allOf:
            - $ref: '#/components/schemas/MarketsWindowedMedian'
          description: Median order delivery time in seconds across windows.
        activeProviders:
          allOf:
            - $ref: '#/components/schemas/MarketsWindowedCount'
          description: >-
            Count of distinct providers with at least one settled order across
            windows.
        activeSenders:
          allOf:
            - $ref: '#/components/schemas/MarketsWindowedCount'
          description: >-
            Count of distinct senders with at least one settled order across
            windows.
        liveLiquidityUsd:
          type: string
          description: Total available USD-denominated liquidity across all book rows.
        corridors:
          type: integer
          description: Number of distinct token/fiat pairs currently in the book.
        tokens:
          type: integer
          description: Number of distinct tokens currently in the book.
        networks:
          type: integer
          description: Number of distinct networks currently in the book.
    MarketOffer:
      type: object
      description: >
        One provider quote row in the public markets orderbook (one row per
        provider × side × token × fiat × network).

        All funded, available providers appear regardless of visibility
        setting—only `is_available`, funded, enabled, and non-testnet gating
        applies.
      properties:
        providerId:
          type: string
          description: Provider identifier.
        side:
          type: string
          enum:
            - sell
            - buy
          description: '`sell` = offramp (crypto → fiat); `buy` = onramp (fiat → crypto).'
        token:
          type: string
          description: Token symbol (e.g. `USDT`, `USDC`).
        fiat:
          type: string
          description: Fiat currency code (e.g. `NGN`, `KES`).
        network:
          type: string
          description: Network identifier (e.g. `base`, `ethereum`).
        rate:
          type: string
          description: >-
            Provider's effective exchange rate for this row (fiat per crypto for
            sell; crypto per fiat for buy).
        rateType:
          type: string
          enum:
            - fixed
            - floating
          description: Whether the rate is fixed or floating.
        min:
          type: string
          description: Minimum order amount accepted by this provider for this corridor.
        max:
          type: string
          description: Maximum order amount accepted by this provider for this corridor.
        balance:
          type: string
          description: >
            Provider's available liquidity for this side. For **sell** this is
            in fiat (`balanceCurrency` = fiat code);

            for **buy** this is in token (`balanceCurrency` = token symbol).

            The balance is the shared pool repeated across a provider's networks
            for the same fiat/token—

            de-duplicate by `providerId + fiat` (sell) or `providerId + token`
            (buy) when summing depth.
        balanceCurrency:
          type: string
          description: >-
            Currency of `balance` — fiat code for sell rows, token symbol for
            buy rows.
        balanceUsd:
          type: string
          description: Balance normalised to USD.
        settled:
          type: integer
          description: Total number of settled orders for this provider in this corridor.
        successPercent:
          type: string
          nullable: true
          description: >-
            Provider's success rate (settled / (settled + refunded)) as a
            percentage string. `null` when there is no settled or refunded
            history.
    MarketsWindowedVolume:
      type: object
      description: A USD/amount metric broken down across time windows.
      properties:
        24h:
          type: string
          description: Value over the past 24 hours.
        7d:
          type: string
          description: Value over the past 7 days.
        30d:
          type: string
          description: Value over the past 30 days.
        all:
          type: string
          description: All-time value.
    MarketsWindowedCount:
      type: object
      description: An integer count metric broken down across time windows.
      properties:
        24h:
          type: integer
          description: Count over the past 24 hours.
        7d:
          type: integer
          description: Count over the past 7 days.
        30d:
          type: integer
          description: Count over the past 30 days.
        all:
          type: integer
          description: All-time count.
    MarketsWindowedSuccess:
      type: object
      description: >-
        Success-percentage metric across 24h/7d/30d windows. Null for a window
        when no terminal orders exist in that window.
      properties:
        24h:
          type: string
          nullable: true
          description: >-
            Network success rate over the past 24 hours (null if no terminal
            orders).
        7d:
          type: string
          nullable: true
          description: >-
            Network success rate over the past 7 days (null if no terminal
            orders).
        30d:
          type: string
          nullable: true
          description: >-
            Network success rate over the past 30 days (null if no terminal
            orders).
    MarketsWindowedMedian:
      type: object
      description: >-
        Median delivery time in seconds across windows. Null for a window when
        no data exists.
      properties:
        24h:
          type: integer
          nullable: true
          description: Median delivery seconds over the past 24 hours.
        7d:
          type: integer
          nullable: true
          description: Median delivery seconds over the past 7 days.
        30d:
          type: integer
          nullable: true
          description: Median delivery seconds over the past 30 days.

````