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

# Market data and snapshots

> Consume the current read service with bounded pages, exact amounts, and consistent block snapshots.

The current read service exposes a bounded market catalog and wallet views. It discovers tokens through the factory event index and reads each response at a consistent block.

<Note>
  The public app and indexed market API are not hosted yet. The paths below document the service interface for integration preparation. The live read-only RPC at `https://fx.meme/api/rpc` serves approved JSON-RPC reads; it does not serve these market endpoints.
</Note>

## Read contracts today

Use Arc's public RPC at `https://rpc.mainnet.arc.io` for direct contract reads, or the FX read-only proxy for its supported requests. The proxy accepts JSON POST requests and does not accept transaction submission or signing methods.

The [deployed contracts](/developers/contracts#read-the-current-state) page includes a working mainnet read example. The indexed HTTP endpoints below need the market service to be hosted before they are available publicly.

## Market requests

The market reader accepts GET requests at /api/markets. A response contains at most 25 coins.

| Query                                     | Purpose                                                |
| ----------------------------------------- | ------------------------------------------------------ |
| limit=25                                  | Newest launches, bounded by the requested page size    |
| token=TOKEN\_ADDRESS                      | One factory-authenticated token and its detail history |
| creator=CREATOR\_ADDRESS                  | Launches attributed to a creator                       |
| account=WALLET\_ADDRESS                   | Wallet amounts for the returned coins                  |
| wallet=holdings\&account=WALLET\_ADDRESS  | Positions with a positive indexed token balance        |
| wallet=positions\&account=WALLET\_ADDRESS | Received or sent positions, including fully sold coins |
| search=TEXT                               | Literal name, symbol, or address search                |
| mode=1                                    | FX-pair launches                                       |
| mode=0                                    | Single-currency launches                               |
| watch=ADDRESS\_A,ADDRESS\_B               | A bounded watchlist                                    |

The address labels are placeholders. Use actual validated addresses when constructing a request.

Token lookup cannot be combined with a creator filter or cursor. Wallet scopes require an account and cannot be combined with token or creator lookup. Search, mode, and watchlist filters can combine with a creator; they do not combine with wallet discovery or direct token lookup.

An empty watchlist returns no coins. Omit the parameter when requesting an unfiltered catalog.

## Keep pagination on one snapshot

The response's marketPage object includes:

```text theme={null}
scope
account
creator
limit
snapshot: { block, hash }
next: { block, idx } | null
order: "newest-launch-first"
```

These fields are a shape reference, not a complete response example. The payload also includes the returned markets and applicable balances and activity.

For the next page, retain the original filters and account, then pass the snapshot and cursor back:

```text theme={null}
/api/markets?limit=25
  &block=SNAPSHOT_BLOCK
  &blockHash=SNAPSHOT_HASH
  &beforeBlock=CURSOR_BLOCK
  &beforeIndex=CURSOR_INDEX
```

Join those lines into a single URL. A null next value ends that filtered result set.

Do not merge a page from a new block into an older snapshot's pagination. To refresh, discard the previous cursor and snapshot and request the newest view.

## Scope is part of the data

| Data                                       | Scope                                                                |
| ------------------------------------------ | -------------------------------------------------------------------- |
| Returned market rows and per-token details | The page's returned coins                                            |
| overview                                   | All indexed launches at the snapshot                                 |
| walletOverview                             | The requested wallet's indexed FX holdings and past-position rewards |
| Currency balances and creator claims       | Separate account fields with their stated scope                      |
| Charts                                     | Bounded histories for a direct token lookup                          |

Summing a page's token values does not establish a whole-market or whole-wallet total. A wallet summary covers tokens launched by the selected factory, not every asset the wallet holds.

A fully sold position may retain a backed holder entitlement. Preserve that position in a rewards view even when its token balance is zero.

## Handle errors by meaning

| HTTP status | Handling                                                                                                    |
| ----------- | ----------------------------------------------------------------------------------------------------------- |
| 400         | Correct invalid, duplicate, or incompatible query parameters                                                |
| 404         | Treat the direct token lookup as unavailable for that factory and snapshot                                  |
| 409         | Discard the changed snapshot and restart pagination                                                         |
| 503         | Keep the view unavailable or stale and retry with bounded backoff; the index or provider may be catching up |

A provider error or incomplete index must not become an empty portfolio.

## Exact amounts and canonical history

Keep raw balances and rewards as exact decimal strings or BigInt. Convert with each asset's verified decimals only at the presentation boundary.

A snapshot includes both a block number and its hash. The reader checks canonicality around its reads. A chain reorganization can invalidate pages, prices, or histories tied to an earlier hash.

Avoid caching by block number alone. Include the block hash, wallet, filters, and page scope where applicable.

## Refresh after a transaction

A confirmed receipt establishes a minimum block for the next view. Read until the snapshot reaches that block, using bounded retries when the index lags.

Preserve the successful transaction result while data refreshes. If the wallet, network, or query changes, discard obsolete responses so they cannot overwrite the new context.

For chart prices and volume definitions, see [read the market](/markets/reading-the-market). For executable transaction amounts, use [contract quotes](/developers/quote-and-settle).
