SwiftCash API
Integrate crypto exchange features — live rates, sell/buy transactions, invoices, and KYC — directly into your application.
https://yourdomain.com/api/v1/
Overview
SwiftCash provides a JSON REST API. All requests and responses use application/json. Successful responses always contain "success": true and a data key. Errors contain "success": false and a message or errors key.
Authentication
Most endpoints require an API key passed in the Authorization header:
Authorization: Bearer sk_live_your_api_key_here
Obtain your key from Dashboard → Settings → API Access, or via the token endpoint. Endpoints marked public do not require auth.
Error Handling
HTTP status codes follow standard conventions. Response body always includes success: false and an explanatory message.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request — missing or invalid fields |
| 401 | Unauthorized — missing or invalid API key |
| 402 | Payment required — insufficient balance |
| 422 | Validation error — errors[] array returned |
| 429 | Too many requests — rate limited |
Rate Limits
- Authentication: 10 requests / 5 minutes per IP
- General endpoints: 120 requests / minute per API key
- OTP resend: 3 requests / 10 minutes per user
Rates
Query Parameters
| Param | Type | Description |
|---|---|---|
| asset | string | Filter to single asset: BTC, ETH, or USDT |
Example Response
{
"success": true,
"data": {
"BTC": {
"usd_price": 67500,
"sell_rate_ngn": 108783750.00,
"buy_rate_ngn": 109462500.00,
"ngn_usd_rate": 1620,
"spread_sell": 0.7,
"platform_fee": 0.5,
"last_updated": "2025-01-15T14:30:00+00:00"
}
}
}
Auth & Profile
Request Body (JSON)
| Field | Type | Required |
|---|---|---|
| string | required | |
| password | string | required |
curl -X POST https://yourdomain.com/api/v1/auth.php?action=token \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"yourpass"}'
Transactions
Query Parameters
| Param | Type | Description |
|---|---|---|
| type | string | sell | buy | bill | invoice |
| status | string | pending | confirmed | failed |
| asset | string | BTC, ETH, or USDT |
| page | int | Page number (default 1) |
| limit | int | Results per page (max 100, default 20) |
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
| type* | string | sell or buy |
| asset* | string | BTC, ETH, or USDT |
| network* | string | mainnet / ERC20 / TRC20 / BSC / SOL |
| amount* | float | Amount of crypto to sell/buy |
Example Response
{
"success": true,
"data": {
"id": 42,
"reference": "SC-API-A1B2C3D4",
"type": "sell",
"asset": "USDT",
"network": "TRC20",
"amount": 100,
"fee": 0.5,
"rate_ngn": 1603.8,
"amount_ngn": 160380.00,
"status": "pending"
}
}
After initiating a sell, send the exact amount of asset to your SwiftCash deposit address. Transactions are confirmed by our team within 30 minutes.
Invoices
Request Body
| Field | Type | Description |
|---|---|---|
| asset* | string | Crypto to receive: BTC, ETH, USDT |
| network* | string | Network for payment |
| amount* | float | Amount to request |
| description* | string | Invoice description / memo |
| expires_hours | int | Expiry (1–720 hours, default 24) |
| client_email | string | Client email for notification |
KYC
Request Body
| Field | Type | Description |
|---|---|---|
| doc_type* | string | government_id, selfie, or proof_address |
| document_url* | string | Publicly accessible URL to uploaded document |
SwiftCash API v1 — Need help? Open a support ticket