paySwapr Developer API
v1
REST API for building your own tools on top of paySwapr. Base URL:
https://payswapr.com/api/dev/v1.
Access is via a scoped API key you generate from your account.
# Authentication
You must already have a paySwapr account. Sign in and go to Profile → Developer / API to create a key, choose its scopes, and copy the secret (shown only once). Keys are revocable and can be regenerated at any time.
Send your key on every request:
Authorization: Bearer YOUR_API_KEY Accept: application/json
A developer key is limited to the scopes you grant it and can never
access wallet balances, withdrawals, seed phrases, KYC, or account settings — those live on the
first-party app only. There is no login or register endpoint here by design.
Example
curl https://payswapr.com/api/dev/v1/coins \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
Scopes
Each key holds one or more scopes. A request is rejected with 403 insufficient_scope if the key lacks the scope its endpoint requires.
| Scope | Status |
|---|---|
| dev:market:read | Available |
| dev:profile:read | Available |
| dev:offers:read | Available |
| dev:trades:read | Available |
| dev:offers:write | Available HMAC |
| dev:trades:write | Available HMAC |
Market Data
Requires scope dev:market:read
| Method | Endpoint |
|---|---|
| GET | /api/dev/v1/market/prices |
| GET | /api/dev/v1/market/price/{coin} |
| GET | /api/dev/v1/coins |
| GET | /api/dev/v1/currencies |
Profile
Requires scope dev:profile:read
| Method | Endpoint |
|---|---|
| GET | /api/dev/v1/profile |
| GET | /api/dev/v1/users/{username} |
| GET | /api/dev/v1/users/{username}/feedback |
| GET | /api/dev/v1/users/{username}/stats |
Offers
Requires scope dev:offers:read
| Method | Endpoint |
|---|---|
| GET | /api/dev/v1/offers |
| GET | /api/dev/v1/offers/mine |
| GET | /api/dev/v1/offers/{slug} |
Trades
Requires scope dev:trades:read
| Method | Endpoint |
|---|---|
| GET | /api/dev/v1/trades |
| GET | /api/dev/v1/trades/{ref} |
| GET | /api/dev/v1/trades/{ref}/messages |
Write actions HMAC
Value-moving endpoints require the write scope and a valid HMAC signature on every request. The signature authorises the action in place of a wallet PIN, so your secret never travels on the wire. A dev key can only ever release escrow to the trade counterparty — never to an arbitrary address — and withdrawals/seed export are not part of the developer API.
Signing a request
Creating a key with a write scope returns a one-time signing secret. Build the canonical string, HMAC-SHA256 it with that secret, and send the hex digest.
canonical = "{timestamp}\n{METHOD}\n{path}\n{rawBody}"
signature = hex( hmac_sha256( signing_secret, canonical ) )
# headers on every write request
Authorization: Bearer YOUR_API_KEY
X-Timestamp: {unix seconds} # within 5 min of server time
X-Signature: {signature}
path begins with a slash, e.g. /api/dev/v1/trades/CS-AB12/release. rawBody is the exact JSON body sent (empty string when there is none).
Offers — requires dev:offers:write HMAC
| POST | /api/dev/v1/offers |
| PUT | /api/dev/v1/offers/{slug} |
| DELETE | /api/dev/v1/offers/{slug} |
Trades — requires dev:trades:write HMAC
| POST | /api/dev/v1/trades |
| POST | /api/dev/v1/trades/{ref}/accept |
| POST | /api/dev/v1/trades/{ref}/escrow |
| POST | /api/dev/v1/trades/{ref}/mark-paid |
| POST | /api/dev/v1/trades/{ref}/release |
| POST | /api/dev/v1/trades/{ref}/cancel |
| POST | /api/dev/v1/trades/{ref}/dispute |
| POST | /api/dev/v1/trades/{ref}/messages |
422 escrow_pin_setup_required; confirm your PIN once in the app, then retry.
USDT-collateral escrow remains app-only.
Standard Error Responses
Response Shape
{
"error": "insufficient_scope",
"message": "This API key is missing the required scope: dev:trades:read.",
"scope": "dev:trades:read"
}
HTTP Status Codes
Rate Limits