Examples
GetOrderbookOrders
With the use of the GetOrderbookOrders
api developers can build custom marketplaces around the api, as an example, one can implement a frontend to fulfill certain orders (not just the best price) for a collectible
Example
GetOrderbookOrders
of token ids from a collection address on Sepolia:
Note: If using the metadata.properties key to filter, the use of min
and
max
is required to have orders appear in the query
Schema
Query the protocol for orders based on various filters.
Sequence Orderbook GetOrderbookOrders
Method:
- Request: POST /rpc/Marketplace/GetOrderbookOrders
- Content-Type: application/json
- Body (in JSON):
orderbookContractAddress
(string) — the address of the protocol contractcollectionAddress
(string) — the address of the NFT collectioncurrencyAddresses
(string[]) — an array of currency contract addressesfilters
(OrderbookOrderFilter) — filters to apply to the querytokenIds
(string[]) — the token ids of the assets you’re looking atisListing?
(bool) —true
if it is an order,false
if it’s an offeruserAddress?
(string) — the address of the user
orderStatuses
(OrderStatus[]) (optional) — filter orders by their statuses asOPEN
,CLOSED
,CANCELLED
stringsmetadataFilter
(Filter) (optional) — filter orders by metadatatext?
(string) — text to searchproperties?
(PropertyFilter[]) —name
(string) — name of the property, eg: herotype
: (PropertyType) — type of the values of the property as an enum from:"INT"
,"STRING"
,"ARRAY"
, or"GENERIC"
min?
: (int64) — used if type is int, gives range of values for filteringmax?
: (int64) — used if type is int, gives range of values for filteringvalues?
: []any — if string then array of values, eg: [“Ada”, “Ari”, “Axel”, “Banjo” …]
beforeExpiryTimestamp
(int64) — filter orders expiring before the given timestamppage?
— page object to sort bysort
(Sort[]) — with an object of keys"column"
and"order"
with example"createdAt"
and"ASC"
, respectively
- Response (in JSON):
page
page
(i32) — number of the pagepageSize
(i32) — number of orders on the pagemore
(bool) — if there are more orders
orders
(OrderbookOrder[]) [orderId
(string) — order idtokenContract
(string) — the collection contracttokenId
(string) — the tokenId of the collection in the orderisListing
(bool) — is true if it’s a listing for sale, or false if it’s an offerquantity
(string) — the number of tokens the order is forquantityRemaining
(string) — the number of tokens after the ordercurrencyAddress
(string) — the currency the token is trading inpricePerToken
(string) — the price per tokenexpiry
(string) — the expiry of when the order is no longer validorderStatus
(OrderStatus) — the status of the order as an enum fom"OPEN"
,"CLOSED"
,"CANCELLED"
createdBy
(string) — the address the order was created bycreatedAt
(uint64) — the time the order was createdorderbookContractAddress
(string) — the orderbook contract address ]
Was this page helpful?