Skip to content
Deadlock Live Events
Live Events API · v1

<500ms* Deadlock match events for betting platforms.

Idempotent, fail-open delivery — deterministic event IDs are deduplicated at the edge so your consumers never see a repeat.

javascript
// 1. POST /v2/subscribe — get a Centrifugo connection token for one match
const res = await fetch('https://live.deadlock-api.com/v2/subscribe', {
  method: 'POST',
  headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ match_id: MATCH_ID }),
});
const { url, channel, token } = await res.json();

// 2. Connect with centrifuge-js and receive events in real time
const client = new Centrifuge(url, { token });
client.newSubscription(channel)
  .on('publication', e => console.log(e.data))
  .subscribe();
client.connect();

< 500 ms*

Parse-to-delivery

99.999 %*

Reliability per match

168 h

Event retention

Workers, deduped at the edge

* Operational target. Contractual SLAs are available on request — see Terms § 5.

Valve's spectate API introduces a 60–90 s delay relative to real game time for public matches. Parse-to-delivery latency is measured from when the event enters our pipeline.

Integration

How it works

  1. POST /v2/subscribe

    Hand us a match ID and your API key. We confirm the match is live and provision the event stream.

  2. Receive a scoped Centrifugo token

    The response carries a signed connection token with a pre-authorised subscription for the match channel.

  3. Connect with any Centrifugo SDK

    Pass the url and token to centrifuge-js (or any Centrifugo client SDK — Python, Go, browser) and receive events in real time.

Schema

Event catalogue

Event names

Items marked default ship in the baseline subscription; everything else is opt-in via the event_filter field on POST /api/v1/subscribe.

{entity}_entity_create
default
{entity}_entity_update
default
{entity}_entity_delete
default
{entity}_entity_leave
default
tick_end
hero_killed
default
banned_heroes
default
chat_message
default
state_jump_warning
default
end
default

Entity types

game_rules_proxy
default
player_controller
player_pawn
team
mid_boss
trooper
trooper_neutral
trooper_boss
trooper_barrack_boss
shielded_sentry
base_defense_sentry
boss_tier2
boss_tier3
destroyable_building
breakable_prop
breakable_prop_modifier_pickup
breakable_prop_gold_pickup
punchable_powerup
sinners_sacrifice
ability_melee_parry
See full catalogue →

SDK

Integration

javascript
import { Centrifuge } from 'centrifuge';

const API_KEY = process.env.DEADLOCK_API_KEY;
const MATCH_ID = 28850808;

// 1. Subscribe — receive a Centrifugo connection token for one match
const resp = await fetch('https://live.deadlock-api.com/v2/subscribe', {
  method: 'POST',
  headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ match_id: MATCH_ID }),
});
const { url, channel: channelName, token } = await resp.json();

// 2. Connect via centrifuge-js
const client = new Centrifuge(url, { token });
const sub = client.newSubscription(channelName);

// 3. Attach listeners
sub.on('publication', (e) => {
  const data = e.data;
  if (data?.entity_type === 'player_controller' && data.event_type === 'entity_update') {
    console.log(`${data.steam_name} KDA: ${data.kills}/${data.deaths}/${data.assists}`);
  } else if (data?.event_type === 'end') {
    console.log('Match complete');
    client.disconnect();
  }
});

sub.subscribe();
client.connect();
More languages →

Guarantees

Built for reliability

  • Automatic failover — internal outages never reach your consumers.
  • Deterministic event IDs — duplicate events are collapsed before delivery, every retry is idempotent.
  • Resync warnings when game state jumps — pause settlement until the gap is filled. See state_jump_warning.
  • Fail-open billing — payment processor outages never block event delivery.
  • Zero-downtime releases — no match abandoned during a deploy.

Pricing

0.50 per match

Usage-metered. No seat fees, no minimum commitment.