列出钱包的链上藏品活动
curl --request GET \
--url https://api.renaiss.xyz/v2/users/{walletAddress}/activities \
--header 'x-builder-api-key: <api-key>'const options = {method: 'GET', headers: {'x-builder-api-key': '<api-key>'}};
fetch('https://api.renaiss.xyz/v2/users/{walletAddress}/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.renaiss.xyz/v2/users/{walletAddress}/activities"
headers = {"x-builder-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"activities": [
{
"user": "<string>",
"timestamp": "<string>",
"blockNumber": "<string>",
"txHash": "<string>",
"type": "gacha-v3-pull",
"contractAddress": "<string>",
"packId": "<string>",
"token": "<string>",
"checkoutIds": [
"<string>"
],
"totalAmount": "<string>",
"blockHash": "<string>",
"collectibles": [
{
"type": "POKEMON",
"name": "<string>",
"frontImageUrl": "<string>",
"tokenId": "<string>",
"subtitle": "<string>",
"buybackBaseValueInUsd": "<string>",
"buybackBonus": {
"originalBuybackBaseValueInUSD": "<string>",
"bonusBps": 123
}
}
]
}
],
"nextCursor": "<string>"
}{
"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"
}Internal Server Error钱包收藏
查询钱包活动
按时间倒序查看钱包的链上卡牌活动。使用游标翻页读取抽卡、回购、交易、转账和兑换记录。
GET
/
v2
/
users
/
{walletAddress}
/
activities
列出钱包的链上藏品活动
curl --request GET \
--url https://api.renaiss.xyz/v2/users/{walletAddress}/activities \
--header 'x-builder-api-key: <api-key>'const options = {method: 'GET', headers: {'x-builder-api-key': '<api-key>'}};
fetch('https://api.renaiss.xyz/v2/users/{walletAddress}/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.renaiss.xyz/v2/users/{walletAddress}/activities"
headers = {"x-builder-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"activities": [
{
"user": "<string>",
"timestamp": "<string>",
"blockNumber": "<string>",
"txHash": "<string>",
"type": "gacha-v3-pull",
"contractAddress": "<string>",
"packId": "<string>",
"token": "<string>",
"checkoutIds": [
"<string>"
],
"totalAmount": "<string>",
"blockHash": "<string>",
"collectibles": [
{
"type": "POKEMON",
"name": "<string>",
"frontImageUrl": "<string>",
"tokenId": "<string>",
"subtitle": "<string>",
"buybackBaseValueInUsd": "<string>",
"buybackBonus": {
"originalBuybackBaseValueInUSD": "<string>",
"bonusBps": 123
}
}
]
}
],
"nextCursor": "<string>"
}{
"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"
}Internal Server Error| 事件信息 | 用法 |
|---|---|
| 卡包或结算 ID | 可将抽卡事件中的卡包 ID 与目录的 onChainPackId 对照,或将回购事件中的结算 ID 与钱包抽卡记录的 settlementId 对照。 |
collectibles[] | 通过你的应用抽卡,结果确定后即可展示卡牌。其他开发者的普通 v3 抽卡须等待原回购期结束,且已确认交付或回售。限量卡包的历史关联仅对卖方可见。商店抽卡仅返回链上信息。 |
| 金额 | 事件金额为总额。符合条件的卡牌可返回抽卡时锁定的 buybackBaseValueInUsd(美分)。回购事件还可返回 18 位精度的 buybackPaidInUsdt,其值可能为 null。 |
nextCursor 作为下一次请求的 cursor。即使当前页为空,只要仍有游标,就继续翻页。值为 null 时结束。一笔交易包含的多个事件可能分布在不同页。请求
需要开发者密钥
响应
错误码
在下表中查找接口返回的 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 | ACTIVITY_QUERY_FAILED | error | Internal server error请稍后重新查询。 |
500 | 其他错误码 | error | Internal server error |
500 | 无错误码 | text/plain | Internal Server Error |