GET /referrals/challenge
The message to sign to register as a referrer.
GET https://marketmayhem.co/api/v1/referrals/challengeParameters
Section titled “Parameters”| Name | In | Required | Meaning |
|---|---|---|---|
address | query | yes | The wallet |
Response
Section titled “Response”| Field | Type | Required | Meaning |
|---|---|---|---|
nonce | string | yes | |
expires | integer | yes | Unix milliseconds; 5 minutes after it was issued |
message | string | yes | Sign this exact text with the wallet (personal_sign / EIP-191) |
next | string | yes |
A real response
Section titled “A real response”Captured from BSC testnet, exactly as the API sent it (long calldata shortened).
{ "nonce": "5608d9fc0d6cbc74be59e2d6f4132b02d676a3d425162144", "expires": 1790413078972, "message": "Market Mayhem: get my referral link\n\nWallet: 0x2bf842241129be12f3a0e4f21e25d2fd43d9e6da\n\nYou earn a share of the site fee on trades made through your link,\npaid straight to this wallet inside each trade.\nSigning moves nothing and costs no gas.\n\nNonce: 5608d9fc0d6cbc74be59e2d6f4132b02d676a3d425162144", "next": "Sign `message` with the wallet, then POST /api/v1/referrals/register { nonce, signature }."}Errors
Section titled “Errors”Every error is { "error": { "code", "message", "fix"? } }. This endpoint can answer:
INVALID_ADDRESS: A field that must be a 0x address is not one.