🌟Points

This article shows how to get point individual rewards

Projects can decide to show a leaderboard or a user profile on their own website.

Rewards data is not updated in real time due to performance considerations. Recent conversions and payouts will appear on the leaderboard within a maximum of one hour.

Points for a specific address

To get the points rewards for your project use the getPointsLeaderboard method filtered by user address.

import { Fuul } from ('@fuul/sdk');

await Fuul.getPointsLeaderboard({ 
    user_identifier: '0x12345', // the address of the user
    user_identifier_type: 'evm_address', // evm_address | solana_address | xrpl_address 
    from: new Date('2021-01-01'), // Optional
    to: new Date('2022-01-01'), // Optional
    user_type: 'all', // all, affiliate or end_user
    conversions: '1,2,3' // Optional
});

Points for a specific address per conversion

To get all points for an address by conversion use the getUserPointsByConversion method.

import { Fuul } from ('@fuul/sdk');

await Fuul.getUserPointsByConversion({ user_identifier: '0x12345',
 user_identifier_type: 'evm_address' });

You can also filter out dates as follows:

import { Fuul } from ('@fuul/sdk');

await Fuul.getUserPointsByConversion({
      user_identifier: '0x12345', // the address of the user
      user_identifier_type: 'evm_address', // evm_address | solana_address | xrpl_address 
      from: new Date('2021-01-01'),
      to: new Date('2022-01-01'),
});

Points history for a specific address

To get all points history for an address use the getUserPointsMovements method.

import { Fuul } from ('@fuul/sdk');

await Fuul.getUserPointsMovements({
      user_identifier: '0x12345', // the address of the user
      user_identifier_type: 'evm_address', // evm_address | solana_address | xrpl_address 
      from: new Date('2021-01-01'), // optional
      to: new Date('2022-01-01'), // optional
});

Last updated