Get user earnings
Endpoint
Section titled “Endpoint”GET /rewards/userServer: https://api.openfish.fun
Authentication: L2 (HMAC) required
Authentication Headers
Section titled “Authentication Headers”| Header | Description |
|---|---|
OPENFISH_API_KEY | API key (UUID) |
OPENFISH_TIMESTAMP | Unix timestamp |
OPENFISH_PASSPHRASE | API passphrase |
OPENFISH_SIGNATURE | HMAC-SHA256 signature |
Query Parameters
Section titled “Query Parameters”| Name | Type | Default | Description |
|---|---|---|---|
date | string | today | Date filter (YYYY-MM-DD). Only trades on this date are counted. |
sponsored | boolean | false | If true, return sponsored-only earnings. |
signature_type | integer | 0 | Signature type (0=EOA, 1=PROXY, 2=SAFE) |
next_cursor | string | Pagination cursor |
Responses
Section titled “Responses”200 — User earnings retrieved
Section titled “200 — User earnings retrieved”Schema: PaginatedUserEarnings
| Field | Type | Required | Description |
|---|---|---|---|
limit | integer | Yes | Maximum items per page (100) |
count | integer | Yes | Number of items returned |
next_cursor | string | Yes | Pagination cursor. "LTE=" = last page. |
data | array of MarketEarning | Yes | Per-market earnings |
MarketEarning Schema:
| Field | Type | Required | Description |
|---|---|---|---|
market | string | Yes | Condition ID |
volume | string | Yes | User’s volume in this market |
fees_paid | string | Yes | Fees paid |
num_trades | integer | Yes | Trade count |
estimated_reward | string | Yes | Estimated reward (0.1% of volume) |
rewards_config | array | Yes | Active reward configurations for this market |
rewards_max_spread | string | Yes | Maximum spread for reward eligibility |
rewards_min_size | string | Yes | Minimum 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" } ]}401 — Unauthorized
Section titled “401 — Unauthorized”{ "error": "invalid authorization" }