Skip to main content

Quote Primary Market Purchase

Prices a primary-market buy of quantity tokens without submitting it: the base amount, the buyer fee and the total the buyer is charged. Buy On Primary Market is asynchronous and answers with a transaction ID only, so this is how a caller shows the amount before it is spent. The fee is resolved and applied exactly as the buy does it, so the quote and the charge agree.

The quote names no user and no wallet: the price belongs to the token and its setup. The buyer-specific checks (wallet, remaining supply, per-user cap) run only on the buy. An external token carries no platform fee, so its buyer_fee is zero and total equals subtotal. A token that is not listed is refused.

Required permission: purchase:view

Request​

GET /v2/users/purchases/tokens/{token_id}/primary-market/quote

Parameters​

NameTypeInDescription
token_idstringpathRequired. Token ID
quantityintegerqueryRequired. Whole tokens to price, at least 1

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request GET \
--url '{{baseUrl}}/v2/users/purchases/tokens/68ae06cfcccf4e8fc19362d1/primary-market/quote?quantity=10' \
--header 'Authorization: Bearer <access_token>'

Response​

{
"token_id": "68ae06cfcccf4e8fc19362d1",
"market_type": "primary",
"quantity": 10,
"unit_price": "1.12",
"subtotal": "11.2",
"buyer_fee": {
"percentage": "2.5",
"amount": "0.28"
},
"total": "11.48",
"currency": {
"symbol": "VUSD",
"decimal": 6,
"address": "0xf2d90affe805280c004d0135343f2cbd7c96ce98"
}
}

Response Fields​

FieldTypeDescription
token_idstringToken priced
market_typestringAlways primary on this endpoint
quantityintegerQuantity priced
unit_pricestringPrice of one token
subtotalstringunit_price × quantity: the amount before fees
buyer_fee.percentagestringTotal fee rate charged to the buyer (owner, platform owner and node summed)
buyer_fee.amountstringFee amount: the sum of each recipient's share, each truncated to the currency's decimals the way the fee contract takes it
totalstringWhat the buyer pays: subtotal + buyer_fee.amount
currency.symbolstringSymbol of the payment currency every amount is in
currency.decimalintegerDecimals of the payment currency
currency.addressstringContract address of the payment currency

All amounts are decimal strings; see Amounts and Percentages.

Errors​

StatusCodeDescription
40010015Validation failed (quantity missing or below 1) — see details
40010016token_id is not a valid 24-character hex id
40010001Token not found (domain 5)
40010011Token is not listed (domain 5, token is not active)
50010000Unexpected server-side failure

See Errors for the error format and common codes.