Bind Referral Code
Bind the current user (Trader) to a referrer via their referral code. A user can be bound to only one referrer at a time: rebinding is not supported — an already-bound user receives 409 and must first call Unbind.
POST /v1/referral/bind
Authorization: Bearer <token>
Content-Type: application/json
Request Body
{
"code": "4DDDC2D4",
"signature": "0x...",
"timestamp": 1772010600
}
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The referral code to bind to. Matched exactly (case-sensitive) against existing codes; no format normalisation is applied |
signature | string | No | EIP-712 signature — accepted for forward compatibility, not verified |
timestamp | uint64 | No | Unix timestamp (seconds) — accepted for forward compatibility, not verified |
EIP-712 Signature
Not verified by the backend at present; retained for forward compatibility. Only
codeis read from the body.
TypeHash: BindReferralCode(address wallet,string code,uint256 timestamp)
{
"primaryType": "BindReferralCode",
"types": {
"BindReferralCode": [
{ "name": "wallet", "type": "address" },
{ "name": "code", "type": "string" },
{ "name": "timestamp", "type": "uint256" }
]
},
"message": {
"wallet": "0x<your_address>",
"code": "4DDDC2D4",
"timestamp": 1772010600
}
}
Response
{
"success": true,
"referrer_address": "0x29f721b203a9fc9c5dde35a739d8b8e0e4605489",
"referrer_code": "4DDDC2D4"
}
| Field | Type | Description |
|---|---|---|
success | bool | Whether binding succeeded |
referrer_address | string | null | The referrer's wallet address (null if the referrer's session had no wallet address) |
referrer_code | string | The referral code that was bound |