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 Stake Tx
  • Create Unstake Tx
  • Create Claim Tx
  • Read user staked amount from the blockchain
  • Read user pending rewards amount from the blockchain
  • Read total value locked of given pool contract address
  • Read the total amount staked for a token in all cross pools
  1. Products
  2. Cross API

Interact with Cross Pool

Create Stake Tx

POST https://api.hotcross.com/cross-pool/{poolAddress}/{pid}/tx/stake

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

number

The monotonic id of the staking pool

Request Body

Name
Type
Description

user*

String

The user account ($EVM Address)

amount*

String

The amount the user wants to stake (in wei)

chainId*

number

The chain id of the blockchain

{
    "data": "0xe2bbb15800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064",
    "gas": 144924
} // Response
{
    // Response
}

Returns

  • 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 Unstake Tx

POST https://api.hotcross.com/cross-pool/{poolAddress}/{pid}/tx/unstake

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

number

The monotonic id of the staking pool

Request Body

Name
Type
Description

user*

String

The user account ($EVM Address)

amount*

String

The amount the user wants to stake (in wei)

chainId*

String

The chain id of the blockchain

{
    "data": "0x441a3e7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064",
    "gas": 144924
}
{
    // Response
}

Returns

  • 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 Claim Tx

POST https://api.hotcross.com/cross-pool/{poolAddress}/{pid}/tx/claim

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

number

The monotonic id of the staking pool

Request Body

Name
Type
Description

user*

String

The user account ($EVM Address)

chainId*

number

The chain id of the blockchain

{
    "data": "0xe2bbb15800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "gas": 116354
}
{
    // Response
}

Returns

  • 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 staked amount from the blockchain

POST https://api.hotcross.com/cross-pool/{poolAddress}/{pid}/call/user-staked

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

number

The monotonic id of the staking pool

Request Body

Name
Type
Description

user*

String

The user account ($EVM Address)

chainId*

numer

The chain id of the blockchain

355426508660415759352
{
    // Response
}

Returns

POST request will return a stringvalue of the staked amount. (in wei)

Postman example

Read user pending rewards amount from the blockchain

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

Path Parameters

Name
Type
Description

poolAddress*

String

The smart contract address of the reward pool

pid*

number

The monotonic id of the staking pool

Request Body

Name
Type
Description

user*

String

The user account ($EVM Address)

chainId*

number

The chain id of the blockchain

12846491302774489381
{
    // Response
}

Returns

POST request will return a string value of the amount of the pending rewards. (in wei)

Postman example

Read total value locked of given pool contract address

GET https://api.hotcross.com/tvl/cross-pool/{poolAddress}

Path Parameters

Name
Type
Description

poolAddress*

string

The smart contract address of the reward pool

Query Parameters

Name
Type
Description

chain*

number

The chain tha the contract address belongs to

{
    "total": 200,
    "0x4FA7163E153419E0E1064e418dd7A99314Ed27b6": 100
    "0xd6aB096eCE76789620A6aCdC34f8dADD04627DC5": 100
}
{
    // Response
}
{
    // Response
}

Responses

  • total - number: The total value locked in the reward pool

  • staking pool contract address - number: The value locked in a staking pool

Postman example

Read the total amount staked for a token in all cross pools

GET https://api.hotcross.com/tokens/{address}/staked

Path Parameters

Name
Type
Description

address*

String

The address of the token to read the total amount staked for

{
  "totalStaked": "string"
}
{
    // Response
}

Responses

  • totalStaked - string: the amount staked

Postman example

PreviousInteract with Cross YieldNextHOTDOG Swap

Last updated 3 years ago

🎇