Skip to main content
GET
/
v1
/
merchant
/
balance
/
{currency}
Get Balance by Currency
curl --request GET \
  --url https://api.example.com/v1/merchant/balance/{currency} \
  --header 'X-API-Key: <x-api-key>'
{
  "success": true,
  "data": {
    "currency": "<string>",
    "balance": {
      "availableBalance": 123,
      "totalEarned": 123,
      "totalWithdrawn": 123,
      "pendingBalance": 123,
      "limits": {
        "daily": {
          "limit": 123,
          "used": 123,
          "remaining": 123,
          "resetAt": "<string>"
        },
        "monthly": {
          "limit": 123,
          "used": 123,
          "remaining": 123,
          "resetAt": "<string>"
        }
      }
    }
  },
  "message": "<string>",
  "statusCode": 123
}

Overview

This endpoint retrieves your account balance for a specific cryptocurrency, including available balance, total earned, total withdrawn, and withdrawal limits. Use this endpoint when you only need balance information for one cryptocurrency.

Authentication

X-API-Key
string
required
Your InventPay API key Example: cmfnz7jei0005p54eekx4e6mb

Path Parameters

currency
string
required
The cryptocurrency to get balance for Options: BTC, ETH, LTC, USDT_ERC20, USDT_BEP20 Example: "USDT_BEP20"

Response

success
boolean
Indicates if the request was successful
data
object
Balance information object
message
string
Success message Example: "Balance retrieved successfully"
statusCode
number
HTTP status code Example: 200

Example Request

curl -X GET https://api.inventpay.io/v1/merchant/balance/USDT_BEP20 \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

200 - Success
{
  "success": true,
  "data": {
    "currency": "USDT_BEP20",
    "balance": {
      "availableBalance": 1500.75,
      "totalEarned": 5000,
      "totalWithdrawn": 3499.25,
      "pendingBalance": 250.5,
      "limits": {
        "daily": {
          "limit": 10000,
          "used": 1500,
          "remaining": 8500,
          "resetAt": "2024-01-02T00:00:00.000Z"
        },
        "monthly": {
          "limit": 100000,
          "used": 15000,
          "remaining": 85000,
          "resetAt": "2024-02-01T00:00:00.000Z"
        }
      }
    }
  },
  "message": "Balance retrieved successfully",
  "statusCode": 200
}
400 - Invalid Currency
{
  "success": false,
  "error": "Invalid currency",
  "details": {
    "currency": "Must be one of: BTC, ETH, LTC, USDT_ERC20, USDT_BEP20"
  },
  "statusCode": 400
}
401 - Unauthorized
{
  "success": false,
  "error": "Invalid API key",
  "statusCode": 401
}

Error Codes

Status CodeDescription
200Balance retrieved successfully
400Invalid currency parameter
401Invalid or missing API key
429Rate limit exceeded
500Internal server error