按付款交易列出钱包已完成的抽卡
curl --request GET \
--url https://api.renaiss.xyz/v2/gacha/pull-history \
--header 'x-builder-api-key: <api-key>'const options = {method: 'GET', headers: {'x-builder-api-key': '<api-key>'}};
fetch('https://api.renaiss.xyz/v2/gacha/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/pull-history"
headers = {"x-builder-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"pulls": [
{
"permitFundTxHash": "<string>",
"buyerWalletAddress": "<string>",
"packId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packName": "<string>",
"status": "PENDING_RESOLUTION",
"numOfTokens": 123,
"pulledAt": "2023-11-07T05:31:56Z",
"draws": [
{
"settlementId": "<string>",
"tokenId": "<string>",
"releaseTxHash": "<string>",
"buybackTxHash": "<string>"
}
]
}
],
"limit": 123,
"offset": 123,
"hasMore": true
}{
"code": "WRONG_REQUEST_PARAMS",
"message": "Bad request - invalid parameters"
}{
"error": "Required authentication credential is missing",
"code": "API_AUTH_MISSING_CREDENTIAL"
}{
"error": "Credential is not allowed by this policy",
"code": "API_AUTH_CREDENTIAL_NOT_ALLOWED"
}{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}{
"error": "Internal server error",
"code": "FUNCTION_ERROR"
}抽卡与回购
查询钱包抽卡记录
列出该钱包通过你的应用完成的抽卡。接口先按钱包和开发者筛选,再分页返回结果。
GET
/
v2
/
gacha
/
pull-history
按付款交易列出钱包已完成的抽卡
curl --request GET \
--url https://api.renaiss.xyz/v2/gacha/pull-history \
--header 'x-builder-api-key: <api-key>'const options = {method: 'GET', headers: {'x-builder-api-key': '<api-key>'}};
fetch('https://api.renaiss.xyz/v2/gacha/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/pull-history"
headers = {"x-builder-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"pulls": [
{
"permitFundTxHash": "<string>",
"buyerWalletAddress": "<string>",
"packId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packName": "<string>",
"status": "PENDING_RESOLUTION",
"numOfTokens": 123,
"pulledAt": "2023-11-07T05:31:56Z",
"draws": [
{
"settlementId": "<string>",
"tokenId": "<string>",
"releaseTxHash": "<string>",
"buybackTxHash": "<string>"
}
]
}
],
"limit": 123,
"offset": 123,
"hasMore": true
}{
"code": "WRONG_REQUEST_PARAMS",
"message": "Bad request - invalid parameters"
}{
"error": "Required authentication credential is missing",
"code": "API_AUTH_MISSING_CREDENTIAL"
}{
"error": "Credential is not allowed by this policy",
"code": "API_AUTH_CREDENTIAL_NOT_ALLOWED"
}{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}{
"error": "Internal server error",
"code": "FUNCTION_ERROR"
}请求
需要开发者密钥
响应
错误码
在下表中查找接口返回的 HTTP 状态码和响应原文。有关各接口通用的处理建议,请参阅错误码含义与处理方式。
| HTTP | 错误码 | 文本字段 | 响应文本与处理方式 |
|---|---|---|---|
400 | WRONG_REQUEST_PARAMS | message | Bad request - invalid parameters字段缺失或格式错误。修正后重新发送, |
401 | API_AUTH_INVALID_CREDENTIAL | error | Invalid authentication credential开发者密钥格式错误、未知、已过期或已撤销。请核对并更换密钥。 |
401 | API_AUTH_MISSING_CREDENTIAL | error | Required authentication credential is missing请在 x-builder-api-key 请求头中提供开发者密钥。 |
403 | API_AUTH_CREDENTIAL_NOT_ALLOWED | error | Credential is not allowed by this policy此路由只接受开发者密钥。移除 Authorization 请求头及其他凭据,再重新发送。 |
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,无需重试。 |
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 | 其他错误码 | error | Internal server error |