GET /referrals/{address}
A referrer: eligibility, links, earnings, weeks to claim.
GET https://marketmayhem.co/api/v1/referrals/{address}Parameters
Section titled “Parameters”| Name | In | Required | Meaning |
|---|---|---|---|
address | path | yes | The referrer |
Response
Section titled “Response”| Field | Type | Required | Meaning |
|---|---|---|---|
address | string | yes | A 0x address |
eligible | boolean | yes | |
registered | boolean | yes | |
active | boolean | yes | |
links | object | yes | |
links.site | string | yes | |
links.token | string | yes | |
links.launch | string | yes | |
rates | object | yes | |
rates.instantBps | integer | yes | |
rates.lifetimeShareBps | integer | yes | |
instant | object | yes | |
instant.earnings | object | yes | |
instant.earnings.h24 | object | yes | |
instant.earnings.d7 | object | yes | |
instant.earnings.d30 | object | yes | |
instant.earnings.all | object | yes | |
lifetime | object | yes | |
lifetime.referred | integer | yes | |
lifetime.weeklyCapWei | string | yes | The same amount in the smallest unit, an integer as a string |
lifetime.allTimePaidWei | string | yes | The same amount in the smallest unit, an integer as a string |
lifetime.todayEstimateWei | string or null | yes | The same amount in the smallest unit, an integer as a string |
lifetime.backlog | object or null | yes | |
lifetime.backlog.owedWei | string | yes | The same amount in the smallest unit, an integer as a string |
lifetime.backlog.sinceWeek | integer | yes | |
lifetime.backlog.lastAddedWeek | integer | yes | |
lifetime.claimableWeeks | object[] | yes | |
lifetime.claimableWeeks[].week | integer | yes | |
lifetime.claimableWeeks[].amount | string | yes | The same amount in the smallest unit, an integer as a string |
lifetime.claimableWeeks[].paid | boolean | yes | |
lifetime.claimableWeeks[].claimable | boolean | yes | |
lifetime.claimableWeeks[].proof | string[] or null | yes | |
lifetime.boundTo | string or null | yes | A 0x address |
A real response
Section titled “A real response”Captured from BSC testnet, exactly as the API sent it (long calldata shortened).
{ "address": "0x2bf842241129be12f3a0e4f21e25d2fd43d9e6da", "eligible": true, "registered": false, "active": true, "links": { "site": "https://marketmayhem.co/?r=0x2bf842241129be12f3a0e4f21e25d2fd43d9e6da", "token": "https://marketmayhem.co/t/{token}?r=0x2bf842241129be12f3a0e4f21e25d2fd43d9e6da", "launch": "https://marketmayhem.co/launch?r=0x2bf842241129be12f3a0e4f21e25d2fd43d9e6da" }, "rates": { "instantBps": 20, "lifetimeShareBps": 1500 }, "instant": { "earnings": { "h24": { "usd": 0, "unpriced": [], "byCurrency": [] }, "d7": { "usd": 0, "unpriced": [], "byCurrency": [] }, "d30": { "usd": 0, "unpriced": [], "byCurrency": [] }, "all": { "usd": 0, "unpriced": [], "byCurrency": [] } } }, "lifetime": { "referred": 0, "weeklyCapWei": "3000000000000000000", "allTimePaidWei": "0", "todayEstimateWei": "0", "backlog": null, "claimableWeeks": [], "boundTo": "0xf54cea3cbad30ffaeb4fa568ba600b59b0f97961" }}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.