Unity Orderbook Reference
Information includes method descriptions, parameters and return types.
PrepareListing​
Gets required transactions and messages for signing prior to creating a listing.
Method parameters
Request object for preparing a listing containing details about the listing to be created:
- Buyof type PrepareListingRequestBuy
- MakerAddressof type- string
- OrderExpiryof type- DateTime(optional)
- Sellof type PrepareListingRequestSell
See PrepareListingRequest for more information.
Returns
A response object for the prepare listing endpoint containing properties:
- Actionsof type List<Action>
- OrderComponentsof type OrderComponents
- OrderHashof type- string
See PrepareListing200Response for more information.
CreateListing​
Creates a listing.
Method parameters
Request object for creating a listing containing properties:
- MakerFeesof type List<FeeValue>
- OrderComponentsof type OrderComponents
- OrderHashof type- string
- OrderSignatureof type- string
See CreateListingRequest for more information.
Returns
A response object for the create listing endpoint containing properties:
- Resultof type Order
See CreateListing200Response for further information.
FulfillOrder​
Gets unsigned transactions that can be submitted to fulfil an open order. If the approval transaction exists it must be signed and submitted to the chain before the fulfilment transaction can be submitted or it will be reverted.
Method parameters
Request object for fulfilling an order containing properties:
- ListingIdof type- string- the listing ID to fulfil
- TakerAddressof type- string- the address of the account fulfilling the order
- TakerFeesof type List<FulfillOrderRequestTakerFeesInner> - taker ecosystem fees to be paid.
- AmountToFillof type- string- amount of the order to fill, defaults to sell item amount (only applies to ERC1155 orders) (optional)
See FulfillOrderRequest for more information.
Returns
A response object for the fulfill order endpoint containing properties:
- Actionsof type List<Action>
- Expirationof type- string
- Resultof type Order
See FulfillOrder200Response for more information.
PrepareOrderCancellations​
Prepares cancellations for one or more orders.
Cancelling orders is a gasless alternative to on-chain cancellation exposed with CancelOrdersOnChain. For the orderbook to authenticate the cancellation, the creator of the orders must sign an EIP712 message containing the orderIds.
Method parameters
Request object for preparing order cancellations containing properties:
- OrderIdsof type- List<string>- the ID's of the orders to attempt to cancel
See PrepareOrderCancellationsRequest for more information.
Returns
A response object for the prepare order cancellations endpoint containing properties:
- SignableActionof type SignableAction - the signable action to cancel the orders
See PrepareOrderCancellations200Response for further information.
CancelOrders​
Cancels one or more orders.
Cancelling orders is a gasless alternative to on-chain cancellation exposed with CancelOrdersOnChain. Orders cancelled this way cannot be fulfilled and will be removed from the orderbook. If there is pending fulfillment data outstanding for the order, its cancellation will be pending until the fulfillment window has passed. PrepareOrderCancellations can be used to get the signable action that is signed to get the signature required for this call.
Method parameters
Request object for cancelling orders containing properties:
- OrderIdsof type- List<string>- the order IDs to attempt to cancel
- AccountAddressof type- string- the address of the account cancelling the orders
- Signatureof type- string- the signature obtained by signing the message obtained from- PrepareOrderCancellations
See CancelOrdersRequest for more information.
Returns
A response object for the cancel orders endpoint containing properties:
- Resultof type CancelOrders200ResponseResult - the result of the off-chain cancellation request
See CancelOrders200Response for further information.
CancelOrdersOnChain​
Cancels one or more orders on the blockchain.
Get an unsigned order cancellation transaction. Orders can only be cancelled by the account that created them. All of the orders must be from the same seaport contract. If trying to cancel orders from multiple seaport contracts, group the orderIds by seaport contract and call this method for each group.
Method parameters
Request object for cancelling orders on the blockchain containing properties:
- OrderIdsof type- List<string>- the order IDs to cancel
- AccountAddressof type- string- the address of the account cancelling the order
See CancelOrdersOnChainRequest for more information.
Returns
A response object for the cancel orders on chain endpoint containing properties:
- CancellationActionof type TransactionAction - the unsigned cancel order action
See CancelOrdersOnChain200Response for further information.
TokenBalance​
Retrieves the token balance for a specified wallet and contract address.
Method parameters
The wallet address to query for the token balance.
The contract address of the token.
Returns
A response object for the token balance endpoint containing properties:
- Quantityof type- string- the quantity of the given token that the user has in their wallet.
See TokenBalance200Response for further information.