# Gdex Hl Referral

> HyperLiquid referral info and reward claims — distinct from the HL copy-trading referral flows

- Skill: `gemachdao/gdex-hl-referral` (Agent Skill)
- Install (CLI): `npx skillmds@latest add gemachdao/gdex-hl-referral`
- Raw SKILL.md: https://api.skillmd.com/api/skills/gemachdao/gdex-hl-referral/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: GemachDAO (https://skillmd.com/u/gemachdao)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/gemachdao/gdex-hl-referral

---


# GDEX: HyperLiquid Referral

Inspect a wallet's HyperLiquid referral status and submit claims for accrued
rewards. This is the user-side HL referral flow exposed under
`/v1/hl_ref/*` — **distinct** from the copy-trading top-traders referral
flow under `/v1/hl/top_traders_by_pnl` and from the builder referral under
`/v1/hl/builder_referral`.

## When to Use

- Checking how much HL referral reward a wallet has accrued
- Submitting a claim transaction for accrued rewards

## Prerequisites

- `@gdexsdk/gdex-skill` installed
- Authenticated via managed custody — see **gdex-authentication**
- For claim: a pre-built `computedData` payload built by the caller using
  the standard managed-custody encrypted-payload contract (claim ABI lives
  in `src/api/services/ServiceHlReferral.ts` of the backend)

## Backend Endpoints

| Method | Path | Purpose |
|--------|------|---------|
| `GET`  | `/v1/hl_ref/info` | Referral info (earned, eligibility, code) |
| `POST` | `/v1/hl_ref/request_claim` | Submit a reward claim |

## SDK Usage

```typescript
import { GdexSkill } from '@gdexsdk/gdex-skill';

const skill = new GdexSkill();
skill.loginWithApiKey(process.env.GDEX_API_KEY!);

const info = await skill.getHlReferralInfo({ userAddress: '0xWallet' });

// Claim rewards (caller pre-builds computedData)
const result = await skill.requestHlReferralClaim({ computedData });
```

## Notes

- Eligibility is enforced server-side based on referral state and minimum
  thresholds.
- The claim response typically contains a `requestId` to poll via
  `/v1/trade-status/:requestId` when the claim is processed asynchronously.

