Points Integration Guide

This guide explains how partners can integrate their swap system with Hyperflow’s points system, so that users earn additional bonus points under the partner’s code.

It focuses on providing the simplest implementation to integrate points system through the API. For more advanced use cases and detailed explanations of parameters and features, please refer to the Swagger documentation.

Steps to Integrate

Step 1. Get Your Partner Code

  • Contact the Hyperflow Communications Department to receive your unique partner code (e.g., hyperflowteam).

  • At this stage, you will also agree on the percentage of bonus points that users earn on each swap via your integration (e.g, 10%).

Contact us

Step 2. Call the Swap API with Your Code

  • When you trigger a swap, call the https://ag-api.hyperflow.fun/v1/hyperevm/swap API.

  • Pass your partner code into the source parameter.

Example:

curl --location '<https://ag-api.hyperflow.fun/v1/hyperevm/swap?tokenIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&tokenOut=0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34&amountIn=50000000000000000&slippage=0.005&receiver=0xBc1E58631301a25ce1E4BF0677eF034882945597&source=hyperflowteam>'

Step 3. Estimate Points Received

  • Before executing the on-chain transaction, you can call the /v1/point/estimate API to see how many points (base + partner bonus) will be awarded.

  • Pass your partner code into the source parameter.

Example:

curl --location 'https://api.hyperflow.fun/v1/point/estimate?src_chain=hyperevm&src_token=0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb&src_usd=1&dst_chain=hyperevm&dst_token=0xEeeeeEeeEeEeEeeEeEeeEeeeeeeEeeeeeeEEeE&dst_usd=1&from=1753014951&user=0x4b7CD6E52BBA5676096232538d34f16B375783ec&source=hyperflowteam'

Example response:

{
    "point": 100,
    "partnerBonus": 10
}
  • point: Base points from the transaction (excluding bonuses).

  • partnerBonus: Additional points from your partner code.

Step 4. Perform the On-chain Transaction

  • After the API call, execute the on-chain swap transaction as usual.

  • The points logic is tied to your partner code, so your users’ actions will now accumulate bonus points.

Step 5. Check Bonus Points

  • To check results, query the /v1/point/leaderboard leaderboard API:

  • In the response, navigate to:

total → pointPartnerBonuses → {your_code}

Example response:

"total": {
      "point": 100,
      "pointPartnerBonuses": {
          "hyperflowteam": 10
      }
  }

This confirms that points earned via your swap system are credited to your partner code.

Need helps?

  • Refer to the Swagger documentation for detailed information on all endpoints, parameters, and usage.

  • Connect with other developers and the HyperFlow team in the Discord community.

Last updated