> For the complete documentation index, see [llms.txt](https://bound-1.gitbook.io/bound-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bound-1.gitbook.io/bound-docs/developer-guide/api-reference/referral.md).

# Referral

## GET /api/referral/me

> Caller's referral overview — \`referralCode\`, total-users-referred count, lifetime borrow + swap rewards earned, and claimable swap rewards. No mid-week accrual is exposed (stat-hiding invariant). FE composes the share link itself (its own URL + \`?ref=\<referralCode>\`).

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.bound.exchange","description":"Production"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"paths":{"/api/referral/me":{"get":{"operationId":"ReferralController_me","summary":"Caller's referral overview — `referralCode`, total-users-referred count, lifetime borrow + swap rewards earned, and claimable swap rewards. No mid-week accrual is exposed (stat-hiding invariant). FE composes the share link itself (its own URL + `?ref=<referralCode>`).","parameters":[],"responses":{"200":{"description":""}},"tags":["referral"]}}}}
```

## POST /api/referral/claim/build

> Build an unsigned PSBT to claim bUSD rewards

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.bound.exchange","description":"Production"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ClaimBuildDto":{"type":"object","properties":{"payFeeAddress":{"type":"string","description":"Referrer's 2-of-2 trading wallet address. Funds the claim tx (fee + dust) AND receives the claimed bUSD. Must be the calling referrer's own `tradingAddress` — the BE validates this against `walletService` before building."}},"required":["payFeeAddress"]}}},"paths":{"/api/referral/claim/build":{"post":{"operationId":"ReferralController_buildClaim","summary":"Build an unsigned PSBT to claim bUSD rewards","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimBuildDto"}}}},"responses":{"201":{"description":""}},"tags":["referral"]}}}}
```

## POST /api/referral/claim/sign

> Submit a signed referral bUSD-claim PSBT for broadcast

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.bound.exchange","description":"Production"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ClaimSignDto":{"type":"object","properties":{"signedBase64Tx":{"type":"string","description":"Base64-encoded PSBT signed by the referrer"}},"required":["signedBase64Tx"]}}},"paths":{"/api/referral/claim/sign":{"post":{"operationId":"ReferralController_signClaim","summary":"Submit a signed referral bUSD-claim PSBT for broadcast","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSignDto"}}}},"responses":{"201":{"description":""}},"tags":["referral"]}}}}
```

## GET /api/referral/users/{accountId}/referrer

> Get an account's referrer (public)

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.bound.exchange","description":"Production"}],"paths":{"/api/referral/users/{accountId}/referrer":{"get":{"operationId":"ReferralController_getReferrer","summary":"Get an account's referrer (public)","parameters":[{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["referral"]}}}}
```
