Live listings WebSocket

Get every new CS2 listing on Skinport, CSFloat and SkinBaron the second it goes up, instead of asking the API again and again. Good for snipers, deal alerts and trading bots.

  • Address: wss://api.cspriceapi.com/v1/ws/listings
  • Who can use it: customers on Trader Pro or Trader Enterprise (pricing). You can also try it with a free 2-day test key from our Discord (#get-testkey). Trader Basic can't connect.
  • What you get per listing: item name, price (in the market's currency and in USD), float, pattern, Doppler phase, stickers, charms and a link to the listing.

How it works in 3 steps

  1. Connect to the address with your API key.
  2. Tell us what you want (optional): which markets, which price range, which items.
  3. Receive listings. Every new listing that fits arrives as one message. The connection stays open.

Step 1: connect

Put your key in the x-api-key header. In a browser you can't set headers, so add it to the address instead: ?key=YOUR_API_KEY.

JavaScript (browser or Node.js 22+):

const ws = new WebSocket("wss://api.cspriceapi.com/v1/ws/listings?key=YOUR_API_KEY");

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);
  if (msg.type === "listing") {
    console.log(msg.data.market_hash_name, msg.data.price_usd, msg.data.url);
  }
};

Python (pip install websockets):

import asyncio, json, websockets

async def main():
    async with websockets.connect(
        "wss://api.cspriceapi.com/v1/ws/listings",
        additional_headers={"x-api-key": "YOUR_API_KEY"},
    ) as ws:
        async for raw in ws:
            msg = json.loads(raw)
            if msg["type"] == "listing":
                print(msg["data"]["market_hash_name"], msg["data"]["price_usd"])

asyncio.run(main())

That's all you need: without a filter you get every new listing from all three markets.

Step 2: choose what you want

Send a message after connecting. Examples:

You wantSend this
Only CSFloat and Skinport{"action":"subscribe","markets":["csfloat","skinport"]} plus {"action":"unsubscribe","markets":["skinbaron"]}
Only items between $100 and $5,000{"action":"filter","min_price_usd":100,"max_price_usd":5000}
Only knives and gloves{"action":"filter","search":["★"]}
Only specific items`{"action":"filter","items":["AK-47 \Redline (Field-Tested)","AWP \Asiimov (Field-Tested)"]}`
Everything again{"action":"filter"}

Good to know:

  • You can also pick markets right away in the address: ?markets=csfloat,skinport.
  • search finds any part of the name, upper or lower case doesn't matter. With several words, a listing matches if one of them fits.
  • items needs the exact item name.
  • You can combine price, search and items in one filter. A new filter replaces the old one, so always send everything you want in one message.

Step 3: what a listing looks like

{
  "type": "listing",
  "data": {
    "market": "csfloat",
    "market_hash_name": "AK-47 | Redline (Field-Tested)",
    "price": 12.34,
    "currency": "USD",
    "price_usd": 12.34,
    "float": 0.2512,
    "paint_seed": 661,
    "phase": null,
    "stickers": [{ "name": "...", "slot": 0, "wear": 0 }],
    "url": "https://csfloat.com/item/1043899891010636772",
    "listed_at": "2026-11-20T14:45:28.739Z"
  }
}
FieldMeaning
marketskinport, csfloat or skinbaron
price / currencyPrice as the market shows it (SkinBaron in EUR, the others in USD)
price_usdPrice in USD, so you can compare markets
float, paint_seedWear and pattern (SkinBaron sends no pattern and no image)
phaseDoppler phase, otherwise empty
stickers, charmsWhat's applied to the item
urlLink to buy it (on Skinport: the item page)
listed_atWhen it was listed

The full message also has id, paint_index, stattrak, souvenir, inspect_link, image and tradable_at.

More commands

SendYou get
{"action":"recent","market":"csfloat","limit":50}The last 50 listings we already have (up to 200 per market), with your filter
{"action":"status"}Whether each market feed is running
{"action":"ping"}pong, to test the connection

Right after connecting you get a welcome message with your markets, filter and limits. After every change you get subscribed with the new settings. If a message is wrong you get error with a short explanation, and the connection stays open.

When the connection closes

CodeWhat it meansWhat to do
4001Key missing, wrong or expiredCheck your key
4003Your plan doesn't include the live feed (Trader Basic)Upgrade to Trader Pro or Enterprise
4029More than 5 connections with the same keyClose other connections
4008Your program read the messages too slowlyProcess messages faster
1012We restarted the serverReconnect after a few seconds

Tip: reconnect automatically (wait a few seconds, a bit longer each time), except after 4001 and 4003. Send your filter again after reconnecting.

Limits: up to 5 connections per key. We check your key every 5 minutes, so the feed stops when a plan ends.

Related

This page as Markdown (.md)