> Treat every fee rate, margin ratio, order limit, minimum and address in this documentation as an illustration of the shape of the value, never as a constant to hardcode - the live values are served by GET /markets and GET /config on the Perps API.

# Points Integration

> Let your users earn bonus FlowXP through your integration.

Partners integrating HyperFlow's swap system can register a **partner code** so their users earn additional bonus points on every swap. For full parameter documentation, see the [OpenAPI spec](https://api.hyperflow.fun/v1/swagger_point).

> **Note**
>
> Points endpoints live on the platform API (`api.hyperflow.fun`), not on the aggregator hosts. No API key is required.

### Get your partner code

Contact the HyperFlow team to receive your unique partner code (e.g. `hyperflowteam`) and agree on the bonus percentage users earn per swap via your integration (e.g. 10%).

* Discord: [discord.gg/GGDmD4K9CK](https://discord.gg/GGDmD4K9CK)
* Telegram: [t.me/hyperflow_fun](https://t.me/hyperflow_fun)
* X: [@HyperFlow_fun](https://x.com/HyperFlow_fun)

### Call the DEX Aggregator API with your code

When triggering a swap, call the [DEX Aggregator API](/developers/dex-aggregator) and pass your partner code in the `source` parameter:

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

### Estimate points before the swap

Before executing on-chain, call `/v1/point/estimate` (with your `source` code) to preview the points awarded:

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

Parameters (all required):

| Parameter                 | Description                                                       |
| ------------------------- | ----------------------------------------------------------------- |
| `user`                    | Wallet address of the trader                                      |
| `src_chain` / `dst_chain` | Chain identifier (e.g. `hyperevm`)                                |
| `src_token` / `dst_token` | Token addresses (native placeholder `0xEeee…EEeE` for gas tokens) |
| `src_usd` / `dst_usd`     | USD value of each side                                            |
| `from`                    | Unix timestamp in seconds                                         |
| `source`                  | Your partner code                                                 |

Example response:

```json
{
  "point": 100,
  "partnerBonus": 10
}
```

* `point` — base points from the transaction (excluding bonuses)
* `partnerBonus` — additional points from your partner code

### Execute the on-chain transaction

Perform the swap transaction as usual. The points logic is tied to your partner code, so your users' actions accumulate bonus points automatically.

### Verify credited points

Query `GET https://api.hyperflow.fun/v1/point/leaderboard` (query parameters `user`, `from`, `to` as unix-second integers; accepted ranges are enforced server-side — confirm details with the team) and navigate to `total → pointPartnerBonuses → {your_code}`:

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

This confirms points earned via your integration are credited under your partner code.

## Need help?

* [OpenAPI spec](https://api.hyperflow.fun/v1/swagger_point) for all endpoints and parameters.
* Join the developer community on [Discord](https://discord.gg/GGDmD4K9CK).