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

# Order book

> Public, read-only market data: offers, depth, providers and orders.

No token needed.

## List offers

`GET /api/v1/orderbook`

<ParamField query="rail" type="string">For example `wise`, `paypal`, `moneygram`.</ParamField>
<ParamField query="currency" type="string">ISO 4217 code.</ParamField>
<ParamField query="direction" type="string">`onramp` (users buy USDC) or `offramp` (users sell USDC).</ParamField>
<ParamField query="minAmount" type="string">Smallest order the offer must accept, in USDC.</ParamField>
<ParamField query="maxAmount" type="string">Largest order the offer must accept, in USDC.</ParamField>

Each offer:

<ResponseField name="provider" type="string">The LP's Stellar address.</ResponseField>
<ResponseField name="direction" type="string">`onramp` or `offramp`.</ResponseField>
<ResponseField name="availableUsdc" type="string">Free escrow balance.</ResponseField>
<ResponseField name="lockedUsdc" type="string">Balance locked to open orders.</ResponseField>
<ResponseField name="acceptedRails" type="string[]">Rails the LP has terms for.</ResponseField>
<ResponseField name="paymentHandles" type="object">Public payment handles per rail, if the LP publishes any.</ResponseField>
<ResponseField name="trustTier" type="number">How the rail's payments are verified.</ResponseField>
<ResponseField name="feeRateBps" type="number">Protocol fee in basis points.</ResponseField>
<ResponseField name="rate" type="string">Fiat per 1 USDC.</ResponseField>
<ResponseField name="currency" type="string">ISO 4217 code.</ResponseField>
<ResponseField name="minAmount" type="string">Smallest order, USDC.</ResponseField>
<ResponseField name="maxAmount" type="string">Largest order, USDC.</ResponseField>

<ResponseField name="completedOrders" type="number" />

<ResponseField name="avgFulfillmentSeconds" type="number" />

<ResponseField name="lastActiveAt" type="string" />

## Depth

`GET /api/v1/orderbook/summary`

<ResponseField name="totalAvailableUsdc" type="string" />

<ResponseField name="totalLockedUsdc" type="string" />

<ResponseField name="offerCount" type="number" />

<ResponseField name="byRail" type="object[]">`rail`, `availableUsdc` and `offerCount` per rail.</ResponseField>

## One provider

`GET /api/v1/providers/{address}`

<ResponseField name="provider" type="string" />

<ResponseField name="availableUsdc" type="string" />

<ResponseField name="lockedUsdc" type="string" />

<ResponseField name="completedOrders" type="number" />

<ResponseField name="avgFulfillmentSeconds" type="number" />

<ResponseField name="acceptedRails" type="string[]" />

<ResponseField name="activeIntents" type="number" />

## One order

`GET /api/v1/intents/{id}`

<ResponseField name="intentId" type="string">The order ID (intent hash).</ResponseField>
<ResponseField name="buyer" type="string">The taker.</ResponseField>
<ResponseField name="provider" type="string">The depositor.</ResponseField>

<ResponseField name="direction" type="string" />

<ResponseField name="rail" type="string" />

<ResponseField name="currency" type="string" />

<ResponseField name="amountUsdc" type="string" />

<ResponseField name="fiatAmount" type="string" />

<ResponseField name="status" type="string">`active`, `fulfilled`, `cancelled` or `expired`.</ResponseField>

<ResponseField name="trustTier" type="number" />

<ResponseField name="createdAt" type="string" />

<ResponseField name="expiresAt" type="string" />

<ResponseField name="nullifier" type="string">Set once the order settles on a claim.</ResponseField>
<ResponseField name="txHash" type="string">The settlement transaction.</ResponseField>

## Live updates

A WebSocket stream sends `{ "channel": "orderbook", "op": "add" | "update" | "remove", "entry": <offer> }` and `{ "channel": "intent", "intent": <order> }` messages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.