Merchant Balance
Query the authenticated merchant's real-time cryptocurrency (USDT) ledger balances on the SureLink Gateway, including available funds for disbursements and withdrawals, frozen amounts under active fulfillment, and total account balance.
1. Get Merchant Balance
GET /api/v1/balance
Headers
Standard HMAC authentication headers (X-Api-Key, X-Timestamp, X-Nonce, X-Signature).
For GET requests, the signing material is: $$\text{Signing String} = \text{X-Timestamp} + \text{"."} + \text{X-Nonce} + \text{"."}$$
Request Parameters
None. The merchant identity is securely resolved from the X-Api-Key and verified signature.
Request Example
bash
curl -X GET "https://api-sandbox.surelink.io/api/v1/balance" \
-H "X-Api-Key: mch_key_your_api_key" \
-H "X-Timestamp: 1715000000000" \
-H "X-Nonce: 9f8e7d6c5b4a392817263544a1b2c3d4" \
-H "X-Signature: c8b9...f01"typescript
import { sendSignedRequest } from './signer';
const balance = await sendSignedRequest({
apiKey: 'mch_key_...',
apiSecret: 'sec_...',
method: 'GET',
url: 'https://api-sandbox.surelink.io/api/v1/balance'
});
console.log('Available:', balance.available);
console.log('Frozen:', balance.frozen);
console.log('Total:', balance.total);python
from signer import make_signed_request
balance = make_signed_request(
api_key="mch_key_...",
api_secret="sec_...",
method="GET",
url="https://api-sandbox.surelink.io/api/v1/balance"
)
print(f"Available: {balance['available']}, Frozen: {balance['frozen']}, Total: {balance['total']}")Response
- Status Code:
200 OK
json
{
"merchantId": "3b2e5a7d-8f90-4c12-9e34-5a6b7c8d9e0f",
"currency": "USDT",
"available": "8500.500000",
"frozen": "1200.000000",
"total": "9700.500000"
}Field Descriptions
| Field | Type | Description |
|---|---|---|
merchantId | string | Authenticated merchant unique ID |
currency | string | Settlement currency code, fixed to 'USDT' |
available | string | Available Balance (6 decimal places); available for payouts or crypto withdrawals |
frozen | string | Frozen Balance (6 decimal places); locked in active payout orders or dispute hold |
total | string | Total Account Balance (6 decimal places); available + frozen |
