Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Token Holding Campaign

This page provides a detailed reference for the GetTokenHoldingCampaigns API, which allows you to retrieve information about token holding campaigns by different filters.

Endpoint

POST https://incentra-prd.brevis.network/sdk/v1/tokenholdingCampaigns

Request

FieldTypeDescription
chain_id[uint64]Chain ID(s) where the target token is deployed.
token_address[string]Filter by the address(es) of the token being held for the campaign.
campaign_id[string]Filter by specific campaign ID(s).
status[CampaignStatus]Filter by campaign status(es). Enum will be specified later.
user_address[string]Retrieve campaigns where the specified user address(es) has participated.

If any filter is not specified, it means there is no constraint for this filter.

CampaignStatus Enum

The CampaignStatus enum has the following values:

  • DEPLOYING
  • CREATING_FAILED
  • INACTIVE
  • ACTIVE
  • ENDED
  • DEACTIVATED

Response

FieldTypeDescription
errErrMsgError message.
campaigns[TokenHoldingCampaignInfo]List of matching token holding campaigns.

TokenHoldingCampaignInfo Fields

FieldTypeDescription
chain_iduint64Chain ID where the target token is deployed.
token_addressstringAddress of the token being held.
token_symbolstringSymbol of the token being held (e.g., "WETH", "USDC").
campaign_idstringCampaign ID.
campaign_namestringCampaign display name.
start_timeuint64Campaign start timestamp.
end_timeuint64Campaign end timestamp.
reward_infoRewardInfoDetails about the reward token and amount. See RewardInfo below.
last_reward_attestation_timeuint64Timestamp of the last reward calculation/snapshot.
statusCampaignStatusCurrent status of the campaign. See CampaignStatus enum.

RewardInfo Fields

FieldTypeDescription
submission_chain_iduint64Campaign reward submission chain ID (see on-chain reward claim for details)
submission_contractstringCampaign reward submission contract address (see on-chain reward claim for details)
claim_chain_iduint64Chain ID where rewards can be claimed.
claim_contractstringAddress of the smart contract used for claiming rewards.
token_addressstringAddress of the reward token.
token_symbolstringSymbol of the reward token (e.g., "WETH").
reward_amtstringTotal reward amount for this campaign.
reward_usd_pricestringUSD price for the reward token.
reward_per_hourstringReward amount distributed per hour.
aprfloatThe APR of the campaign (for example, 0.03 means 3% APR)
tvlfloatThe total supply USD value of the token to be held

Example Request (curl)

{
    "chain_id": [
        1,
        42161
    ],
    "token_address": [
        "0x8D983cb9388EaC77af0474fA441C4815500Cb7BB"
    ],
    "campaign_id": [

    ],
    "status": [
        4,
        5
    ],
    "user_address": [

    ]
}

post with data.json

curl -X POST -H "Content-Type: application/json" -d @data.json https://incentra-prd.brevis.network/sdk/v1/tokenholdingCampaignsityCampaigns