提交已签名的买单
curl --request POST \
--url https://dev-api.renaiss.xyz/v2/marketplace/bids \
--header 'Content-Type: application/json' \
--header 'x-builder-api-key: <api-key>' \
--data '
{
"tokenId": "9007199254740993",
"bidData": {
"bidder": "<string>",
"feeBps": "<string>",
"tokenId": "9007199254740993",
"amount": "<string>",
"nonce": "<string>",
"deadline": "<string>"
},
"bidSignature": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-builder-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokenId: '9007199254740993',
bidData: {
bidder: '<string>',
feeBps: '<string>',
tokenId: '9007199254740993',
amount: '<string>',
nonce: '<string>',
deadline: '<string>'
},
bidSignature: '<string>'
})
};
fetch('https://dev-api.renaiss.xyz/v2/marketplace/bids', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev-api.renaiss.xyz/v2/marketplace/bids"
payload = {
"tokenId": "9007199254740993",
"bidData": {
"bidder": "<string>",
"feeBps": "<string>",
"tokenId": "9007199254740993",
"amount": "<string>",
"nonce": "<string>",
"deadline": "<string>"
},
"bidSignature": "<string>"
}
headers = {
"x-builder-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"operation": "ask",
"orderId": "<string>",
"status": "ACTIVE",
"executed": true,
"executionTxHash": "<string>",
"matchedOrderId": "<string>"
}Malformed JSON in request body{
"error": "Required authentication credential is missing",
"code": "API_AUTH_MISSING_CREDENTIAL"
}{
"error": "Invalid wallet action proof",
"code": "API_AUTH_INVALID_ACTION"
}{
"error": "Collectible not found",
"code": "COLLECTIBLE_NOT_FOUND"
}{
"error": "This bid authorization was already used. Sign a new bid.",
"code": "BID_AUTHORIZATION_ALREADY_USED"
}Payload Too Large{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}Internal Server Error订单
提交买单
提交买家已签名的报价,发布买单。 调试面板使用测试网请求格式。当前主网字段见本页说明。
POST
/
v2
/
marketplace
/
bids
提交已签名的买单
curl --request POST \
--url https://dev-api.renaiss.xyz/v2/marketplace/bids \
--header 'Content-Type: application/json' \
--header 'x-builder-api-key: <api-key>' \
--data '
{
"tokenId": "9007199254740993",
"bidData": {
"bidder": "<string>",
"feeBps": "<string>",
"tokenId": "9007199254740993",
"amount": "<string>",
"nonce": "<string>",
"deadline": "<string>"
},
"bidSignature": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-builder-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokenId: '9007199254740993',
bidData: {
bidder: '<string>',
feeBps: '<string>',
tokenId: '9007199254740993',
amount: '<string>',
nonce: '<string>',
deadline: '<string>'
},
bidSignature: '<string>'
})
};
fetch('https://dev-api.renaiss.xyz/v2/marketplace/bids', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev-api.renaiss.xyz/v2/marketplace/bids"
payload = {
"tokenId": "9007199254740993",
"bidData": {
"bidder": "<string>",
"feeBps": "<string>",
"tokenId": "9007199254740993",
"amount": "<string>",
"nonce": "<string>",
"deadline": "<string>"
},
"bidSignature": "<string>"
}
headers = {
"x-builder-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"operation": "ask",
"orderId": "<string>",
"status": "ACTIVE",
"executed": true,
"executionTxHash": "<string>",
"matchedOrderId": "<string>"
}Malformed JSON in request body{
"error": "Required authentication credential is missing",
"code": "API_AUTH_MISSING_CREDENTIAL"
}{
"error": "Invalid wallet action proof",
"code": "API_AUTH_INVALID_ACTION"
}{
"error": "Collectible not found",
"code": "COLLECTIBLE_NOT_FOUND"
}{
"error": "This bid authorization was already used. Sign a new bid.",
"code": "BID_AUTHORIZATION_ALREADY_USED"
}Payload Too Large{
"error": "Authentication rate limit exceeded",
"code": "API_AUTH_RATE_LIMITED"
}Internal Server ErrortokenId 和 payload.bidData。分别填入 tokenId 和 bidData,再附上买家的 bidSignature。提交后刷新订单簿。在测试网上,请提交此处所示的顶层 tokenId。主网更新前,请将准备响应的 payload.collectibleId 作为主网请求的顶层 collectibleId。签名订单数据应与准备响应保持一致。请求
需要开发者密钥和钱包签名
响应
错误码
在下表中查找接口返回的 HTTP 状态码和响应原文。有关各接口通用的处理建议,请参阅错误码含义与处理方式。
| HTTP | 错误码 | 文本字段 | 响应文本与处理方式 |
|---|---|---|---|
400 | BID_BELOW_MINIMUM | error | Bids must be at least 1 USDT出价低于最低金额。请提高金额并重新准备。 |
400 | BID_HAS_ALREADY_EXPIRED | error | Bid has already expired买单在处理期间过期。请延长有效期并重新准备、签名。 |
400 | BID_INSUFFICIENT_BALANCE | error | USDT balance is below the bid amount钱包的 USDT 不足,请补足余额或降低出价。 |
400 | BID_TOKEN_ID_MISMATCH | error | Signed order token ID differs from the submitted token IDBid token ID does not match the collectible核对 tokenId 与 bidData.tokenId 是否指向同一张卡牌。两个字段都应取自同一次准备响应。 |
400 | INSUFFICIENT_ALLOWANCE | error | Insufficient token allowance for Permit2钱包为该买单授权的 USDT 不足。授权所需金额后重发。 |
400 | INVALID_BID_FEE_BPS | error | Invalid bid fee BPS签名买单的费率无效。请重新准备并签名。 |
400 | INVALID_BID_SIGNATURE | error | Bid signature is invalid买单签名无效。请重新准备并让钱包签署新数据。 |
400 | OFFER_EXPIRY_TOO_LONG | error | Offers can expire at most 180 days from now买单到期时间过远。请缩短有效期并重新准备。 |
400 | TOO_MANY_ACTIVE_BIDS | error | A wallet can hold at most 250 active bids钱包已达到有效买单数量上限。请先撤销一笔买单。 |
400 | WRONG_REQUEST_PARAMS | error | Invalid marketplace request: tokenId: RequiredInvalid marketplace request: Expected object, received array请用 JSON 对象传入必填字段。复制准备响应顶层的 tokenId,并省略 collectibleId。 |
400 | 无错误码 | text/plain | Malformed JSON in request body |
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 | API_AUTH_INVALID_ACTION | error | Invalid wallet action proof钱包签名与准备数据不符或已过期。请重新准备和签名。合约钱包的 isValidSignature 对准备数据的 EIP-712 摘要必须返回 0x1626ba7e。 |
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 | COLLECTIBLE_NOT_FOUND | error | Collectible not found代币 ID 未知或藏品在该 API 中不可用。请核对 ID,不要用同一 ID 重试。 |
409 | BID_AUTHORIZATION_ALREADY_USED | error | This bid authorization was already used. Sign a new bid.买单已提交。先查看藏品和钱包订单,原单可能仍有效、已撤销或已成交。确需另下买单时才重新签名。 |
413 | 无错误码 | text/plain | Payload Too Large |
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 | 无错误码 | text/plain | Internal Server Error |
500 | COLLECTIBLE_GET_FAILEDBID_ORDER_INSERT_FAILED | error | Internal server error重新提交前,请查询订单和钱包活动。 |
授权
请求体
application/json