获取公开抽卡记录
curl --request GET \
--url https://api.renaiss.xyz/v2/gacha/packs/{slug}/pull-historyconst options = {method: 'GET'};
fetch('https://api.renaiss.xyz/v2/gacha/packs/{slug}/pull-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.renaiss.xyz/v2/gacha/packs/{slug}/pull-history"
response = requests.get(url)
print(response.text){
"pulls": [
{
"tokenId": "<string>",
"name": "<string>",
"tier": "TOP",
"buybackBaseValueInUsd": "<string>",
"buybackBonus": {
"originalBuybackBaseValueInUSD": "<string>",
"bonusBps": 123
},
"frontImageUrl": "<string>",
"imageUrl": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"hasMore": true
}
}{
"code": "WRONG_REQUEST_PARAMS",
"message": "<string>"
}{
"error": "Invalid authentication credential",
"code": "API_AUTH_INVALID_CREDENTIAL"
}{
"error": "Credential is not allowed by this policy",
"code": "API_AUTH_CREDENTIAL_NOT_ALLOWED"
}{
"code": "CARD_PACK_NOT_FOUND",
"message": "<string>"
}{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}{
"code": "FUNCTION_ERROR",
"message": "Unable to load pull history"
}卡包目录
查询公开抽卡记录
查看卡包最近公开的抽卡记录,最新的排在最前。限量卡包返回空列表。
GET
/
v2
/
gacha
/
packs
/
{slug}
/
pull-history
获取公开抽卡记录
curl --request GET \
--url https://api.renaiss.xyz/v2/gacha/packs/{slug}/pull-historyconst options = {method: 'GET'};
fetch('https://api.renaiss.xyz/v2/gacha/packs/{slug}/pull-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.renaiss.xyz/v2/gacha/packs/{slug}/pull-history"
response = requests.get(url)
print(response.text){
"pulls": [
{
"tokenId": "<string>",
"name": "<string>",
"tier": "TOP",
"buybackBaseValueInUsd": "<string>",
"buybackBonus": {
"originalBuybackBaseValueInUSD": "<string>",
"bonusBps": 123
},
"frontImageUrl": "<string>",
"imageUrl": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"hasMore": true
}
}{
"code": "WRONG_REQUEST_PARAMS",
"message": "<string>"
}{
"error": "Invalid authentication credential",
"code": "API_AUTH_INVALID_CREDENTIAL"
}{
"error": "Credential is not allowed by this policy",
"code": "API_AUTH_CREDENTIAL_NOT_ALLOWED"
}{
"code": "CARD_PACK_NOT_FOUND",
"message": "<string>"
}{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}{
"code": "FUNCTION_ERROR",
"message": "Unable to load pull history"
}- 何时公开。 回购期结束或抽卡结果确定满 24 小时后公开,以较早者为准。回购期超过 24 小时的卡牌在公开后仍可能允许回售。
- 返回内容。 每条记录都已上链。列表省略卡包资料和抽卡时间,揭晓时间可能与购买时间不同。
- 分页范围。 根据
hasMore翻页,最多可查看最近 100 次抽卡。offset达到或超过 100 时返回空页。
请求
开发者密钥可选
响应
错误码
在下表中查找接口返回的 HTTP 状态码和响应原文。有关各接口通用的处理建议,请参阅错误码含义与处理方式。
| HTTP | 错误码 | 文本字段 | 响应文本与处理方式 |
|---|---|---|---|
400 | INVALID_SCHEMA | message | Unable to load pull history |
400 | WRONG_REQUEST_PARAMS | message | Bad request - invalid parameters |
401 | API_AUTH_INVALID_CREDENTIAL | error | Invalid authentication credential开发者密钥格式错误、未知、已过期或已撤销。请核对并更换密钥。 |
403 | API_AUTH_CREDENTIAL_NOT_ALLOWED | error | Credential is not allowed by this policy省略全部凭据,或仅通过 x-builder-api-key 发送可选的开发者密钥。 |
403 | GACHA_V3_BUILDER_NOT_ACCEPTED_ON_PUBLIC_API | error | This builder checks out on its own surface, not on the public API此密钥无法用于当前 API。请联系 Renaiss,无需重试。 |
404 | CARD_PACK_NOT_FOUND | message | Pack not found |
429 | API_AUTH_RATE_LIMITED | error | Authentication rate limit exceeded已达到密钥的请求频率上限。稍候再以较低频率重试。 |
500 | API_AUTH_ERROR | error | Internal server error |
500 | FUNCTION_ERROR | error | Internal server error |
500 | FUNCTION_ERROR | message | Unable to load pull history |
500 | CARD_PACKS_QUERY_FAILED | message | Unable to load pull history请稍后重新查询。 |
500 | 其他错误码 | message | Unable to load pull history |