Developer Platform

Build with pUSD

Integrate pUSD as a user-aligned reward layer. Access treasury metrics, manage rewards, build utilities.

Core Concepts

How pUSD Works

Understand the fundamental mechanics before integrating.

Reward Flow: Trade → Calculate → Credit → Use

1

Trade Event

User executes a trade on Prex Markets

2

Reward Calc

System calculates pUSD based on volume + LossLess

3

pUSD Credit

pUSD credited to user account (subject to unlock)

4

On-Platform Use

User can utilize, stake, or redeem pUSD

Proof-of-Activity

pUSD is minted based on verified user activity: trading volume, referrals, and grants. Never purchased.

LossLess Rebates

10% of realized trading losses automatically rebated as pUSD, up to caps. Softens downside.

Treasury Updates

50% of protocol revenue flows to Solvency Pool continuously. Query real-time via API.

Redemption Epochs

Weekly redemption windows. Value calculated at epoch close: Pool ÷ Opting pUSD.

Quick Start

Get Started in Minutes

Fetch pUSD data with a simple API call. No authentication required for public endpoints.

terminal
# Get current treasury status
curl https://api.prex.markets/v1/treasury/status

# Response
{
  "solvency_pool": {
    "usdt_balance": 847523.45,
    "last_updated": "2026-02-02T10:30:00Z"
  },
  "health_score": 199.4,
  "status": "healthy"
}
REST API

API Endpoints

All endpoints return JSON. Base URL: https://api.prex.markets

GET/v1/treasury/status

Get current treasury and solvency pool status

GET/v1/treasury/reserves

Get detailed reserve breakdown and historical data

GET/v1/pusd/supply

Get pUSD supply metrics (minted, burned, circulating)

GET/v1/pusd/redemption/value

Get current redemption value calculation

GET/v1/user/balance
Auth Required

Get user pUSD balance and unlock status

GET/v1/user/earnings
Auth Required

Get user earning history and sources

POST/v1/redemption/opt-in
Auth Required

Opt into the current redemption epoch

GET/v1/redemption/epochs

Get redemption epoch history and upcoming epochs

Authentication

API Keys

Public endpoints (treasury, supply, redemption epochs) don't require authentication. For user-specific data and actions, you'll need an API key.

Secure by Default

All requests use HTTPS. API keys are scoped to specific permissions.

Easy Key Management

Generate, rotate, and revoke keys from your dashboard.

Rate Limiting

Public: 100 req/min. Authenticated: 1000 req/min.

authenticated-request.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Include your API key in the Authorization header
const response = await fetch(
'https://api.prex.markets/v1/user/balance',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
// Response
{
"user_id": "usr_abc123",
"pusd_balance": {
"total": 5000.00,
"unlocked": 2500.00,
"locked": 2500.00,
"eligible_for_redemption": 1250.00
},
"unlock_progress": {
"percentage": 50,
"next_milestone": "volume_tier",
"next_unlock_amount": 1250.00
}
}
Webhooks

Real-time Events

Subscribe to events and get notified when important things happen.

treasury.updatedAvailable

Fired when treasury balance changes significantly

redemption.epoch_startedAvailable

Fired when a new redemption epoch opens

redemption.epoch_endedAvailable

Fired when redemption epoch closes with final values

pusd.large_burnComing Soon

Fired when a significant burn event occurs

user.pusd_earnedComing Soon

Fired when a user earns pUSD (requires user auth)

user.unlock_milestoneComing Soon

Fired when a user hits an unlock milestone

webhook-payload.json
{
  "event": "redemption.epoch_ended",
  "timestamp": "2026-02-08T00:00:00Z",
  "data": {
    "epoch_id": "epoch_2026_06",
    "total_opted_in": 425000,
    "solvency_pool_at_close": 847523.45,
    "redemption_value": 1.9942,
    "total_redeemed_usdt": 847523.45
  }
}
SDKs & Libraries

Official SDKs

Type-safe, well-documented libraries for popular languages.

JavaScript/TypeScript

Available
@prex-markets/sdkView package

Python

Available
prex-marketsView package

Go

Coming Soon
github.com/prex-markets/go-sdkComing Q2 2026

Need Help Integrating?

Our developer relations team is here to help you build on Prex.