Skip to main content

List Offers

This endpoint allows you to fetch a list of offers with optional filtering and pagination.

Endpoint

GET https://api.spacescan.io/offers

Headers

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

Query Parameters

ParameterTypeRequiredDefaultDescription
countnumberNo100Number of offers to return (max: 100)
statusstringNo"ALL"Filter by offer status (ALL, Active, Pending, Cancelling, Cancelled, Completed, Unknown, Expired)
pagenumberNo1Page number for pagination
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?count=50&status=Active&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?count=50&status=Active&page=1" \
-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 (Active, Pending, Cancelling, Cancelled, Completed, Unknown, Expired)
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

Asset Object Schema (for offered and requested arrays)

FieldTypeDescription
typestringAsset type (NFT1, CAT2, XCH)
nft_infoobjectNFT information (present if type is NFT1)
cat_infoobjectCAT information (present if type is CAT2)
symbolstringAsset symbol
amountnumberAsset amount

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
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
Cache Information

Responses are cached for 30 seconds to improve performance.