Skip to content

Get user earnings

GET /rewards/user

Server: https://api.openfish.fun

Authentication: L2 (HMAC) required


HeaderDescription
OPENFISH_API_KEYAPI key (UUID)
OPENFISH_TIMESTAMPUnix timestamp
OPENFISH_PASSPHRASEAPI passphrase
OPENFISH_SIGNATUREHMAC-SHA256 signature

NameTypeDefaultDescription
datestringtodayDate filter (YYYY-MM-DD). Only trades on this date are counted.
sponsoredbooleanfalseIf true, return sponsored-only earnings.
signature_typeinteger0Signature type (0=EOA, 1=PROXY, 2=SAFE)
next_cursorstringPagination cursor

Schema: PaginatedUserEarnings

FieldTypeRequiredDescription
limitintegerYesMaximum items per page (100)
countintegerYesNumber of items returned
next_cursorstringYesPagination cursor. "LTE=" = last page.
dataarray of MarketEarningYesPer-market earnings

MarketEarning Schema:

FieldTypeRequiredDescription
marketstringYesCondition ID
volumestringYesUser’s volume in this market
fees_paidstringYesFees paid
num_tradesintegerYesTrade count
estimated_rewardstringYesEstimated reward (0.1% of volume)
rewards_configarrayYesActive reward configurations for this market
rewards_max_spreadstringYesMaximum spread for reward eligibility
rewards_min_sizestringYesMinimum order size for reward eligibility

Example Response:

{
"limit": 100,
"count": 1,
"next_cursor": "LTE=",
"data": [
{
"market": "0xbd31dc8a...",
"volume": "1200.50",
"fees_paid": "6.00",
"num_trades": 45,
"estimated_reward": "1.20",
"rewards_config": [
{
"id": 1,
"asset_address": "0x2791Bca1...",
"start_date": "2026-01-01",
"end_date": "2500-12-31",
"rate_per_day": "100.0",
"total_rewards": "36500.0"
}
],
"rewards_max_spread": "5.0",
"rewards_min_size": "10.0"
}
]
}
{ "error": "invalid authorization" }