Quick Start

Get connected and receiving announcements in under 5 minutes.

1. Get your API key

You will receive an API key from the administrator. It looks like this:

dsk_a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890ab

All keys start with the dsk_ prefix followed by 64 hexadecimal characters.

circle-exclamation

2. Connect to the WebSocket

wss://cryptolisting.ws

Pass your API key via the X-API-Key HTTP header during the WebSocket handshake.

pip install websocket-client
# pip install websocket-client
import json, websocket
from datetime import datetime

URL    = "wss://cryptolisting.ws"
HEADER = ["X-API-Key: dsk_your_key_here"]

def on_open(ws):
    print("Connected!")

def on_message(ws, message):
    data = json.loads(message)
    ts   = datetime.now().strftime("%H:%M:%S.%f")[:-3]

    if data["type"] == "announcement":
        print(f"[{ts}] {data['listingType']} | {data['ticker']} on {data['publisher']}")
        print(f"        {data['title']}")
    elif data["type"] == "welcome":
        print(f"[{ts}] Welcome — tier={data['tier']}, cex={data['allowedCex']}")

def on_close(ws, code, msg):
    print(f"Disconnected ({code}). Reconnecting...")
    connect()

def connect():
    websocket.WebSocketApp(
        URL, header=HEADER,
        on_open=on_open, on_message=on_message, on_close=on_close
    ).run_forever(ping_interval=30, ping_timeout=10)

connect()

3. Receive messages

Once connected, you will immediately receive a welcome message confirming your subscription:

Then you will receive:

  • Heartbeats every 30 seconds -- confirms the connection is alive.

  • Announcements whenever a listing or other exchange announcement is detected.

4. Filter by exchange (optional)

To receive announcements only from specific exchanges, add the cex query parameter:

Omit the parameter to receive announcements from all exchanges.

Next steps

  • Message Reference -- full field-by-field documentation

  • Error Handling & Reconnection -- build a resilient client

  • Code Examples -- production-ready implementations

Last updated

Was this helpful?