Marketplace Snapshot

The core of what we show in our collections page

NOTE: Valuation returned by snapshot is DEPRECATED and should not be used. HYPERSPACE Rank comes from rank_est.

Function: getMarketplaceSnapshot

Inputs:

Condition Inputs:

  • [Optional] projects

    • Type: ProjectIdWithAttributes[]

    • Description: A list of project ids to query for with attributes to filter on

  • [Optional] name

    • Type: StringInputArg

    • Description: Find a token based on display name in a collection. Requires a project to be passed in. Allows for exact match or fuzzy search.

    • Example:

    •  StringInputArg {
        value: string
        operation: "EXACT" or "FUZZY"
       }
       
       name: {operation: "EXACT", value: "Degen Trash Panda #14904"}
  • [Optional] tokenAddresses

    • Type: array of strings

    • Description: A list of token addresses to query for

    • Note: Has a limit of 500 tokens per call

  • [Optional] excludeTokensWithoutMetadata

    • Type: boolean

    • Description: Filters tokens that we do not have metadata or information on

  • [Optional] includeAttributeInformation

    • Type: boolean

    • Description: Includes project level attribute information. The project_attributes field from the projects api.

  • [Optional] includeProjectFloorPrice

    • Type: boolean

    • Description: Include project floor price

  • [Optional] onlyListings

    • Type: boolean

    • Description: Only query for tokens that are listed

  • [Optional] priceFilter

    • Type: array

    • Description: Price to filter by inclusive

    • Example:

    • [0, 5]                     // Items listed between 0 and 5 sol
  • [Optional] rankFilter

    • Type: array

    • Description: Rank to filter by inclusive, Rank based on our rarity

    • Example:

    • [0, 5]  

Order By

  • [Optional] orderBy

    • Type: OrderConfig

    • Allowed Values:

    • lowest_listing_block_timestamp      //For sorting by listed time
      lowest_listing_price                //For sorting by listed price
      rank_est                            //For sorting by our rarity

Pagination Input:

  • [Optional] paginationInfo

    • Type: PaginationConfig

    • Description: Pagination Params

    • Example:

    • {
          page_number: 1,
          page_size: 40
      }

Response:

GetMarketplaceSnapshotsQuery

lowest_listing_mpa will contain listing information for an nft

market_place_snapshots {
      token_address
      project_id
      name
      rank_est
      supply
      full_img
      meta_data_img
      meta_data_uri
      attributes
      floor_price
      project_name
      project_image
      is_project_verified
      project_attributes {
        name
        counts
        type
        values
      }
      lowest_listing_mpa {
        user_address
        price
        marketplace_program_id
        type
        signature
        amount
        broker_referral_address
        block_timestamp
        broker_referral_fee
        escrow_address
        fee
        marketplace_fee_address
        marketplace_instance_id
        metadata
      }
}

Examples:

Show Recently Listed Degods

hsClient
  .getMarketplaceSnapshot({
    condition: {
      projects: [
        {
          project_id: "degods"
        },
      ],
    },
    orderBy: {
      field_name: "lowest_listing_block_timestamp",
      sort_order: SortOrderEnum.Desc
    }
  })

Show Lowest Listed Deadgods

hsClient
  .getMarketplaceSnapshot({
    condition: {
      projects: [
        {
          project_id: "degods"
          attributes: [{name: "version", type: "CATEGORY", values: ["DeadGod"]}]
        },
      ],
    },
    orderBy: {
      field_name: "lowest_listing_price",
      sort_order: SortOrderEnum.Desc
    }
  })

Get 1 attribute SMBs

hsClient
  .getMarketplaceSnapshot({
    condition: {
      projects: [
        {
          project_id: "smb",
          attributes: [
            { name: "Attributes Count", type: "NUMERIC", values: ["1"] },
          ],
        },
      ],
    },
  })

Reference Implementation:

Last updated