get

/v4/historical/campaign/{campaignId}

Campaign reward diff between two trees (BETA)

Historical Campaign Diff

Computes the difference in reward breakdowns for a given campaign between two merkle trees. Each tree is selected either by date (closest root on or before the date, via startDate/endDate) or by an explicit root hash (startRoot/endRoot). Returns per-recipient, per-reason breakdown diffs with non-zero changes only.

Authentication: Requires a valid API key passed via the Authorization header.

⚠️ Beta: this endpoint is in beta. The behavior, response shape and data format may change at any time without notice. Historical data is only available from the configured cutoff date onwards.

Path parameters

campaignIdstring
required

Query parameters

chainIdnumber | string
required
startDatestring
endDatestring
startRootstring
endRootstring

Responses

200
Response for status 200
Schema
object
startRootobject
required
rootstring
required
timestampstring
required
endRootobject
required
rootstring
required
timestampstring
required
breakdownsobject[]
required
campaignIdstring
recipientstring
reasonstring
rewardTokenstring
startAmountstringCumulative reward amount at startDate
endAmountstringCumulative reward amount at endDate
diffstringDifference between endAmount and startAmount
Example
{
  "startRoot": {
    "root": "string",
    "timestamp": "string"
  },
  "endRoot": {
    "root": "string",
    "timestamp": "string"
  },
  "breakdowns": [
    {
      "campaignId": "string",
      "recipient": "string",
      "reason": "string",
      "rewardToken": "string",
      "startAmount": "string",
      "endAmount": "string",
      "diff": "string"
    }
  ]
}
get
https://api.merkl.xyz/v4/historical/campaign/{campaignId}
Merkl API
curl -X GET "https://api.merkl.xyz/v4/historical/campaign/{campaignId}"
Fill the required path parameter campaignId to send.