Bid on NFT

Bidding, Canceling Bids, Accepting Bids

The Hyperspace contract allows for you to set broker fees for users who want to bid. It is on you as the platform to surface this correctly to the user. What this means is you can charge the buyer or bidder a fee if their bid is accepted.

Buyer broker example:

  • Platform A boasts a wide network and reach. They charge a 1% buyer broker fee on the platform for bids as they believe they can get sellers to accept the bid.

  • User A is willing to pay this extra fee as long as they can obtain the NFT.

Function: createBidTx

Inputs:

  • [Required] buyerAddress

    • Type: string

    • Description: wallet address of person creating the bid

  • [Required] price

    • Type: number

    • Description: Bid price in sol

  • [Required] tokenAddress

    • Type: string

    • Description: Token address of the NFT

  • [Required] buyerBroker

    • Type: string

    • Description: The wallet address that collects the buyer fees.

    • Please use the treasury wallet address you provided to us in the API form, so we can identify that the call is coming from your platform. If your treasury wallet has changed reach out to us to let us know.

  • [Optional] buyerBrokerBasisPoints

    • Type: number

    • Description: Basis points to charge the person making the bid

    • Defaults to 0 (if you do not want to charge the buyer if the bid is accepted)

Response

GetCancelBidTxQuery

Example

const input: GetBidTxQueryVariables = {
  tokenAddress: "29vh9NccFM3KvSngn8NUrrghVwKb67o9et4NuzBnAjUb",
  buyerAddress: "Bnxf8Kz5TG6YUeyw9pTFPGMaazNswsoEvqgUVL7ekG9C",
  price: .1,
  buyerBroker: "Bnxf8Kz5TG6YUeyw9pTFPGMaazNswsoEvqgUVL7ekG9C",
  buyerBrokerBasisPoints: 0
}

hsClient.createBidTx(input)

Function: createCancelBidTx

Inputs:

  • [Required] buyerAddress

    • Type: string

    • Description: The address that made the bid

  • [Required] tokenAddress

    • Type: string

    • Description: The address of the NFT

Response:

GetCancelBidTxQuery

Example:

const input: GetCancelBidTxQueryVariables = {
  tokenAddress: "FAVNt2wnCMpNb2VoUtZuRpLCRdUBY7KWJ8HKEfDy6j6r",
  buyerAddress: "3g42SPvRrmke2MAyL2MpCZTkGEXGcgP829HtqopJCnYJ"
}

hsClient.createCancelBidTx(input)

Function: createAcceptBidTx

Inputs:

  • [Required] sellerAddress

    • Type: string

    • Description: Wallet address of the seller

  • [Required] price

    • Type: number

    • Description: Bid price that is being accepted in SOL

  • [Required] tokenAddress

    • Type: string

    • Description: Address of the NFT

  • [Required] sellerBroker

    • Type: string

    • Description: The wallet address that collects the seller fees.

    • Please use the treasury wallet address you provided to us in the API form, so we can identify that the call is coming from your platform. If your treasury wallet has changed reach out to us to let us know.

  • [Optional] sellerBrokerBasisPoints

    • Type: number

    • Description: Basis points to charge the person making the bid

    • Defaults to 0 (if you do not want to charge the buyer if the bid is accepted)

Response:

GetAcceptBidTxQuery

Example:

const input: GetAcceptBidTxQueryVariables = {
  tokenAddress: "FAVNt2wnCMpNb2VoUtZuRpLCRdUBY7KWJ8HKEfDy6j6r",
  sellerAddress: "A2f1KLZ24ZMWcHATiAQ1zVyMY3kYRPdsAp5a8TAekdb3",
  price: 0.01,
  sellerBroker: "Bnxf8Kz5TG6YUeyw9pTFPGMaazNswsoEvqgUVL7ekG9C",
  sellerBrokerBasisPoints: 0
}

hsClient.createAcceptBidTx(input)

Last updated