DEX Rewards
Returns per-user affiliate trading activity for users attributed to the DexPal affiliate code. This endpoint is the foundation of the DexPal rewards system — accuracy directly impacts user cashback, credits, and leaderboard rankings.
Overview
Method
GET
Poll frequency
On demand
Auth
Bearer API key
Rate limit
60 req/min
Request
Query Parameters
from
ISO8601
yes
Start of the time range (inclusive).
to
ISO8601
yes
End of the time range (inclusive).
limit
integer
no
Items per page. Default 100, max 500.
offset
integer
no
Items to skip. Default 0.
Headers
Authorization
yes
Bearer <api_key>
Response
Returns a paginated data array of user reward records, plus a summary object with aggregate totals for the requested time range.
Fields — User Reward Object
address
string
yes
Primary wallet address of the user.
volumeUsd
number
yes
Total trading volume in USD (notional) for the time range.
feesUsd
number
yes
Total fees paid by the user in USD for the time range.
affiliateRevenueUsd
number
yes
Gross affiliate revenue generated by this user in USD. This is the most critical field — it represents the gross amount the DEX attributes to DexPal's affiliate code and is used for cashback, credits, and leaderboard rankings.
associatedAddresses
array[string]
no
Other addresses (subaccounts, linked wallets) whose activity is included in this user's totals.
tradeCount
integer
no
Number of trades executed in the time range.
firstTradeAt
ISO8601
no
Timestamp of the user's first trade in the time range.
lastTradeAt
ISO8601
no
Timestamp of the user's most recent trade in the time range.
realizedPnlUsd
number
no
Total realized PnL in USD for the time range.
feeTierLabel
string
no
Human-readable fee tier label e.g. "VIP 2", "Gold".
effectiveMakerFeeRate
number
no
Effective maker fee rate applied to this user as a decimal percentage.
effectiveTakerFeeRate
number
no
Effective taker fee rate applied to this user as a decimal percentage.
affiliateRateApplied
number
no
Effective affiliate revenue share rate applied as a decimal.
affiliateRevenueL1Usd
number
no
Direct (L1) referral affiliate revenue in USD.
affiliateRevenueL2Usd
number
no
Sub-referral (L2) affiliate revenue in USD.
makerVolumeUsd
number
no
Maker-side trading volume in USD for the time range.
takerVolumeUsd
number
no
Taker-side trading volume in USD for the time range.
Fields — Summary Object
totalVolumeUsd
number
Sum of volumeUsd across all users in the response.
totalFeesUsd
number
Sum of feesUsd across all users in the response.
totalAffiliateRevenueUsd
number
Sum of affiliateRevenueUsd across all users in the response.
Example Response
Error Responses
400
"Missing required parameter: from"
from or to absent
400
"Invalid date format for parameter: from"
Not valid ISO8601
400
"Parameter 'from' must be before 'to'"
Inverted range
401
"Invalid or missing API key"
Bad or absent auth header
500
"Internal server error"
Unexpected failure
Notes
Only include users who have traded under DexPal's affiliate code in the given time range. Do not include users with zero activity.
affiliateRevenueUsdmust be the gross amount attributed to DexPal's code — before any cashback or rebate distributions.summarytotals should match the full result set for the time range, not just the current page. When paginating, thesummaryis consistent across all pages.If a user trades across multiple subaccounts or linked wallets, consolidate into a single record under the primary address and list the others in
associatedAddresses.
Last updated