Sequence Market Orderbook Transactions
All transactions run through a contract at address 0xB537a160472183f2150d42EB1c3DD6684A55f74c
on all currently offered networks.
Create a Request
In order to create a request with the sequence marketplace protocol, a prior transaction must take place where the token (ERC1155 or ERC721) you are submitting to the marketplace is approved to be transferred by the marketplace contract.
A batched transaction can be performed to fullfill this requirement of approval (transaction 1), while also sending the transaction for the creation of the request (transaction 2).
Using a universal wallet, this would look something like this:
transaction 1: setApprovalForAll
operator
: (string) - address of the marketplace acting on the tokenapproved
: (bool) - the approval status of the operator
transaction 2: createRequest
creator
: (string) - the wallet that is creating the order requestisListing
: (bool) - whether the order is to list (true) or offer orders (false)isERC1155
: (bool) - whether the order is for an ERC1155 contract (false for ERC721s)tokenContract
: (string) - the token you’re looking to create an order fortokenId
: (string) - the tokenId you’re looking to create an order forquantity
: (number) - the number of tokens you’re looking to sellexpiry
: (number) - a number formated to ISO timecurrency
: (string) - the ERC20 currency token you’re transacting inpricePerToken
: (big number) - the ERC20 price of the token in big number
example
Accept a Request
In order to accept an existing request, one would need to use one of the get
requests endpoints (like getTopOrders) to acquire a orderId
inputted into the requestId
parameter to submit a transaction, with a prior transaction of approving the currency for the request.
A batched transaction can be performed to fullfill this requirement of currency approval (transaction 1), while also sending the transaction for the fullfillment of the request (transaction 2).
Using a universal wallet, this would look something like this:
transaction 1: approve
spender
: (string) - address of the marketplace acting on the tokenamount
: (bool) - the approval amount for the spender
transaction 2: acceptRequest
requestId
: (string) - The ID of the requestquantity
: (bool) - The quantity of tokens to acceptadditionalFees
: (number[]) - The additional fees to payadditionalFeeRecipients
: (address[]) - the addresses to send the additional fees to
example
Was this page helpful?