The order refers to an offer that has been accepted by both parties, and typically includes details such as the asset being purchased, the price, owner, signature, and any other terms and conditions that have been agreed upon. Once an order has been placed, Horizon Network will transfer the asset to the buyer automatically.

You can use some functions below to manage your orders

Get an order

const orderId = "e304962a-b76a-11ed-afa1-0242ac120002"; // {String} Address of the ERC721 contract

const result = await client.getOrder(orderId);

Get list orders

var opts = {
  'chainId': "56", // {String} Chain ID
  'tokenAddress': "0x88Ef499ab1688DE727c21f1b72fAaEe1A3F455AD", // {String} Token address
  'tokenId': "1", // {String} Token ID
  'collectionId': "404962a-b76a-11ed-afa1-0242ac120002", // {String} Collection ID
  'ownerId': "0x0dD768A47eA2395bbE5574E3252505fe1202C4A8", // {String} Owner ID
  'status': "", // {String} Status of these offers
  'limit': 10, // {Integer} Limit
  'page': 1, // {Number} Current page number
  'orderBy': "created_at", // {String} Property to sort by
  'direction': "desc" // {String} Direction to sort

const result = await client.getOrders(opts);

Last updated