Hot Cross Documentation
ApplicationAuditsTwitterUpdates
  • 📌What is Hot Cross?
  • Guides
    • 👋Getting Started
    • 🦺Audits
    • 🔑Access Portal
    • ✉️Contact
    • 🤩Ongoing Hot Cross Events!
      • 🧧Hot Cross Lunar New Year Celebration
      • 🏆Winners announcement for Lunar New Year Celebration
      • Liquidity Farming
      • Pending Prize Distribution
      • How to Supply HOTCROSS to earn lending interest?
      • How to Open a HOTCROSS long position with OpenLeverage?
      • How to Stake Cross Bosses get KALM
  • Products
    • ↔️Cross Connect
      • MetaMask
      • Trust Wallet
      • SafePal
      • WalletConnect
      • Frontier
      • Coin98 Wallet
      • Binance Wallet
      • TokenPocket
      • Math Wallet
      • BitKeep
      • iToken
    • 🖼️NFT Staking
    • 😎Cross Bosses
      • How to buy Cross Bosses on Liquid Collectibles
      • How to buy Cross Bosses on PancakeSwap
      • How to buy Cross Bosses on tofuNFT
      • How to buy Cross Bosses on Treasureland
      • How to buy Cross Bosses on NFTrade
      • How to buy Cross Bosses on Mintverse
    • 🌉Cross Bridge
    • 🏊‍♀️Cross Pool
    • 🎯Cross Send
    • 🙇‍♀️Know Your Customer
    • 🚀Initial Hot Cross Offerings
    • 📋Hot Cross User Dashboard
    • 🚜Cross Yield
    • 🎨Cross Mint
    • 🔓Cross Vest
    • 🔐Cross Claim
    • 🎇Cross API
      • Ecosystem Information
      • Supply Information for $HOTCROSS
      • User Information
      • Interact with Cross Yield
      • Interact with Cross Pool
      • HOTDOG Swap
      • NFT Staking
      • Initial Hot Cross Offerings
      • Utility API methods
  • Fundamentals
    • 💼Team
    • 💪Partners
    • 🤝Backers
    • ✅Roadmap
    • 🐷Hot Cross Token
    • 🌭Hot Dog Token
    • 🗣️Social
    • 🕶️Cadets
    • 🎏Brand Assets
Powered by GitBook
On this page
  • Create approve NFT collection tx
  • Create a deposit NFT tx
  • Create a withdraw NFT tx
  • Create a claim reward tx
  • Read user data for an NFT pool from the blockchain
  • Read user's pending rewards from the blockchain
  1. Products
  2. Cross API

NFT Staking

PreviousHOTDOG SwapNextInitial Hot Cross Offerings

Last updated 3 years ago

Create approve NFT collection tx

POST https://api.hotcross.com/nft-staking/collections/{collectionAddress}/tx/approve

Path Parameters

Name
Type
Description

collectionAddress*

String

The smart contract of the collection to approve on

Request Body

Name
Type
Description

user*

String

The user account

targetAddress*

String

The address of the user is adding approval for

chainId*

Number

The chain id of the blockchain you want to read the pools from

Ethereum: 1

BNB Smart Chain: 56

Avalanche C-Chain: 43114

{
  "data": "string",
  "gas": 0
}
{
    // Response
}

Responses:

  • data - string: The call data of the transaction can be empty for simple value transfers

  • gas - number: The gas provided by the transaction

Postman example

Create a deposit NFT tx

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/deposit

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the staking pool

pid*

Number

The pid of the staking pool

Request Body

Name
Type
Description

user*

String

The user account

tokenIds*

[string]

An array of the tokenIds the user wants to deposit

amounts*

[string]

An array of the amounts the user wants to deposit. Must be 1-1 with tokenIds

chainId*

Numer

The chain id of the blockchain you want to read the pools from

Ethereum: 1

BNB Smart Chain: 56

Avalanche C-Chain: 43114

{
  "data": "string",
  "gas": 0
}
{
    // Response
}

Responses:

  • data - string: The call data of the transaction can be empty for simple value transfers

  • gas - number: The gas provided by the transaction

Create a withdraw NFT tx

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/withdraw

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the staking pool

pid*

Number

The pid of the staking pool

Request Body

Name
Type
Description

user*

String

The user account

tokenIds*

[String]

An array of the tokenIds the user wants to withdraw

amounts*

[String]

An array of the amounts the user wants to withdraw. Must be 1-1 with tokenIds

chainId*

Number

The chain id of the blockchain you want to read the pools from

Ethereum: 1

BNB Smart Chain: 56

Avalanche C-Chain: 43114d

{
  "data": "string",
  "gas": 0
}
{
    // Response
}

Responses:

  • data - string: The call data of the transaction can be empty for simple value transfers

  • gas - number: The gas provided by the transaction

Create a claim reward tx

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/claim-rewards

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the staking pool

pid*

Number

The pid of the staking pool

Request Body

Name
Type
Description

user*

String

The user account

chainId*

Number

The chain id of the blockchain you want to read the pools from

Ethereum: 1

BNB Smart Chain: 56

Avalanche C-Chain: 43114

{
  "data": "string",
  "gas": 0
}
{
    // Response
}

Responses:

  • data - string: The call data of the transaction can be empty for simple value transfers

  • gas - number: The gas provided by the transaction

Postman example

Read user data for an NFT pool from the blockchain

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/call/user-data

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

Number

The pid of the staking pool

Request Body

Name
Type
Description

user*

String

The user account

chainId*

Number

The chain id of the blockchain you want to read the pools from

Ethereum: 1

BNB Smart Chain: 56

Avalanche C-Chain: 43114

{
  "amount": "string",
  "lastDepositBlock": "string"
}
{
    // Response
}

Responses:

  • amount - string: The staked NFTs amount

  • lastDepositBlock - string: The last block the user made a deposit. Used for the unstake delay time calculation

Postman example

Read user's pending rewards from the blockchain

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/call/pending-rewards

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

Number

The pid of the staking pool

Headers

Name
Type
Description

Accept*

String

application/json

Content-Type*

String

application/json

Request Body

Name
Type
Description

user*

String

The user account

chainId*

Number

The chain id of the blockchain you want to read the pools from

Ethereum: 1

BNB Smart Chain: 56

Avalanche C-Chain: 43114

"string"
{
    // Response
}

Responses:

  • "string": the pending rewards

Postman example

🎇