Developers API
Bet Make
{{ 'HTTP POST /api/play?api_key=<API_KEY>' }}
Request body, JSON-encoded
Parameter name | Type | Required | Description | Example |
---|
symbol | string | yes | Currency symbol | "BTC" |
chance | string, decimal | yes | Bet chance, % | "88.88" |
isHigh | boolean | yes | High/Low | true |
amount | string, decimal | yes | Bet amount | "0.01" |
userWageringBonusHash | string | no | User's wagering bonus hash, link | "da49f4c33a" |
faucet | boolean | no | Faucet mode | true |
tleHash | string | no | TLE unique hash, link | "da4df4631f" |
Request Example
POST /api/play?api_key=5008fedc-3e4a-41a9-b078-b73be4b5249f HTTP/1.1
Content-Type: application/json
User-Agent: DuckDiceBot/1.0.0
Accept: */*
Cache-Control: no-cache
Host: duckdice.io
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 110
{
"symbol": "XLM",
"amount": "0.1",
"chance": "77.77",
"isHigh": true,
"faucet": false
}
Response, JSON-encoded
Parameter name | Type | Description | Example |
---|
bet | Bet | Bet object | See Bet |
isJackpot | boolean | true, if bet is jackpot | true |
jackpotStatus | boolean, nullable | Jackpot status, null if no jackpot, false if bet amount is below minimum required to obtain a jackpot. | true |
jackpot | object | Jackpot object, nullable | |
jackpot.amount | string, decimal | Jackpot amount | "10.38069307" |
user | User | User object | See User |
Bet
Parameter name | Type | Description | Example |
---|
hash | string | Unique bet hash | "bb7bd4578d9" |
symbol | string | Currency symbol | "XRP" |
result | boolean | Win/Lose | true |
isHigh | boolean | High/Low | true |
number | integer | Bet result number | 6559 |
threshold | integer | Bet threshold | 2222 |
chance | float | Bet chance, % | 77.77 |
payout | float | Bet payout multiplier | 1.273 |
betAmount | string, decimal | Bet amount | "0.004" |
winAmount | string, decimal | Win amount | "0.005092" |
profit | string, decimal | Win profit | "0.001092" |
mined | string, decimal | Decoy mined amount | "22.34302483" |
nonce | integer | Bet nonce | 12349977 |
created | integer | Created timestamp | 1705594955 |
gameMode | string | Game mode (main, faucet, bonus) | "main" |
User
Parameter name | Type | Description | Example |
---|
hash | string | Unique user hash | "ea6d2ba75a" |
level | integer | user paws | 2 |
username | string | Username | "DuckDiceBot" |
bets | integer | Total user's bets count | 6591995 |
nonce | integer | User's current seed's nonce | 95787 |
wins | integer | User's wins count | 1915822 |
luck | float | See Luck | 99.94 |
balance | string, decimal | User's balance in currency | "69.23805207" |
profit | string, decimal | User's profit in currency | "373.03978203" |
volume | string, decimal | User's wagering in currency | "77284.31558445" |
absoluteLevel | object | Absolute level data | |
absoluteLevel.level | integer | Absolute level | 31 |
absoluteLevel.xp | integer | Absolute level xp | 448338 |
absoluteLevel.xpNext | integer | XP to next level | 459700 |
absoluteLevel.xpPrev | integer | XP on previous level | 405700 |
Response Example
HTTP/1.1 200 OK
Date: Thu, 18 Jan 2024 14:33:47 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache, private
Server: cloudflare
Content-Encoding: gzip
{
"bet": {
"hash": "bb7bd4178d9",
"symbol": "XLM",
"result": true,
"isHigh": true,
"number": 6559,
"threshold": 2222,
"chance": 77.77,
"payout": 1.273,
"betAmount": "0.004",
"winAmount": "0.005092",
"profit": "0.001092",
"mined": "0.0012011",
"nonce": 81,
"created": 1705594955,
"gameMode": "main"
},
"isJackpot": true,
"jackpotStatus": true,
"jackpot": {
"amount": "100500.00"
},
"user": {
"hash": "ea6d2ba75a",
"level": 2,
"username": "DuckDiceBot",
"bets": 6591995,
"nonce": 82,
"wins": 1915822,
"balance": "69.23805207",
"profit": "373.03978203",
"volume": "77284.31558445",
"absoluteLevel": {
"level": 31,
"xp": 448338,
"xpNext": 459700,
"xpPrev": 405700
}
}
}
User info
{{ 'HTTP GET /api/bot/user-info?api_key=<API_KEY>' }}
Response, JSON-encoded
Parameter name | Type | Description | Example |
---|
hash | string | Unique user hash | "ea6d2ba75a" |
username | string | Username | "DuckDiceBot" |
createdAt | integer | User created timestamp | 1705594955 |
level | integer | user paws | 2 |
campaign | string, nullable | User's affiliate campaign tracking id | "a7614e787e" |
affiliate | string, nullable | Affiliate username | "Affiliate" |
lastDeposit | object, nullable | Last deposit | |
lastDeposit.createdAt | integer | Deposit created timestamp | 1705594955 |
lastDeposit.currency | string | Deposit currency | "BTC" |
lastDeposit.amount | string, decimal | Deposit amount | "0.01234511" |
wagered | array | Wagered amounts by currency | [] |
wagered.*.currency | string | Wager currency | "XRP" |
wagered.*.amount | string, decimal | Wager amount | "0.000222118" |
balances | array | User's balances | [] |
balances.*.currency | string | Balance currency | "BTC" |
balances.*.main | string, decimal, nullable | Main balance | "0.000111" |
balances.*.faucet | string, decimal, nullable | Faucet balance | "0.0919911" |
balances.*.affiliate | string, decimal, nullable | Affiliate balance | "0.0770099" |
wageringBonuses | array | Active wagering bonuses, see Wagering Bonus, only 1 item or empty | [] |
tle | array | Active / Finished TLEs | [] |
tle.*.hash | string | TLE unique hash | "a7614e787e" |
tle.*.name | string | TLE name | "Halloween" |
tle.*.status | string | Status (active/finished) | "active" |
Wagering Bonus
Parameter name | Type | Description | Example |
---|
name | string | Wagering bonus name | "January Deposit Bonus" |
type | string | general/no-deposit/rotatable | "general" |
hash | string | User's wagering bonus hash | "a7614e787e" |
status | string | Bonus status: active/canceled/wasted/expired/unlocked | "active" |
symbol | string | Users's bonus symbol | "XLM" |
margin | string, decimal | User's bonus margin amount | "123.00" |
Response Example
HTTP/1.1 200 OK
Date: Thu, 18 Jan 2024 14:33:47 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache, private
Server: cloudflare
Content-Encoding: gzip
{
"hash": "d6f7a12ab5",
"username": "DuckDiceBot",
"createdAt": 1568982432,
"campaign": "a7614e787e",
"affiliate": "Affiliate",
"level": 5,
"lastDeposit": {
"createdAt": 1591005477,
"currency": "XRP",
"amount": "0.75"
},
"wagered": [
{
"currency": "BTC",
"amount": "14.24675424"
},
{
"currency": "LTC",
"amount": "0.3914529"
},
{
"currency": "ETH",
"amount": "0"
},
{
"currency": "XRP",
"amount": "0"
},
{
"currency": "XLM",
"amount": "0"
}
],
"balances": [
{
"currency": "BTC",
"main": "0.00001",
"faucet": "0.005599"
},
{
"currency": "ETH",
"main": "0.0199",
},
{
"currency": "DECOY",
"main": "10022.167011"
}
],
"wageringBonuses": [
{
"name": "January Deposit Bonus",
"type": "general",
"hash": "d3f1f121b3",
"status": "active",
"symbol": "XLM",
"margin": "12.99",
}
],
"tle": [
{
"hash": "d6f1a12ab3",
"name": "Halloween",
"status": "active"
}
]
}