Kraken

Kraken agent API: login, users, game list, enter game, recharge, redeem and records.

Sections
12

Introduction#

TK Terminal API v1.22

API URL#

URL : https://krakenbackend.com:8033/ws/service.ashx

API Notes#

  1. When calculating sign, all strings should convert to lowercase。
  2. The length of string should not exceed 63 bits

Agent Login#

URL: /ws/service.ashx?action=agentLogin

Request: (Method: POST)

parameter typenecessitydescription
agentNamestringrequiredAgent name
agentPasswdstringrequiredAgent password after being encrypted by MD5
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())

Response

parametertypedescription
codeintResult code(200:success,201:failure)
msgstringIf result code is 201, this field will show message to tell the reason,Otherwise, there is no such field.
agentKeystringUse this field to calculate signature in subsequent API(notice:This field will change every time after the API agentLogin is successfully called)
BalanceintThe balance of agent

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=agentLogin&agentName=agent01&agentPasswd=e10adc3949ba59abbe56e057f20f883e&time=1598452539

call specifications: less than 30 times per minutes(< 30/M)

Register User Account#

URL: /ws/service.ashx?action=registerUser

Request: (Method: POST)

parametertypenecessitydescription
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
passwdstringrequiredPlayer password after being encrypted by MD5
agentNamestringrequiredAgent name
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Notice:When calculating sign, all strings should convert to lowercase,for example:

Md5(agentName.toLower() + time.toString()+agentKey.toLower())

Response

parametertypedescription
codeintResult code(200:success,201:failure)
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=registerUser&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

call specifications: less than 30 times per minutes(< 30/M)

Query User Information#

URL: /ws/service.ashx?action=queryInfo

Request: (Method: POST)

parametertypenecessitydescription
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
passwdstringrequiredPlayer password after being encrypted by MD5
agentNamestringrequiredAgent name
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequiredmd5(agentName+time+agentKey)

Response

parametertypedescription
codeintResult code(200:success,201:failure)
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.
agentBalanceintThe balance of agent.
gameIdintThe game id of user.
userbalanceintThe balance of user.
webLoginUrlstring

The quick login url for web game.

Referrence: http://play.krakenbackend.com/?OdGUUuFv+P0tyZjRXVrsOBWOvHe66hjtOpLjR4YDeLnQvmCLSh7t53rIB6bm7Kw8

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=queryInfo&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

call specifications: less than 30 times per minutes(< 30/M)

Change The Password Of User#

URL: /ws/service.ashx?action=changePasswd

Request: (Method: POST)

parametertypenecessitydescription
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
passwdstringrequiredPlayer password after being encrypted by MD5
passwdNewstringrequiredNew player password after being encrypted by MD5
agentNamestringrequiredAgent name
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Response

parametertypedescription
codeintResult code(200:success,201:failure)
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=changePasswd&account=test01&passwd=e10adc3949ba59abbe56e057f20f883e&passwdnew=e10adc3949ba59abbe56e057f20f883e&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

call specifications: less than 30 times per minutes(< 30/M)

Recharge#

URL: /ws/service.ashx?action=recharge

Request: (Method: POST)

parametertypenecessitydescription
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
amountintrequiredAmount to be recharged
agentNamestringrequiredAgent name
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Response

parametertypedescription
codeintResult code(200:success,201:failure)
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=recharge&account=test01&amount=1&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

Notice:After recharged or redeemed through the terminal API successfully, Remark field of Transaction Detail in web management system will be recorded as ‘terminal’+timestamp.

call specifications: less than 30 times per minutes(< 30/M)

Redeem#

URL: /ws/service.ashx?action=redeem

Request: (Method: POST)

parametertypenecessitydescription
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
amountintrequiredAmount to be redeemed.
agentNamestringrequiredAgent name
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Response

parametertypedescription
codeintResult code(200:success,201:failure)
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=redeem&account=test01&amount=1&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

call specifications: less than 30 times per minutes(< 30/M)

Get trade record#

URL: /ws/service.ashx?action=getTradeRecord

Request: (Method: POST)

parametertypenecessitydescription
agentNamestringrequiredAgent name
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
fromDatestringrequiredThe start time of this query.
toDatestringrequiredEnd time of this query
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Notice:The time span between “fromDate” and “toDate” should be less than 1 month. You can only query the transaction records within 1 month from the current time at most.

Response

parametertypedescription
codeintResult code(200:success,201:failure)
datajson
[{"account":"tian22","gameId":100131,"balanceBefore":100.00,"score":-50.00,"insertTime":"2023/5/4 11:51:09"}]

Data field explanation
balanceBefore:balance before redeem or recharge.
insertTime: redeem/recharge date.
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=getTradeRecord&account=test01&agentName=agent01&fromDate=2023-04-01 00:00:00&toDate=2023-05-01 00:00:00&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

Notice:

  1. the ”insertTime” in data field is Beijing time.
  2. If the “score” in data field is positive, it indicates recharge action, and if it is negative, it indicates redeem action.

call specifications: less than 10 times per minutes(< 10/M)

Get Jp record#

URL: /ws/service.ashx?action=getJpRecord

Request: (Method: POST)

parametertypenecessitydescription
agentNamestringrequiredAgent name
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
fromDatestringrequiredThe start time of this query.
toDatestringrequiredThe end time of this query.
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Notice:The time span between “fromDate” and “toDate” should be less than 1 month.

Response

parametertypedescription
codeintResult code(200:success,201:failure)
datajson
[{"account":"test112","gameId":100283,"type":"Mini","score":26.13,"insertTime":"2023/5/4 9:31:02"}]
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=getjprecord&account=test01&agentName=agent01&fromdate=2023-04-01 00:00:00&todate=2023-05-01 00:00:00&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

Notice:the ”insertTime” in data field is Beijing time.

call specifications: less than 10 times per minutes(< 10/M)

Get game record#

URL: /ws/service.ashx?action=getGameRecord

Request: (Method: POST)

parametertypenecessitydescription
agentNamestringrequiredAgent name
accountstringrequiredAccount of players,The length should be between 6 to 32 chars.
timelongrequiredTime stamp(refer to C # api System.currentTimeMillis())
signstringrequired=md5(agentName+time+agentKey)

Response

parametertypedescription
codeintResult code(200:success,201:failure)
datajson
[{"account":"test102","gameId":100567,"balanceBefore":11112.79,"totalPlayed":0.10,"totalWin":0.40,"balanceNow":11113.19,"reason":"Exit Game","insertTime":"2023/5/4 12:21:58"}]
Data field explanation
balanceBefore:balance before game.
totalPlayed: total played.
totalWin: total win.
balanceNow: balance now.
Reason: Recording notes.
insertTime:Recording time.
msgstringIf result code is 201 this field will show message to tell the reason,Otherwise, there is no such field.

reference:

https://krakenbackend.com:8033/ws/service.ashx?action=getGameRecord&account=test01&agentName=agent01&time=1598452539&sign=7b35f60db33dcfd237fdb48cb5de97c5

Notice:Game records can be traced back to for the last 7 days from current time.

call specifications: less than 10 times per minutes(< 10/M)