Quote Secondary Market Purchase
Prices a buy of quantity tokens from one secondary-market listing without submitting it. The price comes off the listing named by deal_id, because two listings of the same token can sell at different prices. Both sides of the trade are reported: the buyer pays the buy-order fee on top of the listing amount (total), the seller pays the sell-order fee out of it (seller_proceeds). The fee is resolved and applied exactly as Buy On Secondary Market does it.
A listing is bought whole, so to quote the buy you will submit, send the listing's own quantity (from List Token Listings). The quote is refused when the listing is not open, the token is not listed or the token is closed to the secondary market.
Required permission: purchase:view
Request
GET /v2/users/purchases/tokens/{token_id}/secondary-market/quote
Parameters
| Name | Type | In | Description |
|---|---|---|---|
token_id | string | path | Required. Token ID |
deal_id | integer | query | Required. Listing (deal) ID |
quantity | integer | query | Required. Whole tokens to price, at least 1 |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Example
curl --request GET \
--url '{{baseUrl}}/v2/users/purchases/tokens/68ae06cfcccf4e8fc19362d1/secondary-market/quote?deal_id=13&quantity=10' \
--header 'Authorization: Bearer <access_token>'
Response
{
"token_id": "68ae06cfcccf4e8fc19362d1",
"market_type": "secondary",
"deal_id": 13,
"quantity": 10,
"unit_price": "12",
"subtotal": "120",
"buyer_fee": {
"percentage": "1.5",
"amount": "1.8"
},
"total": "121.8",
"seller_fee": {
"percentage": "1",
"amount": "1.2"
},
"seller_proceeds": "118.8",
"currency": {
"symbol": "VUSD",
"decimal": 6,
"address": "0xf2d90affe805280c004d0135343f2cbd7c96ce98"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
token_id | string | Token priced |
market_type | string | Always secondary on this endpoint |
deal_id | integer | Listing priced |
quantity | integer | Quantity priced |
unit_price | string | The listing's price for one token |
subtotal | string | unit_price × quantity: the listing amount before fees |
buyer_fee.percentage | string | Total buy-order fee rate (owner, platform owner and node summed) |
buyer_fee.amount | string | Buy-order fee amount: the sum of each recipient's share, each truncated to the currency's decimals |
total | string | What the buyer pays: subtotal + buyer_fee.amount |
seller_fee.percentage | string | Total sell-order fee rate the seller pays |
seller_fee.amount | string | Sell-order fee amount |
seller_proceeds | string | What the seller receives: subtotal − seller_fee.amount |
currency.symbol | string | Symbol of the payment currency every amount is in |
currency.decimal | integer | Decimals of the payment currency |
currency.address | string | Contract address of the payment currency |
All amounts are decimal strings; see Amounts and Percentages.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed (deal_id or quantity missing or invalid) — see details |
| 400 | 10016 | token_id is not a valid 24-character hex id |
| 400 | 11001 | No listing with this deal_id on this token (domain 11, secondary market not found) |
| 400 | 11002 | The listing is not open (domain 11, secondary market is not active) |
| 400 | 10001 | Token not found (domain 5) |
| 400 | 10011 | Token is not listed (domain 5, token is not active) |
| 400 | 10012 | Token is not open to the secondary market (domain 5) |
| 500 | 10000 | Unexpected server-side failure |
See Errors for the error format and common codes.