Getting Rewards to your Affiliate wallet
To direct rewards to your wallet address, include it as the affiliate
parameter in bet order API
(opens in a new tab). Read about rewards distribution here (opens in a new tab).
const AFFILIATE_ADDRESS = '0x...' // Your wallet address to earn rewards
const signedBet = {
environment: '...',
bettor: '0x...',
betOwner: '0x...',
clientBetData: {
clientData: {
attention: '...'
affiliate: AFFILIATE_ADDRESS
core: '0x...'
expiresAt: 23401293
chainId: 137
relayerFeeAmount: '...'
isBetSponsored: false
isFeeSponsored: false
isSponsoredBetReturnable: false
},
bet: {...},
},
bettorSignature: '0x...',
}
const response = await fetch('https://api.onchainfeed.org/api/v1/public/bet/orders/ordinar', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify(signedBet),
})
⚠️
Please exercise caution when entering your affiliate address in the production environment. If you give the wrong address, we can't fix or move associated bets and rewards to a different address. Double-check your affiliate address before proceeding. It's crucial to ensure accuracy.
Being diligent will help prevent problems with bet calculations and reward distribution. If you have any uncertainties or need help, feel free to reach out to our support team.