Merkl Developer Portal logo
get

/v4/ledger/earned/{address}

What a recipient earned over a time window, prorated, per campaign and per token

Path parameters

addressstring
required

Recipient address

Query parameters

fromstring

Window start, unix seconds. Required.

tostring

Window end, unix seconds. Defaults to now.

chainIdstring

Restrict to a single chain

campaignIdstring

Campaign id

tokenstring

Reward token on chainId. Needs chainId.

Responses

200
Response for status 200
Schema
object
fromnumber
required
Window start, unix seconds, exclusive
tonumber
required
Window end, unix seconds, inclusive
totalsobject[]
required
Per (chain, token): the sum of the breakdown amounts
chainIdnumber
tokenstring
amountstringBase units, a base-10 integer
breakdownobject[]
required
Per (campaign, reason): the floor of the prorated sum
campaignIdstring
reasonstring
chainIdnumber
tokenstring
amountstringBase units, a base-10 integer
Example
{
  "from": 0,
  "to": 0,
  "totals": [
    {
      "chainId": 0,
      "token": "string",
      "amount": "string"
    }
  ],
  "breakdown": [
    {
      "campaignId": "string",
      "reason": "string",
      "chainId": 0,
      "token": "string",
      "amount": "string"
    }
  ]
}