MG+ K2 Common Wallet API Integration Quick Guide
Breadcrumbs

Bets (Bet by Bet)

This API is used to retrieve transactional data for placed bets.

  1. Find your API URL. This can be found in MG+ Backoffice, or given to you by your Account Manager.

    image-20240327-075225.png
  2. Create a request.

    1. Replace the URL with your API URL and DemoAgent with your Agent Code.

      1. In the request example, this is the api-demo.k2net.io and the DemoAgent portions of the endpoint.

    2. Set the Authorization token to be your STS Token.

      1. In the request example, this is the (STS Token) portion of the request header.

Request Example

GET https://api-demo.k2net.io/api/v1/agents/DemoAgent/bets?limit=1


Request Headers

Content-Type: application/x-www-form-urlencoded
Authorization: (STS Token)


  1. You should receive a 200 response.

Response Example

200 Response Body Example

JSON
[
  {
    "betUID": "0351406A0199430B000100000006EA15035B",
    "createdDateUTC": "2022-02-16T06:35:40.497",
    "gameStartTimeUTC": "2022-02-16T06:34:37.113",
    "gameEndTimeUTC": "2022-02-16T06:34:37.113",
    "playerId": "playerId",
    "productId": "SMG",
    "productPlayerId": "M0G295682018",
    "platform": "Desktop",
    "gameCode": "SMG_108Heroes",
    "currency": "CNY",
    "betAmount": 3.7500,
    "payoutAmount": 0.0000,
    "betStatus": "Closed",
    "PCA": null,
    "externalTransactionId": "1005639168/720",
    "metadata": {
      "SessionId": "1005639168",
      "TransactionId": "720"
    }
  }
]


Checklist

  • Did you use the correct API URL from your Account Manager or MG+ Backoffice?
  • Did you put /api/v1/ after your API URL?
  • Did you use the GET method?
  • Did you put the STS Token in the Authorization request header?
  • Have you included all the required parameters?