跳到主要内容

红包信息

GEThttps://open.debox.pro/openapi/lucky_box/user

获取钱包地址用户收/发的红包信息

Parameters

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,以太坊主网

Responses

200: OK
# receive_luckyBox_number  领取红包个数
# receive_luckyBox_total 领取红包数量(金额)
# send_luckyBox_number 发送红包个数
# send_luckyBox_total 发送红包数量(金额)
{
"code": 1,
"data": {
"receive_luckyBox_number": 12,
"receive_luckyBox_total": 1235.9,
"send_luckyBox_number": 18,
"send_luckyBox_total": 3199.58
},
"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_box/user/group

某个用户在特定群组领取红包的数目

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 : 选择要从中获取数据的区块链网络

group_invite_url : 群组分享url,代表某个群组

Responses

200: OK
# receive_luckyBox_number  领取红包数量
{
"code": 1,
"data": {
"receive_luckyBox_number": 8//领取红包数量
},
"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_box/group

获取当前群组发放红包总量,使用示例:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/lucky_box/group?\
group_invite_url=https://m.debox.pro/group?id=fxi3hqo5"

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

group_invite_url : 群组分享 url ,代表某个群

Responses

200: OK
# sum_amount 发送vBOX数量
# total_num 发送的个数
{
"code": 200,
"data": {
"sum_amount": 3896,
"total_num": 30
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}