Skip to content
parchmentdocs
Open app

Referrals

Referral binds and estimated bonuses

Referrals

get/referrals/{address}

Path parameters

  • addressstringrequired

    Wallet address

    Pattern^(0[xX])?[0-9a-fA-F]{1,64}$
    Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d

Query parameters

  • limitstring

    Page size: canonical decimal (digits only, no sign, whitespace or leading zero), 1 to 18446744073709551615, else 400 bad_request; an empty value is omitted.

    Pattern^(0|[1-9][0-9]*)$
    Example50
  • directCursorstring

    Direct referee cursor (address).

    Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
  • secondLevelCursorstring

    Second-level referee cursor (address).

    Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d

Responses

  • Direct and second-level binds. estimatedDirectBonus and estimatedSecondBonus are estimates, not settled amounts. The estimate string is forwarded.

    application/json

    • dataReferralsrequired
      • addressstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • asRefereenull | Referrer
      • asReferrerAsReferrerrequired

        The address's referees and estimated bonuses.

      • estimatestringrequired

        How the bonuses are estimated.

Example request

curl 'https://api.parchment.trade/referrals/0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d'
const res = await fetch("https://api.parchment.trade/referrals/0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "address": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
    "asReferee": {
      "boundAtMs": "1796677200000n",
      "referrer": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d"
    },
    "asReferrer": {
      "direct": [
        {
          "address": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
          "boundAtMs": "1796677200000n"
        }
      ],
      "directCount": "24n",
      "directNextCursor": "string",
      "estimatedDirectBonus": "100000000n",
      "estimatedSecondBonus": "100000000n",
      "refereeClaimVolume": "1850000000000n",
      "secondLevel": [
        {
          "address": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
          "boundAtMs": "1796677200000n",
          "via": "string"
        }
      ],
      "secondLevelCount": "24n",
      "secondLevelNextCursor": "string"
    },
    "estimate": "string"
  }
}