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

# Market

> Browse items available for withdrawal: fetching market items, query parameters, sandbox mode, search suggestions, item listings, and how pricing works.

The market endpoints return items currently available for purchase. This is what you show users when they want to withdraw (buy) skins.

## Fetching Market Items

```http theme={null}
GET https://api.assetpay.gg/client/market?game=730&page=1&perPage=50
Authorization: CLIENT_TOKEN
```

Response:

```json theme={null}
{
  "requestId": "...",
  "success": true,
  "data": {
    "items": [
      {
        "id": "e5f6g7h8-...",
        "name": "AWP | Dragon Lore",
        "marketHashName": "AWP | Dragon Lore (Factory New)",
        "type": "Sniper Rifle",
        "iconUrl": "IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdEHOQ6UFc5FT_0NqFMOBBN-s...",
        "appid": 730,
        "tradable": true,
        "marketPrice": 1850.00,
        "offer": {
          "price": 1720.50,
          "reference": "ref_market_456",
          "delivery": "standard"
        },
        "exterior": "Factory New",
        "wear": "0.01234",
        "rarity": "Covert",
        "color": "#EB4B4B",
        "paintSeed": 661,
        "stickers": [],
        "charm": null
      }
    ],
    "count": 1523
  }
}
```

## Query Parameters

| Parameter     | Type    | Default | Description                                                                                                                     |
| ------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `game`        | string  | `730`   | `"730"` for CS2 or `"252490"` for Rust                                                                                          |
| `search`      | string  | -       | Search by item name (max 100 chars)                                                                                             |
| `sort`        | string  | -       | `relevance`, `priceAsc`, `priceDesc`, `nameAsc`, or `nameDesc`                                                                  |
| `minPrice`    | number  | -       | Minimum price filter (USD)                                                                                                      |
| `maxPrice`    | number  | -       | Maximum price filter (USD)                                                                                                      |
| `page`        | number  | `1`     | Page number                                                                                                                     |
| `perPage`     | number  | `50`    | Items per page (min 1, max 1000)                                                                                                |
| `development` | boolean | `false` | Sandbox flag. When `true` (or `1`), every returned item is stamped with the full item shape (see [Sandbox Mode](#sandbox-mode)) |

## Sandbox Mode

When you pass `development=true` (or `development=1`), the market returns the same live listings but stamps every item so you can build your UI against the complete item shape without needing expensive skins in the pool:

* `offer.delivery` is forced to `"instant"`
* `previewToken` is set to a fixed placeholder inspect token
* `botInfo` is populated with a synthetic holding bot

This lets you exercise instant delivery, preview tokens, and bot attribution against cheap live listings. It only changes the shape of the response; it does not create or reserve any real items. On `/secure/market`, the `source` filter is ignored in sandbox mode so all suppliers are returned uniformly.

```json theme={null}
{
  "id": "e5f6g7h8-...",
  "name": "P250 | Sand Dune",
  "appid": 730,
  "tradable": true,
  "offer": {
    "price": 0.03,
    "delivery": "instant"
  },
  "previewToken": "0E1E9FBCF4F1CF0F162A2E6D260F3E0A36929AF6FE0D4EE20D66137E166CF38CAD",
  "botInfo": {
    "name": "BoulderBit",
    "avatar": "https://avatars.fastly.steamstatic.com/9cd97136ae9dd40fd717acf1756cf70da876f5b6_full.jpg",
    "steamId": "76561198733619862",
    "joined": "2026-02-20T00:00:00.000Z"
  }
}
```

## Search Suggestions

For building an autocomplete search box, use the suggestions endpoint:

```http theme={null}
GET https://api.assetpay.gg/client/market/suggestions?q=drag
Authorization: CLIENT_TOKEN
```

This returns a lightweight list of matching item names, faster than a full market search.

## Item Listings

To get all available listings for a specific item type:

```http theme={null}
GET https://api.assetpay.gg/client/market/item?itemId=ITEM_ID&delivery=any
Authorization: CLIENT_TOKEN
```

| Parameter        | Type   | Default    | Description                                                                                                        |
| ---------------- | ------ | ---------- | ------------------------------------------------------------------------------------------------------------------ |
| `itemId`         | string | Required\* | The marketplace item ID returned by `/client/market` or `/client/market/suggestions`                               |
| `marketHashName` | string | Required\* | Exact market hash name, resolved to the catalog item id. Use instead of `itemId`; `itemId` wins when both are sent |
| `delivery`       | string | `any`      | `"any"`, `"standard"`, or `"instant"` — filters listings by delivery mode                                          |
| `phase`          | string | -          | Doppler phase (`"Ruby"`, `"Phase 1"`, etc.) — returns only that phase's listings; combinable with `delivery`       |
| `floatMin`       | number | -          | Lower bound on the item float/wear value (`0`–`1`)                                                                 |
| `floatMax`       | number | -          | Upper bound on the item float/wear value (`0`–`1`)                                                                 |
| `page`           | number | `1`        | Page number                                                                                                        |
| `perPage`        | number | `50`       | Listings per page (max `100`)                                                                                      |

\* Provide either `itemId` or `marketHashName`.

This returns individual listings with different float values, stickers, and prices for the same item type. Useful when you want to let users pick a specific skin rather than just the cheapest one. Use `phase` and the `floatMin`/`floatMax` range to narrow to a specific Doppler phase or wear band.

## Pricing in Market Items

For market items (withdrawals), the `offer.price` is what it costs to buy this item. This is the amount that gets deducted from the merchant's wallet balance.

The `delivery` field indicates how the item will be sourced:

* `"standard"` – the bot sources the item from a marketplace supplier when the purchase is approved, then sends a Steam trade offer to the user
* `"instant"` – the item is already pre-positioned on the bot and the trade offer is sent immediately

In both cases, the final delivery to the user is via a Steam trade offer they must accept. Pass the item's `id` and `offer.price` when initiating the withdrawal — AssetPay routes the purchase to the correct marketplace supplier internally.

## Keeping Prices Updated

Market prices change frequently. You have two options to keep your UI current:

1. **Polling**: Refetch market data periodically (every 30-60 seconds is reasonable)
2. **WebSocket**: Subscribe to the `market` event for real-time item and price changes, pushed already priced for your account. Covers both CS2 and Rust on one connection (see [Market Updates](/docs/guides/websocket#market-updates))

When a user clicks "Buy", always validate that the price hasn't changed since they last loaded the page. If it has, show them the updated price before proceeding.

## Fetching Bulk Prices

If you need pricing data without item details (for example, to update prices in your own database), use the `/secure/prices` endpoint with your API key:

```http theme={null}
GET https://api.assetpay.gg/secure/prices?game=730
api-key: YOUR_API_KEY
```

This returns a compact list of market hash names with their current prices. See the [API Reference](/docs/api-reference/secure/get-prices) for the full response format.
