---
# System prepended metadata

title: vp-schedule LoL 賽事即時數據api

---

**即時數據**
----
 個局(match)的賽事資訊
 
 ![截圖 2024-04-19 下午2.38.18](https://hackmd.io/_uploads/SJ6w-91W0.png)

 ![截圖 2024-03-28 下午6.13.01](https://hackmd.io/_uploads/BywpMazk0.png)

 ![截圖 2024-03-28 下午6.02.02](https://hackmd.io/_uploads/r1ENgTGJC.png)


* **URL**

  https://event-api.vpgame.com/api/v1/schedule/lol/live/matchframe
  
  deprecated
  https://www.vpgame.com/schedule/sha/lol/pro/live/match-frame
  

* **Method:**
  

  `GET`
  
*  **URL Params**


   **Required:**
   
    `match_id= 12345`

   **Optional:**
   
   `as= timestamp` // anti crawler seed
   
   `cp= md5(parseInt(as * 2 / 3 + 4 - 5))` // anti crawler secret
   


* **Success Response:**
  

  * **Code:** 200 <br />
    **Content:** 
    ```
    {
      "status": 200,
      "message": "success",
      "data": {
		  blue: {                 // 藍隊
		    id: 1234,
		    kills: 5,             // 擊殺數
		    gold: 2000,           // 經濟
		    first_kills: true,    // 首殺
		    five_kills: false,    // 五殺
		    drakes: 1,           // 小龍
		    nashors: 1,          // 大龍
		    towers: 3,           // 塔數
		    gold_history: [      // 經濟曲線
		      {
		        gold: 0,         // 經濟
		        timestamp: 0,    // 秒數
		      },
		      {
		        gold: 2000,
		        timestamp: 300,
		      },
		      {
		        gold: 4000,
		        timestamp: 600,
		      },
		      {
		        gold: 6000,
		        timestamp: 900,
		      },
		      {
		        gold: 8000,
		        timestamp: 1200,
		      },
                ...
		    ],
		    players: {        
		          top: {           // 對線位置
		      	     kills: 3,     // 擊殺數
		      	     deaths: 3,    // 死亡數
		      	     assists: 15,  // 助攻數
		      	     cs: 181,      // 吃兵數
		      	     items: [      // 裝備(最多7個)
		      	       {
		      	         name: 'itemName',
		      	         id: 1,
		      	       },
		      	       ...
		      	     ],
		      	     summoner_spells: [ // 召喚師技能 (2個)
		      	       {
		      	         name: 'summoner_spells_name1',
		      	         resource_name: 'icon',
		      	       },
		      	       {
		      	         name: 'summoner_spells_name2',
		      	         resource_name: 'icon',
		      	       },
		      	     ],
		      	     champion: {
		      	       name: 'champion_name',
		      	       resource_name: 'icon',
		      	     },
		      	     name: 'player_name',
		      	     id: 'player_id',
		      	     level: 13,    // 等級
		      	 },
                    jungle : {
                     (略)
                    },
                    middle : {
                     (略)
                    },
                    AD : {
                     (略)
                    },
                    support : {
                     (略)
                    }
		     },
		  },
		  red: {  // 紅隊
		    (略)
		  },
		  current_timestamp: 720, // 秒數
		  match_id: 12345,
		  finished: false,
		  winner_id: 1234 // 有分勝負才有值
		},
      "statusCode": 200
    }
    ```
 
* **Error Response:**

  * **Code:** 120500100  <br />
    **Content:**
    ```
    {
      "code": 120500100,
      "message": "wrong anti crawler seed and secret, are you a crawler ?",
      "success": false
    }
    ```

* **Sample Call:**

  https://event-api.vpgame.com/api/v1/schedule/lol/live/matchframe?match_id=121

* **Notes:**