Get Marketplace Listings
Using our API, you can fetch all the items listed for sale on the Fractal Marketplace and let users buy them.
Getting All Listings
To get the items for sale, you need to send a request to the /sdk/v1/marketplace/solana/items/for_sale (opens in a new tab) POST endpoint. The request must be authenticated with a project API token using the Authentication field in the request header.
You can also filter this query by adding the following optional parameters to the URL:
Attribute | Content |
---|---|
sort.direction | The direction to sort the items. Either ASCENDING or DESCENDING . Defaults to ASCENDING . |
sort.field | The field to sort the items by. Either LIST_TIME or PRICE . Defaults to LIST_TIME . |
limit | The maximum number of items to return. Defaults to 100 . |
Example
curl --request GET \
--url 'https://api.fractal.is/sdk/v1/marketplace/solana/items/for_sale?sort.direction=ASCENDING&sort.field=LIST_TIME&limit=100' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <PROJECT_API_TOKEN>'
Requests return JSON with array items
, each item
object includes the following fields:
Attribute | Content |
---|---|
id | Unique listing identifier of the object. |
name | Name of the object. |
imageUrl | URL for the image of the object. |
listTime | Object containing the time and epoch when the item was listed for sale. |
price | Object containing the item's price and unit. |