Skip to main content

CS2Cap Python SDK

Typed Python client for the CS2Cap market-data API — CS2 item prices, buy orders, sales history, and analytics across dozens of providers.

PyPI

Install

pip install cs2cap

Quickstart

Set your API key in the environment. You can generate one from the Account page after verifying your email address at cs2cap.com.

export CS2C_API_KEY="sk_your_key_here"

Verify the install with a small catalog request:

import os

import cs2cap

configuration = cs2cap.Configuration(access_token=os.environ["CS2C_API_KEY"])

with cs2cap.ApiClient(configuration) as client:
    api = cs2cap.ItemsApi(client)
    response = api.list_items(q="AK-47", rarity_name="Covert", limit=5)

    print(client.sanitize_for_serialization(response))

Real-time feeds

FeedStream subscribes to the price and bid feeds over Server-Sent Events and yields decoded events as they arrive. Requires a Quant-tier key.

with cs2cap.ApiClient(configuration) as client:
    feed = cs2cap.FeedStream(client)

    for event in feed.stream_prices(providers=["steam"], item_ids=[17464]):
        for item in event.items:
            print(event.provider, item.item_id, item.change, item.price)

Use feed.stream_bids(...) for buy-order changes. Leaving the loop closes the connection. The feed has no replay buffer, so re-fetch current state from /prices or /bids before reconnecting.

Documentation

Full endpoint reference, guides, and tier details are at docs.cs2cap.com. See the changelog for API and SDK updates.

About this package

This SDK is generated from the public OpenAPI spec (openapi.json, included in this repo). If you hit a bug in the generated client, please open an issue or PR on this repo — fixes are applied in the generator pipeline rather than as hand-patches to the published package.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs2cap-3.1.0.tar.gz (133.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs2cap-3.1.0-py3-none-any.whl (302.8 kB view details)

Uploaded Python 3

File details

Details for the file cs2cap-3.1.0.tar.gz.

File metadata

  • Download URL: cs2cap-3.1.0.tar.gz
  • Upload date:
  • Size: 133.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cs2cap-3.1.0.tar.gz
Algorithm Hash digest
SHA256 8cb7770545bf7be8a6a4b93e1b3b23d19e1b97ea6dc3bd93495793421d874cb7
MD5 d7d76d62d85063fbe21359751b555fa9
BLAKE2b-256 4fc35413b72c9399348fc15f9697bbcd1ddbc04ab2a8153414704fcf29515982

See more details on using hashes here.

Provenance

The following attestation bundles were made for cs2cap-3.1.0.tar.gz:

Publisher: publish.yml on CS2Cap/cs2cap-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cs2cap-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: cs2cap-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 302.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cs2cap-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b7ae3230dd65e56e0aba9e1dd277ee964dfcad1958001bac7f2c8e25e0216b4
MD5 1b0a07f55678a706799a949a3caf18ab
BLAKE2b-256 fbb5f17111fd5711b387d40c29de54e914edd51c62f8fd4864eca53dbb882926

See more details on using hashes here.

Provenance

The following attestation bundles were made for cs2cap-3.1.0-py3-none-any.whl:

Publisher: publish.yml on CS2Cap/cs2cap-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 files

3.0.0

2 files

2.0.1

2 files

2.0.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page