Token Holding Campaign

API to retrieve campaign where users get rewards for holding an ERC-20 token.

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

Field
Type
Description

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

Field
Type
Description

err

ErrMsg

Error message.

campaigns

[TokenHoldingCampaignInfo]

List of matching token holding campaigns.

TokenHoldingCampaignInfo Fields

Field
Type
Description

chain_id

uint64

Chain ID where the target token is deployed.

token_address

string

Address of the token being held.

token_symbol

string

Symbol of the token being held (e.g., "WETH", "USDC").

campaign_id

string

Campaign ID.

campaign_name

string

Campaign display name.

start_time

uint64

Campaign start timestamp.

end_time

uint64

Campaign end timestamp.

reward_info

RewardInfo

Details about the reward token and amount. See RewardInfo below.

last_reward_attestation_time

uint64

Timestamp of the last reward calculation/snapshot.

status

CampaignStatus

Current status of the campaign. See CampaignStatus enum.

RewardInfo Fields

Field
Type
Description

submission_chain_id

uint64

Campaign reward submission chain ID (see on-chain reward claim for details)

submission_contract

string

Campaign reward submission contract address (see on-chain reward claim for details)

claim_chain_id

uint64

Chain ID where rewards can be claimed.

claim_contract

string

Address of the smart contract used for claiming rewards.

token_address

string

Address of the reward token.

token_symbol

string

Symbol of the reward token (e.g., "WETH").

reward_amt

string

Total reward amount for this campaign.

reward_usd_price

string

USD price for the reward token.

reward_per_hour

string

Reward amount distributed per hour.

apr

float

The APR of the campaign (for example, 0.03 means 3% APR)

tvl

float

The total supply USD value of the token to be held

Example Request (curl)

data.json
{
    "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

Last updated