投票&抽奖
GEThttps://open.debox.pro/openapi/vote/info
获取钱包地址用户在某群组的投票数量
Parameters
Header
app_id
: String
应用唯一标识,在DeBox开放平台申请
X-API-KEY
: String
开发者 API Key,在DeBox开放平台获取
nonce
: String
随机数字,长度 8 位
timestamp
: String
时间戳,精确到毫秒
signature
: String
签名,需严格按照下方的签名计算规则计算
- 签名计算规则:
// 顺序必须必须严格按:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp}) - 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名
- appsecret: 开发者 App Secret,在DeBox开放平台获取
Query
wallet_address
: 钱包地址,代表某个用户
chain_id
: 区块链网络ID,默认值1,以太坊主网
group_invite_url
: 群组分享url,代表某个群组
Responses
200: OK
# vote_number 投票数量
{
"code": 200,
"data": {
"vote_number": 6//投票数量
},
"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
获取钱包地址用户在某群组的抽奖数量
Parameters
Header
app_id
: String
应用唯一标识,在DeBox开放平台申请
X-API-KEY
: String
开发者 API Key,在DeBox开放平台获取
nonce
: String
随机数字,长度 8 位
timestamp
: String
时间戳,精确到毫秒
signature
: String
签名,需严格按照下方的签名计算规则计算
- 签名计算规则:
// 顺序必须必须严格按:appsecret -> nonce -> timestamp
signature = SHA1({appsecret}{nonce}{timestamp}) - 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名
- appsecret: 开发者 App Secret,在DeBox开放平台获取
Query
wallet_address
: 钱包地址,代表某个用户
chain_id
: 区块链网络ID,默认值1,以太坊主网
group_invite_url
: 群组分享url,代表某个群组
Responses
200: OK
# initiate_luckDraw_total 发起抽奖总次数
# luckDraw_total 参与抽奖总次数
# luckDraw_win_total 中奖总次数
{
"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"}