# Trade Referral

Developers can build custom integrations to onboard users using a referral code and earn a share of their trading fees. Integration users will be required to sign a predefined message to redeem your referral code.

**Related links:**

* [Generate a referral code](https://polynomial.fi/en/mainnet/portfolio/referrals)
* [Referral fee structure](https://docs.polynomial.fi/trade/trade/referral-program)

### Redeem a referral code

Use this endpoint to redeem a referral code.&#x20;

`POST`  `https://trading-rewards-mainnet.polynomial.finance/referrals/accept`

#### Headers&#x20;

| Name         | Value                                                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| Content-Type | application/json                                                                                                        |
| Accept       | application/json                                                                                                        |
| x-api-key    | [#backend-api-key](https://docs.polynomial.fi/developer-documentation/introduction#backend-api-key "mention")(optional) |

#### Request body

| Name          | Type   | Description                                                               |
| ------------- | ------ | ------------------------------------------------------------------------- |
| wallet        | string | Integration Users wallet Address                                          |
| referralCode  | string | Developer's accounts referral code                                        |
| signedMessage | string | User Signed Message, content  - `Accepting referral for Polynomial Perps` |

#### Success Response - `HTTP 201`
