Skip to content

Earn from referrals

5 minutes · no code needed to start

There are two ways to earn, and both last for ever:

How muchWhen
Instant0.2% of every trade that names you as referrerPaid to you inside that trade’s own transaction
Lifetime15% of our income from every trade by wallets bound to youPaid weekly; you claim it

A wallet is bound to you by its first trade through your referral link. The earliest binding wins, and it’s for life.

  1. Register your address once. It’s free, one signature, no gas: GET /api/v1/referrals/challenge?address=0x… gives you a message; sign it with your wallet (personal_sign); POST /api/v1/referrals/register with { nonce, signature }. A token creator is already eligible.

  2. Share your link. It’s https://marketmayhem.co/?r=<your address>, or to any page: GET /api/v1/referrals/<address>/link?path=/t/0x….

  3. Build trades with it. In your app or bot, pass referrer: "<your address>" to POST /build/buy and /build/sell, or make an API key with your wallet and every trade your key builds names you automatically.

  4. See what you’ve earned, and claim the weeks waiting: run the example below, then POST /api/v1/build/claim.

referral-link.mjs
// Your referral link, and what it has earned. Share it: every trade through it
// pays you a share of the fee inside the trade, and wallets it brings pay you a
// lifetime share every week.
// ADDRESS=0x… node referral-link.mjs
const API = process.env.MM_API ?? 'https://marketmayhem.co/api/v1';
const address = process.env.ADDRESS;
const res = await fetch(`${API}/referrals/${address}`);
const me = await res.json();
if (!res.ok) throw new Error(`${me.error.code}: ${me.error.message}`);
if (!me.eligible) console.log('Not earning yet: register once (free) with GET /referrals/challenge and POST /referrals/register.');
console.log(`your link: ${me.links.site}`);
console.log(`a token page: ${me.links.token.replace('{token}', '0x…')}`);
console.log(`earned, all time: $${me.instant.earnings.all.usd.toFixed(2)} inside trades; ${me.lifetime.referred} wallets referred for life`);
console.log('RESULT', JSON.stringify({ link: me.links.site, eligible: me.eligible }));

If you build a Telegram bot, a trading app or an agent on Market Mayhem, every trade it routes pays you the instant cut, and every user it brings pays you the lifetime share. A bot doing $1M a week earns its builder $2,000 a week from the instant cut alone.