Returns json data about coin settings - minimum bet, maximum win, min payout, max payout and house edge
URL
/v1/settings/:coin
Method:
GET
URL Params
Required:
coin=[string]
Data Params
None
Success Response:
{"Coin":"BTC","MinBet":0.000000010000000000,"MaxWin":1.000000000000000000,"MinPayout":1.02,"MaxPayout":9920.0,"Edge":0.80}
Error Response:
{"Message":"Coin not found"}
Sample Call:
$.ajax({
url: "https://api.crypto.games/v1/settings/BTC",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Returns json data with users balance
URL
/v1/balance/:coin/:key
Method:
GET
URL Params
Required:
coin=[string]
, key=[string]
Data Params
None
Success Response:
{"Balance":0.16944007}
Error Response:
Code: 404 NOT FOUND
Content: {"Message":"Coin not found"}
Content: {"Message":"API key not found"}
Sample Call:
$.ajax({
url: "https://api.crypto.games/v1/balance/BTC/7Ii8vdPBUBfTPHcuzkHuhftkGD43iWwbFkdwBQa7GL8R4AwBr3",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Returns json data with user stats. Wagered stats for dice game.
URL
/v1/user/:coin/:key
Method:
GET
URL Params
Required:
coin=[string]
, key=[string]
Data Params
None
Success Response:
{"Nickname":"Joter","Balance":0.16944007,"Coin":"BTC","TotalBets":20677,"Profit":-0.644024167765000000,"Wagered":27.3980453600000000,"PendingReferer":0.0000000000000000}
Error Response:
{"Message":"Coin not found"}
Sample Call:
$.ajax({
url: "/v1/user/BTC/7Ii8vdPBUBfTPHcuzkHuhftkGD43iWwbFkdwBQa7GL8R4AwBr3",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Returns json data with next server seed hash
URL
/v1/nextseed/:coin/:key
Method:
GET
URL Params
Required:
coin=[string]
, key=[string]
Data Params
None
Success Response:
{"NextServerSeedHash":"137c70e1ef4e193744ee45177a04a49f1f2f68653b8bcb91ae209eebda33502c"}
Error Response:
{"Message":"Coin not found"}
Sample Call:
$.ajax({
url: "https://api.crypto.games/v1/nextseed/BTC/7Ii8vdPBUBfTPHcuzkHuhftkGD43iWwbFkdwBQa7GL8R4AwBr3",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Returns json data with bet details
URL
/v1/bet/:id
Method:
GET
URL Params
Required:
id=[integer]
Data Params
None
Success Response:
{"BetId":327333162, "User":"Joter","Roll":47.002,"Bet":0.000010240000000000,"Coin":"BTC ","Target":" < 49.600","Profit":0.000010240000000000,"ServerSeed":"5PCWsiBDsZ1D07cZ14pYKt0T2HUCkcLoTdF70Cmp","ClientSeed":"CTThgTlac54qK2lahvLicrFlJsJmSIEkRMt4VcuN","DateCreated":"2016-04-14T13:55:14.607"}
Error Response:
{"Message":"Invalid bet ID"}
Sample Call:
$.ajax({
url: "https://api.crypto.games/v1/bet/327333162",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Accepts bet settings and returns json data with bet result
URL
/v1/placebet/:coin/:key
Method:
POST
URL Params
Required:
coin=[string]
, key=[string]
Data Params
Required:
{ "Bet": 0.00001024, "Payout": 2.0, "UnderOver": true, "ClientSeed": "somerandomseed" }
UnderOver is target result. Example: < 49.600 or > 50.399
Success Response:
{ "BetId": 327333162, "Roll": 47.002, "UnderOver": true, "ClientSeed": "somerandomseed", "Target": " < 49.600", "Profit": 0.000010240000000000, "Payout": 2.0, "ServerSeed": "5PCWsiBDsZ1D07cZ14pYKt0T2HUCkcLoTdF70Cmp", "NextServerSeedHash": "4647c8c18b7da5d7174614c6e473864956b42fadf84e24a2f08bd9c2aa69a268", "Balance": 0.010010240000000000 }
Error Response:
{"Message":"Coin not found"}
{"Message":"Invalid input parameters"}
Sample Call:
var input = { Bet: 0.00001024, Payout: 2.0, UnderOver: true, ClientSeed: "somerandomseed" };
$.ajax({
url: "https://api.crypto.games/v1/placebet/BTC/7Ii8vdPBUBfTPHcuzkHuhftkGD43iWwbFkdwBQa7GL8R4AwBr3",
data: JSON.stringify(input),
dataType: "json",
contentType: "application/json",
type: "POST",
success: function (r) {
console.log(r);
}
});