Skip to main content
REST API for querying user rewards, configuring reward endorsements, reading Flashpoints data, and checking system stats.

Base URL

All endpoints are prefixed with /v1. Swagger docs are available at /docs.

Rewards

Get Rewards Leaderboard

Returns list of users sorted by USDB balance with their rewards info.
Parameters:
  • limit - Max results (default 100, max 500)
  • offset - Pagination offset
Response:

Get User Summary

Returns current USDB balance, today’s volume, rewards bracket, and projected rewards.
Response:
Excluded addresses (LP pools, burn addresses) return a 400 status with { "reason": "This address is excluded and does not earn rewards" }. Rewards Brackets:

Get Payout History

Returns paginated list of rewards payouts for a user.
Parameters:
  • limit - Max results (default 30)
  • offset - Pagination offset
Response:
payoutSats is the sum of rewardsPayoutSats and endorsementsPayoutSats.

Endorsements

Endorsements let a pubkey direct part of its future daily rewards payout to one or more recipient pubkeys.

Canonical YAML Templates (for Signing)

Create and update both use action: upsert. The API creates a new record or updates the existing (endorser, to) pair. Create endorsement template:
Update endorsement template:
Delete endorsement template:
The client signs the SHA-256 hash of the YAML payload with the endorser private key and sends that signature as hex.

Get Endorsements

Response:

Create or Update Endorsement

Creates or updates one endorsement rule for to under the endorser.
Request body:
Signing payload (canonical YAML):
The API verifies the signature against the endorser pubkey using secp256k1 over the SHA-256 hash of this YAML payload. Response:

Delete Endorsement

Deletes one endorsement mapping for the endorser.
Request body:
Signing payload (canonical YAML):
Response:

Endorsement Rules and Validation

  • pubkey, endorser, and to must be 66-char compressed pubkey hex strings.
  • endorser in body must match :pubkey in the route.
  • ratioBps must be between 1 and 10000.
  • Sum of all active endorsement ratios for an endorser cannot exceed 10000.
  • Endorser cannot endorse to the same pubkey.
  • timestampNonce must be UUIDv7 and within a 5-minute window.
  • Each nonce can only be used once (replay protected).
Common 400 errors:
  • { "error": "Body endorser must match route pubkey" }
  • { "error": "Cannot endorse to the same pubkey. Use rewards payee reassignment instead." }
  • { "error": "Total endorsement ratio cannot exceed 10000 bps" }
  • { "error": "Nonce has already been used" }
  • { "error": "Signature verification failed" }

Flashpoints

Get Points Leaderboard

Returns list of users sorted by current Flashpoints with their point balances and volume.
Parameters:
  • limit - Max results (default 100, max 500)
  • offset - Pagination offset
Response:

Get User Points

Returns Flashpoints balance, rank, and projected daily earnings.
Response:

Get Points History

Returns paginated list of point earning events.
Parameters:
  • limit - Max results (default 30)
  • offset - Pagination offset
Response:

Stats

Get Global Stats

Returns system-wide statistics.
Response:

Health Check

Response:
Returns "status": "degraded" if either payout or points processing is behind.

Error Handling

Validation errors usually return:
Excluded pubkeys on GET /v1/rewards/:pubkey return:
Server-side errors may return:
Common status codes:
  • 400 - Bad request (validation errors, excluded addresses)
  • 404 - Not found
  • 500 - Internal server error