GetTopOrders
With the use of the GetTopOrders
api developers can build bots to retrieve best orders to execute on, or, just simple notifiers to track the best orders to take action.
cURL
curl --request POST \
--url https://marketplace-api.sequence.app/arbitrum-sepolia/rpc/Marketplace/GetTopOrders \
--header 'Content-Type: application/json' \
--data '{
"collectionAddress": "0x1693ffc74edbb50d6138517fe5cd64fd1c917709",
"currencyAddresses": [
"0xa9c88358862211870db6f18bc9b3f6e4f8b3eae7"
],
"orderbookContractAddress": "0xB537a160472183f2150d42EB1c3DD6684A55f74c",
"tokenIDs": ["0","1", "2", "3", "4", "5"],
"isListing": true,
"priceSort": "DESC"
}'
Schema
Query the protocol for the top order based on various filters.
Fetch the top orders from the protocol, optionally excluding those created by a specific user.
- Request: POST /rpc/Marketplace/GetTopOrders
- 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 addressestokenIDs
(string[]) -- an array of token IDs to filter the orders byisListing
(bool) -- whether to fetch listing orders (true) or offer orders (false)priceSort
(SortOrder) -- the direction to sort the orders by price as an enum of"DESC"
or"ASC"
excludeUser?
(string) -- the address of a user whose orders to exclude
- 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 ]