SwiftCash API

Integrate crypto exchange features — live rates, sell/buy transactions, invoices, and KYC — directly into your application.

Base URL 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.

CodeMeaning
200Success
400Bad request — missing or invalid fields
401Unauthorized — missing or invalid API key
402Payment required — insufficient balance
422Validation error — errors[] array returned
429Too many requests — rate limited

Rate Limits

Rates

GET /rates.php public Get live rates for all assets

Query Parameters

ParamTypeDescription
assetstringFilter 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

POST /auth.php?action=token public Exchange credentials for API key

Request Body (JSON)

FieldTypeRequired
emailstringrequired
passwordstringrequired
curl -X POST https://yourdomain.com/api/v1/auth.php?action=token \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"yourpass"}'
GET /auth.php?action=me 🔑 auth Get current user profile & balances
GET /auth.php?action=keys 🔑 auth List API keys
DELETE /auth.php?action=keys&key_id=N 🔑 auth Revoke an API key

Transactions

GET /transaction.php 🔑 auth List transactions

Query Parameters

ParamTypeDescription
typestringsell | buy | bill | invoice
statusstringpending | confirmed | failed
assetstringBTC, ETH, or USDT
pageintPage number (default 1)
limitintResults per page (max 100, default 20)
POST /transaction.php 🔑 auth Initiate a sell or buy

Request Body (JSON)

FieldTypeDescription
type*stringsell or buy
asset*stringBTC, ETH, or USDT
network*stringmainnet / ERC20 / TRC20 / BSC / SOL
amount*floatAmount 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

GET /invoice.php?token={token} public Look up invoice by token
GET /invoice.php 🔑 auth List your invoices
POST /invoice.php 🔑 auth Create an invoice

Request Body

FieldTypeDescription
asset*stringCrypto to receive: BTC, ETH, USDT
network*stringNetwork for payment
amount*floatAmount to request
description*stringInvoice description / memo
expires_hoursintExpiry (1–720 hours, default 24)
client_emailstringClient email for notification

KYC

GET /kyc.php 🔑 auth Get KYC status and limits
POST /kyc.php 🔑 auth Submit a KYC document URL

Request Body

FieldTypeDescription
doc_type*stringgovernment_id, selfie, or proof_address
document_url*stringPublicly accessible URL to uploaded document

SwiftCash API v1 — Need help? Open a support ticket