When an app wants to receive events from the Game Events Provider it needs to set the requested features from the Game Events Provider.
Each feature corresponds to events by that name paired with event info, so for example when an app registers to DOTA events like the following:['game_state_changed', 'death'], function(info) {

the app could receive the game_state_changed and death events.

so registering to game events this way: {
console.log('EVENT FIRED: ' + JSON.stringify(info));

will print to the console these lines when the events will be triggered:

EVENT FIRED: {"events":[{"name":"death","data":"{\r\n \"deaths\": \"1\"\r\n}"}]}
EVENT FIRED: {"events":[{"name":"game_state_changed","data":"{\r\n \"game_state\": \"playing\",\r\n \"match_state\": \"DOTA_GAMERULES_STATE_INIT\",\r\n \"match_id\": \"0\",\r\n \"player_steam_id\": \"76561198035324451\"\r\n}"}]}

Sample app

Game id: 7314


Event Info Trigger Notes
  • game_state – One of ‘playing’, ‘idle’ or ‘spectating’. Idle is when there isn’t a game being played or spectated. 
  • match_state – The internal match state. See ‘match_state_changed’ event for more info. 
  • match_id (not available for ‘idle’): The id of the match. 
  • player_steam_id (not available for ‘idle’): The Steam id of the local player.
The user starts playing, spectating or stops playing (no game available to play or spectate). Note that simply bringing the menu is not enough to trigger the ‘idle’ event – the active game (played or spectated) must be closed.  

match_state – One of the following:

The internal game match state has changed.
  • DOTA_GAMERULES_STATE_WAIT_FOR_PLAYERS_TO_LOAD – Shown with the pre-game “Waiting for loaders” screen.

  • DOTA_GAMERULES_STATE_HERO_SELECTION – Shown with the hero selection screen.

  • DOTA_GAMERULES_STATE_PRE_GAME – Shown when the game begins, before the battle horn is heard.

  • DOTA_GAMERULES_STATE_GAME_IN_PROGRESS – Shown with the start game battle horn.

  • DOTA_GAMERULES_STATE_POST_GAME – Shown with the in-game post-game screen.
  • gameMode – One of the supported game modes. 
  • playersInfo – An array of 10 player infos with the following fields: 
    • faction – Radiant/Dire
    • isLocalPlayer – True if this is the info for the local player, false otherwise.
    • playerIndex – The index of this player (0 – 9, left to right).
    • steamId – The Steam Id of the player.
As soon as 10 players accepted a match (just after the ‘Accept Match’ prompt).  Supported game modes:
  • AllPick
  • AllPickRanked
  • SingleDraft
  • RandomDraft
  • AllRandom
  • LeastPlayed
  • LimitedHeroes
  • CaptainsMode
  • CaptainsDraft
  • heroName – The name of the picked hero.  
  • playerIndex – The index of the player (0 – 9, left to right). 
  • pickConfirmed  – True if this a finalized pick (not a random->repick pick).
  • For a full list of hero names you can watch the names in the urls in DotaBuff’s website.

  • pickConfirmed does not currently support hero swapping. If you receive a hero pick event with a pickConfirmed = true before hero swapping, this means you will not receive a new event until support is implemented. Also, pick confirmed will only happen after the pick stage, when the match is starting.

Only supported using DirectX 9 and one of the following resolutions:

  • 16:9: 2560×1440, 1920×1080, 1600×900, 1536×864, 1366×768, 1360×768, 1280×720
  • 16:10: 1920×1200, 1680×1050, 1440×900, 1280×800
  • 4:3: 2048×1536, 1920×1440, 1600×1200, 1280×960, 1152×864, 1024×768, 800×600, 640×480
  • daytime – True if it is current day time, false otherwise.

  • clock_time – The amount of seconds from when the game clocked shows (0:00). It can be negative during the Pre-Game phase.

  • nightstalker_night – True if it is currently a Night Stalker ultimate night. 
Fired when the game transitions between day time and night time.   
clock_time_changed  Same as ‘map_daytime_changed’.  Fired every second.   
  • ward_purchase_cooldown – The cooldown, in seconds, until wards are available for purchase again. 
Fired every second where wards are on cooldown.   
  • winner – radiant/dire 
When the game ends (an ancient is destroyed).   
  • kills – The total number of kiils the player has.

  • kill_streak – The current number of kills without dying to an enemy champion (denying oneself does not reset this counter).

  • label – the type of kill (kill/double_kill/triple_kill/ultra_kill/rampage)
Whenever the player kills an enemy champion.   
  • assists – The total number of assists the player has. 
Whenever the player assists in a kill of an enemy champion.   
  • deaths – The total number of deaths the player has. 
Whenever the player dies.   
  • last_hits – The total amount of last hits (not denies) the player has.

  • denies – The total amount of denies the player has.

  • type – last_hist/deny.
Whenever the player last hits/denies non-champion units that grant creep score.   
  • xpm – The current XPM. 
Whenever the XPM changes.   
  • gpm – The current GPM. 
Whenever the GPM changes.   
  • gold – The current gold.

  • gold_reliable – The reliable gold part.

  • gold_unreliable – The unreliable gold part.
Whenever the gold changes.   
  • hero_level – The current hero level. 
Whenever the player levels up.   
hero_respawned N/A Whenever the player respawns. This is also applicable for buying back.  
  • buyback_cost – The gold cost to buyback

  • buyback_cooldown – The cooldown remaining for buyback to become available.
Every 4 seconds and every level up, since the buyback cost is affected by game time and player level. It will also be called every second when buyback is on cooldown.  
  • buyback_cooldown – The cooldown remaining for buyback to become available.
Whenever the player buys back.  
  • health – The current health.

  • max_health – The current maximal health.

  • mana – The current mana.

  • max_mana – The current maximal mana.
Whenever either of the players mana, health, max mana or max health changes.  
  • silenced – True if the player is silenced, false otherwise.

  • stunned – True if the player is stunned, false otherwise.

  • disarmed – True if the player is disarmed, false otherwise.

  • magicimmune – True if the player is magic immune, false otherwise.

  • hexed – True if the player is hexed, false otherwise.

  • muted – True if the player is muted, false otherwise.

  • break – True if the player is broken, false otherwise.

  • has_debuff – True if the player is affected by any debuff, false otherwise.
Whenever any of these effects changes.  
  • attributes_level – The current level of the player’s attributes.
Whenever the player skills up his attributes.  
  • slot – The index of the ability slot (0 – 5, left to right)

  • name – The name of the ability.

  • level – The current level of the ability.

  • can_cast – True unless  the ability is not skilled, there’s not enough mana to cast it, the player is silenced, or is on cooldown.

  • passive – True if the ability is passive.

  • ability_active – Unknown, TBD.

  • cooldown – The remaining cooldown until the ability is ready to cast.

  • ultimate – True if the ability is an ultimate ability.
Whenever the player skills up an ability.  
hero_ability_used Same as ‘hero_ability_skilled’ Whenever the player uses an ability.  
hero_ability_cooldown_changed Same as ‘hero_ability_skilled’ Whenever an ability’s remaining cooldown is changed.  
hero_ability_changed Same as ‘hero_ability_skilled’ Whenever an ability’s name changes.  
  • slot – The index of the item slot (0 – 5, top row from the left to bottom row from the right)

  • location – hero/stash

  • name – The name of the item.

  • passive – True if the item is passive.

  • can_cast – True unless there’s not enough mana to use the item, the player is muted, or when the item is on cooldown. (only when passive = false)

  • cooldown – The remaining cooldown until the item is ready to be used. (only when passive = false)

  • charges – The remaining charges of the item (only when passive = false and where item can be charged)
Whenever the item name in some hero/stash slot changes. This would mean that swapping items will trigger 2 events, one for each item.  
hero_item_used Same as ‘hero_item_changed’ Whenever an item is used – Essentially this means when the item goes on cooldown.   
hero_item_consumed Same as ‘hero_item_changed’ Whenever an item’s charges decrease.   
hero_item_charged Same as ‘hero_item_changed’ Whenever an item’s charges increase. location is always ‘hero’
Also triggered when item charges are increased due to kills (Bloodstone, Urn of Shadows).