# POST /v1/live/csfloat/store

One CSFloat seller's current listings, by SteamID64: buy now or auction listings with float, paint seed, stickers, and price.

Returns one CSFloat seller's current listings.

Available on all plans, at [30 requests per minute on Developer and 180 on Scale](/docs/pricing#live-limits). Each request is for one seller, with up to 50 listings per page.

Prices are in USD and aren't converted. Data is real-time.

## Inputs

| Field | Required | Meaning |
| --- | --- | --- |
| `seller_id` | Yes | The [seller's SteamID64](/docs/live-csfloat#ids), as a string of 17 digits. |
| `listing_type` | No | `buy_now` or `auction`. See [Listing types](/docs/live-csfloat#listing-types). Without it, the request returns buy now listings. |
| `market_hash_name` | No | One exact item name. Returns only that item from the store. |
| `filters` | No | See [Filters](#filters). |
| `sort` | No | See [Sorting](#sorting). |
| `raw_response` | No | `false` returns [structured rows](/docs/live-overview#raw-and-structured-responses) instead of CSFloat's JSON. |

```json
{
  "seller_id": "76561198316699667",
  "filters": { "max_price": 100 },
  "sort": { "field": "price" }
}
```

The ID is the `seller_id` of a structured [listings](/docs/live-csfloat-listings) row, whose `store_query` is this request.

## Filters

Every filter is optional, and a listing must match all of them. A store takes fewer filters than [listings](/docs/live-csfloat-listings#filters).

| Filter | Type | Meaning |
| --- | --- | --- |
| `min_price`, `max_price` | `number` | The listing price in USD, inclusive. Buy now listings only. |
| `min_float`, `max_float` | `number` | The float, from 0 to 1, inclusive. |
| `paint_seeds` | `integer[]` | The paint seed to match. A store takes exactly one per request. |
| `stickers` | `object` | Up to 5 `entries`, each by `name` or `id`, and the listing must have all of them. A store doesn't take `count`, `slot`, or `category`. |

`market_parameters` accepts no parameters on this operation.

## Sorting

`sort.direction` reverses a field that has a default direction.

| `sort.field` | Direction | Order |
| --- | --- | --- |
| `price` | Ascending by default | By price. Buy now only. |
| `float` | Ascending by default | By float. |
| `created_at` | Descending only | Newest listings first. |

## Request

`POST https://api.cs2.sh/v1/live/csfloat/store`

**curl**

```bash
curl -X POST https://api.cs2.sh/v1/live/csfloat/store \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "seller_id": "76561198316699667",
  "filters": {
    "max_price": 100
  },
  "sort": {
    "field": "price"
  },
  "raw_response": false
}'
```

**Python**

```python
import requests

headers = {
    "Authorization": "Bearer <<YOUR_API_KEY>>",
    "Accept-Encoding": "gzip",
    "Content-Type": "application/json",
}

payload = {
    "seller_id": "76561198316699667",
    "filters": {
        "max_price": 100,
    },
    "sort": {
        "field": "price",
    },
    "raw_response": False,
}

response = requests.post(
    "https://api.cs2.sh/v1/live/csfloat/store",
    headers=headers,
    json=payload,
)

response.raise_for_status()
data = response.json()
```

**Node**

```javascript
const headers = {
  "Authorization": "Bearer <<YOUR_API_KEY>>",
  "Accept-Encoding": "gzip",
  "Content-Type": "application/json",
};

const response = await fetch("https://api.cs2.sh/v1/live/csfloat/store", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "seller_id": "76561198316699667",
    "filters": {
      "max_price": 100
    },
    "sort": {
      "field": "price"
    },
    "raw_response": false
  }),
});

if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
```

**Go**

```go
package main

import (
    "bytes"
    "compress/gzip"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    payload := map[string]any{
        "seller_id": "76561198316699667",
        "filters": map[string]any{
            "max_price": 100,
        },
        "sort": map[string]any{
            "field": "price",
        },
        "raw_response": false,
    }
    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.cs2.sh/v1/live/csfloat/store", bytes.NewReader(body))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <<YOUR_API_KEY>>")
    req.Header.Set("Accept-Encoding", "gzip")

    resp, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer resp.Body.Close()

    if resp.StatusCode < 200 || resp.StatusCode >= 300 {
        body, _ := io.ReadAll(resp.Body)
        panic(fmt.Sprintf("HTTP %d: %s", resp.StatusCode, body))
    }

    var reader io.Reader = resp.Body
    if resp.Header.Get("Content-Encoding") == "gzip" {
        gz, err := gzip.NewReader(resp.Body)
        if err != nil { panic(err) }
        defer gz.Close()
        reader = gz
    }

    var data any
    if err := json.NewDecoder(reader).Decode(&data); err != nil { panic(err) }
    fmt.Printf("%#v\n", data)
}
```

**R**

```r
library(httr2)

payload <- list(
  seller_id = "76561198316699667",
  filters = list(
    max_price = 100
  ),
  sort = list(
    field = "price"
  ),
  raw_response = FALSE
)

resp <- request("https://api.cs2.sh/v1/live/csfloat/store") |>
  req_headers(
    Authorization = "Bearer <<YOUR_API_KEY>>",
    `Accept-Encoding` = "gzip"
  ) |>
  req_body_json(payload) |>
  req_perform()

data <- resp_body_json(resp)
```

## Response

```json
{
  "market": "string",
  "operation": "string",
  "data": null,
  "page": {
    "page_size": 0,
    "has_next": false,
    "next_cursor": "string",
    "cursor_expires_at": "string",
    "total_count": 0,
    "total_exact": false
  },
  "warnings": [
    {
      "code": "string",
      "field": "string",
      "message": "string"
    }
  ],
  "response_time": "string"
}
```

## Response fields

[LiveResponse](/docs/objects#liveresponse) fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | `string` | No | The marketplace: `youpin`, `csfloat`, or `steam`. |
| `operation` | `string` | No | The operation that ran, such as `listings`. |
| `data` | `object` | No | With `raw_response: true`, the default, the marketplace's own JSON, unchanged. With `raw_response: false`, the operation's structured object, which is one of `LiveListingsData`, `LiveListingDetailData`, `LiveBuyOrdersData`, `SteamBuyOrderBook`, `LiveFloatRankData`, or `LiveSearchData`. |
| `page` | [LivePage](/docs/objects#livepage) \| `null` | No | Paging for the next request. `null` on operations that aren't paged. |
| `warnings` | [LiveRequestWarning[]](/docs/objects#liverequestwarning) | No | Notes about the request itself. Absent when there are none. |
| `response_time` | `string (date-time)` | No | When cs2.sh sent the response (UTC). |

## Response data

By default, `data` is CSFloat's own JSON, with prices in cents. With `raw_response: false`, `data.listings[]` holds one [LiveListing](/docs/objects#livelisting) per listing, with the same fields a [listings](/docs/live-csfloat-listings#response-data) row has. Auction rows add the `auction` object.

## Notes

CSFloat can return a cursor after the last listings, so the last page can be empty.

When you sort by `float`, `page.total_count` is `null`. CSFloat's total counts items that have no float, and a float sort leaves those out.

## Errors

A seller CSFloat doesn't have, or one whose store is private, returns `404` with `details.field` set to `seller_id`.

With `listing_type` set to `auction`, `min_price`, `max_price`, and `sort.field` `price` return `400`, because auctions can't be filtered or sorted by price.

Other errors are the [shared live errors](/docs/live-overview#errors-and-retries).

## POST /v1/live/csfloat/store/options

Returns the valid [choices](/docs/live-overview#filter-options) for one field of a store request. These fields have choices:

| `field` | Choices | Needs a seller |
| --- | --- | --- |
| `sort` | The sorts available | No |
| `listing_type` | The listing types | No |

To get one listing type's choices, send `listing_type` with `field`. Each option's `query` is a store request with the choice applied. Without a `seller_id` in the options request, add one to `query.body` before you POST it.

```json
{
  "listing_type": "auction",
  "field": "sort"
}
```

Sticker names come from the [listings options path](/docs/live-csfloat-listings#post-v1livecsfloatlistingsoptions).

### Request

`POST https://api.cs2.sh/v1/live/csfloat/store/options`

**curl**

```bash
curl -X POST https://api.cs2.sh/v1/live/csfloat/store/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "listing_type": "auction",
  "field": "sort"
}'
```

**Python**

```python
import requests

headers = {
    "Authorization": "Bearer <<YOUR_API_KEY>>",
    "Accept-Encoding": "gzip",
    "Content-Type": "application/json",
}

payload = {
    "listing_type": "auction",
    "field": "sort",
}

response = requests.post(
    "https://api.cs2.sh/v1/live/csfloat/store/options",
    headers=headers,
    json=payload,
)

response.raise_for_status()
data = response.json()
```

**Node**

```javascript
const headers = {
  "Authorization": "Bearer <<YOUR_API_KEY>>",
  "Accept-Encoding": "gzip",
  "Content-Type": "application/json",
};

const response = await fetch("https://api.cs2.sh/v1/live/csfloat/store/options", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "listing_type": "auction",
    "field": "sort"
  }),
});

if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
```

**Go**

```go
package main

import (
    "bytes"
    "compress/gzip"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    payload := map[string]any{
        "listing_type": "auction",
        "field": "sort",
    }
    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST", "https://api.cs2.sh/v1/live/csfloat/store/options", bytes.NewReader(body))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <<YOUR_API_KEY>>")
    req.Header.Set("Accept-Encoding", "gzip")

    resp, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer resp.Body.Close()

    if resp.StatusCode < 200 || resp.StatusCode >= 300 {
        body, _ := io.ReadAll(resp.Body)
        panic(fmt.Sprintf("HTTP %d: %s", resp.StatusCode, body))
    }

    var reader io.Reader = resp.Body
    if resp.Header.Get("Content-Encoding") == "gzip" {
        gz, err := gzip.NewReader(resp.Body)
        if err != nil { panic(err) }
        defer gz.Close()
        reader = gz
    }

    var data any
    if err := json.NewDecoder(reader).Decode(&data); err != nil { panic(err) }
    fmt.Printf("%#v\n", data)
}
```

**R**

```r
library(httr2)

payload <- list(
  listing_type = "auction",
  field = "sort"
)

resp <- request("https://api.cs2.sh/v1/live/csfloat/store/options") |>
  req_headers(
    Authorization = "Bearer <<YOUR_API_KEY>>",
    `Accept-Encoding` = "gzip"
  ) |>
  req_body_json(payload) |>
  req_perform()

data <- resp_body_json(resp)
```

### Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | `string` | Yes | The request field to list choices for, such as `filters.weapon` or `filters.stickers.entries[].name`. |
| `contains` | `string` | No | Text that a choice's label must contain, matched without regard to case. |
| `cursor` | `string` | No | The `page.next_cursor` from the previous page of choices, sent as the only field. |

### Response

```json
{
  "market": "string",
  "operation": "string",
  "field": "string",
  "availability": "string",
  "completeness": "string",
  "options": [
    {
      "label": "string",
      "query": {
        "path": "string",
        "body": null
      }
    }
  ],
  "metadata": null,
  "page": {
    "page_size": 0,
    "has_next": false,
    "next_cursor": "string",
    "cursor_expires_at": "string",
    "total_count": 0,
    "total_exact": false
  },
  "response_time": "string"
}
```

### Response fields

[LiveOptionsResponse](/docs/objects#liveoptionsresponse) fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | `string` | No | The marketplace. |
| `operation` | `string` | No | The data operation the choices apply to. |
| `field` | `string` | No | The request field the choices are for. |
| `availability` | `string` | No | Whether choices could be loaded for this request. |
| `completeness` | `string` | No | `complete` when the list holds every accepted value. `partial` when it holds suggestions, and other values may also work. |
| `options` | [LiveOption[]](/docs/objects#liveoption) | No | The choices. |
| `metadata` | `object` | No | Information about the choice list, such as when it was fetched. |
| `page` | [LivePage](/docs/objects#livepage) | No | Paging for long choice lists. |
| `response_time` | `string (date-time)` | No | When cs2.sh sent the response (UTC). |
