API ReferenceMerchant API

Get ledger history for a specific currency.

Returns a paginated list of ledger entries (deposits, fees, payouts) for the given currency. Supports filtering by entry type.

GET
/v1/balances/{currency}/ledger
X-API-Key<token>

API key issued by the merchant dashboard. The key's environment (live/test) determines which data the caller can access. Permissions on the key control which endpoints are reachable.

In: header

Path Parameters

currencystring

Currency code (e.g. BTC, ETH, SOL).

Lengthlength <= 20

Query Parameters

entry_type?string

Filter by ledger entry type.

Lengthlength <= 255
limit?integer

Maximum number of items to return (default 20, max 100).

Default20
Range1 <= value <= 100
offset?integer

Number of items to skip.

Default0
Range0 <= value

Response Body

fetch("https://api.halfin.xyz/api/v1/balances/string/ledger?entry_type=string&limit=20&offset=0", {  method: "GET"})
{
  "data": [
    {
      "id": 0,
      "environment": "live",
      "entry_type": "string",
      "amount": "string",
      "direction": "credit",
      "balance_after": "string",
      "reference_type": "string",
      "reference_id": "97c1ff22-6e4f-4821-b1d3-5236781d37b8",
      "description": "string",
      "created_at": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "request_id": "string",
    "pagination": {
      "total": 0,
      "limit": 0,
      "offset": 0,
      "has_more": true
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": [
      "string"
    ]
  },
  "meta": {
    "request_id": "string"
  }
}