Skip to main content

Get Offers by Asset

This endpoint allows you to fetch all offers that include a specific asset (NFT or CAT) in either their requested or offered assets.

Endpoint

GET https://api.spacescan.io/offers/asset/{asset_id}

Parameters

ParameterTypeRequiredDefaultDescription
asset_idstringYes-NFT or Token or Collection ID or XCH
countnumberNo100Number of offers to return (max: 100)
pagenumberNo1Page number for pagination

Headers

HeaderTypeRequiredDescription
versionstringYesAPI version
networkstringYesNetwork identifier (e.g., 'xch' for mainnet)
Free API

Use api.spacescan.io for free tier access. See our API Plans for rate limits and features.

Pro API

Use pro-api.spacescan.io with your API key in the x-api-key header. See our API Plans for details.

curl -X GET "https://pro-api.spacescan.io/offers/asset/{asset_id}?count=50&page=1" \
-H "x-api-key: YOUR_API_KEY" \
-H "version: v1" \
-H "network: xch"

Live API Test

Request Examples

curl -X GET "https://api.spacescan.io/offers/asset/8c77de1427156b98fb15cce77d908f79bd69f6b4b8e3a60d8e051dac481b5365" \
-H "version: v1" \
-H "network: xch"

Response Schema

FieldTypeDescription
statusstringStatus of the request ("success" or "failed")
dataarrayArray of offer information objects

Each offer object in the data array has the following structure:

FieldTypeDescription
idstringThe unique identifier of the offer
offer_statusstringCurrent status of the offer
offerstringRaw offer data
offeredarrayArray of assets being offered
requestedarrayArray of assets being requested
createdstringTimestamp of offer creation
settledstringTimestamp when offer was settled
heightnumberBlock height of the offer

Example Response

{
"status": "success",
"data": [
{
"id": "offer1abc...",
"offer_status": "Active",
"offer": "raw_offer_data",
"offered": [
{
"type": "NFT1",
"nft_info": {
"id": "nft1...",
"name": "Sample NFT",
"preview_url": "https://..."
}
}
],
"requested": [
{
"type": "XCH",
"symbol": "XCH",
"amount": 1.5
}
],
"created": "2023-01-01T00:00:00Z",
"settled": null,
"height": 1234567
}
// ... more offers
]
}

Error Responses

HTTP Status CodeMeaning
401Unauthorized -- Missing required headers
400Bad Request -- Invalid asset ID format
429Too Many Requests -- You're requesting too many times
500Internal Server Error -- We had a problem with our server
503Service Unavailable -- We're temporarily offline for maintenance