API Endpoints Overview
This document provides the complete list of API endpoints based on the actual implementation.
Authentication
Get OAuth Token
POST /o/token/
Get access token using client credentials.
Request Body:
grant_type: "client_credentials"client_id: Your client IDclient_secret: Your client secretscope: "read write" (optional)
List OAuth Applications
GET /o/apps/
List all OAuth applications (requires authentication).
Currencies & Rates
Get Available Currencies
GET /currencies/
Get list of currencies available for deposits or withdrawals.
Query Parameters:
full(boolean): Return full currency details (default: false)min_max(boolean): Include min/max limits (default: false)include_usd(boolean): Include USD equivalent values (default: false)withdrawal(boolean): Get withdrawal currencies instead of deposit (default: false)
Response (simple):
{
"currencies": ["USDTTRC20", "USDTARB", "BTC", "ETH"]
}
Response (full with min_max):
{
"currencies": [
{
"currency": "USDTTRC20",
"name": "Tether USD",
"token": "usdt",
"blockchain": "trx",
"is_popular": true,
"is_stable": true,
"min_amount": "10.00000000",
"max_amount": "100000.00000000",
"min_amount_usd": "10.00",
"max_amount_usd": "100000.00"
}
]
}
Get Exchange Rate
GET /rates/
Get exchange rate between currencies.
Query Parameters:
amount: Amount to convert (default: 1.0)currency_from: Source currency code (default: USD)currency_to: Target currency codefull: Return detailed info with fees (default: false)
Response (simple):
{
"currency_from": "USD",
"currency_to": "USDTTRC20",
"amount": 100.0,
"estimated_amount": 99.9,
"rate": 0.999
}
Response (with full=true):
{
"currency_from": "USD",
"currency_to": "USDTTRC20",
"amount": 100.0,
"estimated_amount": 99.0,
"rate": 0.999,
"fee_percentage": 1.0,
"fee_amount": 1.0,
"timestamp": "2024-12-27T10:00:00Z"
}
Payments
Create Payment
POST /payments/
Create a new cryptocurrency payment.
Request Body:
{
"amount": 100.00,
"currency": "USDTTRC20",
"price_currency": "USD",
"callback_url": "https://your-site.com/webhook",
"order_id": "order_123",
"order_description": "Payment for order 123",
"is_fixed_rate": true,
"is_fee_paid_by_user": false,
"expiry_minutes": 30
}
List Payments
GET /payments/
List all payments with pagination.
Query Parameters:
limit: Max results (1-100, default: 20)offset: Pagination offset (default: 0)status: Filter by statuscurrency: Filter by currencyblockchain: Filter by blockchaintoken: Filter by token
Get Payment Details
GET /payments/{transaction_id}/
Get detailed information about a specific payment.
Check Payment Status
POST /payments/status/
Check payment status by transaction ID.
Request Body:
{
"transaction_id": "123e4567-e89b-12d3-a456-426614174000"
}
Get Minimum Amount
GET /payments/min-amount/
Get minimum payment amount for a currency.
Query Parameters:
currency: Cryptocurrency code (e.g., "USDTTRC20")
Withdrawals
Create Withdrawal
POST /withdrawal/
Create a new withdrawal request.
Request Body (Option 1 - with currency):
{
"amount": 50.00,
"currency": "USDTTRC20",
"address": "TXYZabc123...",
"callback_url": "https://your-site.com/webhook"
}
Request Body (Option 2 - with blockchain/token):
{
"amount": 50.00,
"blockchain": "TRX",
"token": "USDT",
"address": "TXYZabc123...",
"callback_url": "https://your-site.com/webhook"
}
List Withdrawals
GET /withdrawal/
List withdrawals with filtering and pagination.
Query Parameters:
status: Filter by statusblockchain: Filter by blockchaintoken: Filter by tokenlimit: Max results (default: 20)offset: Pagination offset
Get Withdrawal Details
GET /withdrawal/{withdrawal_id}/
Get detailed information about a specific withdrawal.
Check Withdrawal Status
POST /withdrawal/status/
Check withdrawal status by ID.
Request Body:
{
"withdrawal_id": "123e4567-e89b-12d3-a456-426614174000"
}
Validate Address
POST /withdrawal/validate-address/
Validate a cryptocurrency address.
Request Body:
{
"address": "0x1234567890abcdef...",
"currency": "USDTARB"
}
Estimate Withdrawal Fee
POST /withdrawal/fee-estimate/
Estimate the fee for a withdrawal.
Request Body:
{
"amount": 100.00,
"currency": "USDTTRC20",
"address": "TXYZabc123..." // optional for TRC20
}
Estimate Withdrawal
POST /withdrawal/estimate/
Simulate a withdrawal showing amounts and fees.
Request Body:
{
"amount": 100.00,
"currency": "USDTTRC20",
"final_amount": false // true if amount is what user should receive
}
Get Minimum Withdrawal Amount
POST /withdrawal/min-amount/
Get minimum withdrawal amount for a currency.
Request Body:
{
"currency": "USDTTRC20"
}
Get Available Withdrawal Currencies
GET /withdrawal/available-currencies/
Get list of currencies available for withdrawal (with positive balance).
Balances
Get All Balances
GET /user/balances/
Get aggregated balances for main account and all sub-accounts.
Response:
{
"account": {
"USDTTRC20": {
"amount": "1000.00000000",
"pending_amount": "0.00000000",
"currency": {
"currency": "USDTTRC20",
"blockchain": "TRX",
"token": "USDT"
},
"statistics": {
"total_deposited": "5000.00000000",
"total_withdrawn": "4000.00000000"
},
"last_transaction": "2024-12-27T10:00:00Z"
}
},
"sub_accounts": {
"USDTTRC20": {
"total_amount": "500.00000000",
"total_pending": "0.00000000",
"accounts": [
{
"account_name": "Wallet 1",
"account_id": "123abc",
"amount": "300.00000000",
"pending_amount": "0.00000000",
"available_balance": "300.00000000"
}
]
}
},
"statistics": {
"currencies_count": 5,
"subaccounts_count": 3
}
}
Get Balance History
GET /user/balances/history/
Get transaction history for balances.
Query Parameters:
currency: Filter by currency codetype: Filter by transaction typelimit: Max results (default: 50)offset: Pagination offset
Response:
{
"history": [
{
"id": 123,
"currency": "USDTTRC20",
"amount_change": "100.00000000",
"fee_amount": "1.00000000",
"balance_after": "1100.00000000",
"transaction_type": "deposit",
"description": "Payment received",
"related_transaction_id": "550e8400-e89b-12d3-a456-426614174000",
"created_at": "2024-12-27T10:00:00Z"
}
],
"total": 150,
"limit": 50,
"offset": 0
}
Wallets (Sub-accounts)
List Wallets
GET /wallets/
List all wallets/sub-accounts.
Create Wallet
POST /wallets/
Create a new wallet/sub-account.
Request Body:
{
"name": "My Wallet",
"description": "Wallet for specific purpose"
}
Get Wallet Details
GET /wallets/{wallet_id}/
Get specific wallet details.
Get Wallet Balance
POST /wallets/{wallet_id}/balance/
Get wallet balance for all currencies.
Create Payment from Wallet
POST /wallets/{wallet_id}/payment/
Create a payment from wallet balance.
Transfer Between Wallets
POST /wallets/{wallet_id}/transfer_funds/
Transfer funds between wallets.
Withdraw to Master Account
POST /wallets/{wallet_id}/withdraw_to_master/
Withdraw funds from wallet to master account.
User Information
Get Tenant Info
GET /user/me/
Get current tenant information.
Response:
{
"name": "Your Company",
"transaction_fee": 1.0,
"is_fee_paid_by_user": false,
"webhook_callback_url": "https://your-site.com/webhook",
"webhook_secret_masked": "sec_****fgh"
}
Configure Webhooks
POST /user/webhooks/
Configure webhook settings.
Request Body:
{
"callback_url": "https://your-site.com/webhook"
}
Response (first time):
{
"callback_url": "https://your-site.com/webhook",
"secret": "sec_1234567890abcdef",
"message": "Webhook settings created successfully. Please save your secret - it will not be shown again."
}
Get Platform Fees (Admin Only)
GET /user/fees/
Get platform fee balances (requires admin scope).
Response:
{
"fee_balances": {
"USDTTRC20": {
"amount": "1500.00000000",
"total_collected": "5000.00000000",
"total_withdrawn": "3500.00000000",
"currency": {
"currency": "USDTTRC20",
"blockchain": "TRX",
"token": "USDT"
},
"last_collection": "2024-12-27T09:00:00Z"
}
},
"recent_collections": [
{
"amount": "10.00000000",
"currency": "USDTTRC20",
"tenant_name": "Company ABC",
"transaction_id": "550e8400-e89b-12d3-a456-426614174000",
"created_at": "2024-12-27T09:00:00Z"
}
],
"total_fees_usd_estimate": "1485.50"
}
API Status
GET /status/
Check if API is operational.
Response:
{
"status": "ok"
}