Interact with Cross Pool

Create Stake Tx

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

Path Parameters

Request Body

{
    "data": "0xe2bbb15800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064",
    "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 Unstake Tx

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

Path Parameters

Request Body

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

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

Request Body

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

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

Request Body

355426508660415759352

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

Request Body

12846491302774489381

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

Query Parameters

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

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

{
  "totalStaked": "string"
}

Responses

  • totalStaked - string: the amount staked

Postman example

Last updated