marketplace_getListings β Mythos Gaming RPC
marketplace_getListings
surfaces active sales by reading pallet_marketplace::ItemPriceOf
and related escrow records, returning data ready for storefronts or price tickers.
Parametersβ
Parameter | Type | Required | Description |
---|---|---|---|
collectionId | string | No | Filter listings by collection |
seller | string | No | Filter by seller account |
limit | number | No | Page size (default 50) |
cursor | string | No | Pagination cursor |
Response Fieldsβ
Field | Type | Description |
---|---|---|
listings | array | Active listings matching filters |
nextCursor | string | Cursor for next page (null when finished) |
Listing Objectβ
Field | Description |
---|---|
collectionId | NFT collection identifier |
itemId | NFT item identifier |
seller | Account that set the price |
price | Asking price in MYTH |
whitelistedBuyer | Optional target account |
expiresAt | Optional expiration block |
Request Exampleβ
{
"jsonrpc": "2.0",
"method": "marketplace_getListings",
"params": [
{
"collectionId": "0xfa",
"limit": 20
}
],
"id": 13
}
Response Exampleβ
{
"jsonrpc": "2.0",
"result": {
"listings": [
{
"collectionId": "0xfa",
"itemId": "0x02",
"seller": "0x6f889bd1f2f17cf62f6be41996d0d33df7f8fa7a7f6a0c7003c965c4c068b0d5",
"price": "1500000000000000000",
"whitelistedBuyer": null,
"expiresAt": null
}
],
"nextCursor": null
},
"id": 13
}
Prices are denominated in MYTHβs smallest unit (12 decimals). The example references the Nitro Nation crate minted and listed in block 2,611,955
.
Operational Guidanceβ
- Refresh listings every ~6 seconds to align with Mythos block time.
- Pair with
author_submitExtrinsic
to automate relisting after purchases or auctions. - Track DAO-approved fee changes to keep storefront pricing accurate.