Skip to content
aseeon edited this page Nov 16, 2022 · 11 revisions

zKillboard Websocket

zkillboard provides a websocket that can be connected at wss://zkillboard.com/websocket/ By default, the websocket does not provide any information when connected, you must pass a subscribe command. See below for examples.

To test this as a human, go to https://websocketking.com/ and enter wss://zkillboard.com/websocket/ for the location. Connect, and then send {"action":"sub","channel":"killstream"} as a payload. You may have to wait a few moments, the websocket only publishes kills as zkillboard receives them. A constantly busy channel would be {"action":"sub","channel":"public"}.

All messages are in JSON format.


Killstream

Below is example JSON that will subscribe you to the flood of killmails as zkillboard gets them. The format of these killmails is the raw data as if it was received from CCP's killmail endpoints with the additional of zkillboard data as stored in the "zkb" block.

{
    "action":"sub",
    "channel":"killstream"
}

Filter

Every killmail has multiple entities tied to it, and each of these entries will publish a simplified version of the killmail. For example, https://zkillboard.com/kill/70314568/ will be published to:

  • character:202138874
  • region:10000015
  • alliance:1614483120

(example list is not complete)

Simplified version of the killmail includes only a subset of the victim's information:

{
    "action" : "littlekill",
    "killID" : 70314568,
    "hash": "4adf44d47919d165516ff86bbd4d4aabe00ed981",
    "character_id": 202138874,
    "corporation_id": 98058224,
    "alliance_id": 99006756,
    "ship_type_id": 42126,
    "url":  "https://zkillboard.com/kill/70314568"
}

If you are writing a tool that will provide this information to other tools, such as Slack or Discord, it is recommended that you only need to output the URL and let the tool unfurl the information accordingly. Example:

unfurled example

A list of all filter types:

  • character:
  • corporation:
  • alliance:
  • faction:
  • ship:
  • group:
  • system:
  • constellation:
  • region:
  • location:
  • label:
  • all:* (special channel, receives all killmails in simplified format)

Add the ID of the entity after the colon (:) and pass the action sub with that channel to subscribe to it and receive the simplified version of the killmail:

{
    "action":"sub",
    "channel":"alliance:99006756"
}

Public

There is a channel, "public", that provides information geared towards displaying TQ's current status and login count as well as the number of kills in the last hour. These are displayed on the navigation bar of every page on zkillboard.

{
    "action":"sub",
    "channel":"public"
}
Clone this wiki locally