Skip to main content

VoteGiveaway

The API related to voting and Giveaway information.

GEThttps://open.debox.pro/openapi/vote/info

Obtain the number of votes cast by the current address user in the current group

Parameters

app_id : String Unique app identifier, obtain from DeBox Open Platform

X-API-KEY : String Developer API Key, obtain from DeBox Open Platform

nonce : String Random number, 8 digits long

timestamp : String Timestamp, accurate to milliseconds

signature : String sha1 calculated signature, must strictly follow the signature calculation rules below

Signature calculation rules:

// keep sequence:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp})
appsecret: Developer App Secret, obtain from [DeBox Open Platform](https://developer.debox.pro/)

Signature calculation requires signing the random number and timestamp using the Developer App Secret corresponding to the X-API-KEY.

Query

wallet_address : Wallet address, which represents a user

chain_id : Blockchain network ID, default 1, Ethereum Mainnet

group_invite_url : Group share URL, which represents a group

Responses

200: OK
# vote_number   Number of votes
{
"code": 200,
"data": {
"vote_number": 6//Number of votes
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

GEThttps://open.debox.pro/openapi/lucky_draw/info

Get the number of Luckydraws of the current address user in the current group

Parameters

Header

app_id : String Unique app identifier, obtain from DeBox Open Platform

X-API-KEY : String Developer API Key, obtain from DeBox Open Platform

nonce : String Random number, 8 digits long

timestamp : String Timestamp, accurate to milliseconds

signature : String sha1 calculated signature, must strictly follow the signature calculation rules below

Signature calculation rules:

// keep sequence:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp})
appsecret: Developer App Secret, obtain from [DeBox Open Platform](https://developer.debox.pro/)

Signature calculation requires signing the random number and timestamp using the Developer App Secret corresponding to the X-API-KEY.

Query

wallet_address : Wallet address, which represents a user

chain_id : Blockchain network ID, default value 1, Ethereum mainnet

group_invite_url : Group share URL, which represents a group

Responses

200: OK
# initiate_luckDraw_total Total number of draws initiated
# luckDraw_total Total number of entries to the draw
# luckDraw_win_total Total number of wins
{
"code": 1,
"data": {
"initiate_luckDraw_total": 3,
"luckDraw_total": 3,
"luckDraw_win_total": 3
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}