POSTaccount_channels

XRP Ledger Mainnethttps://xrpl-mainnet.nodit.io/

Returns the list of Payment Channels owned by an account. Only channels where the queried account is the source are returned.

Request Body
methodstringrequired
accountstringrequired

The address of the account that owns and funds the channel.

destination_accountstring

Returns only the channels whose destination is the specified account.

limitinteger

The number of channels to return. Pass a value between 10 and 400.

markerobject

A value that marks a pagination position. Pass the marker value from a previous response to retrieve the next page. Its format depends on the server implementation, so use it verbatim without interpreting its contents.

ledger_hashstring

The hash of the ledger version to use. Pass a 32-byte hex string.

ledger_indexinteger

Specifies the ledger version to use. Pass a ledger index as an integer, or use one of the shortcut strings below.

  • validated: Uses the most recent ledger version validated by the network.
  • closed: Uses the most recent ledger version the server has closed. It may not be validated.
  • current: Uses the in-progress ledger version the server is currently building.

The ledger index of the version to use.

Responses
accountstring

The address of the account that owns and funds the channel.

accountstring

The address of the channel owner.

amountstring

The total amount held in the channel, in drops.

balancestring

The amount already paid out to the destination, in drops.

channel_idstring

The 64-character hex string that identifies the channel.

destination_accountstring

The address of the channel's destination account.

settle_delayinteger

The time the channel stays open after a close request, in seconds.

public_keystring

The base58-encoded public key.

public_key_hexstring

The hex-encoded public key.

expirationinteger

The mutable expiration time of the channel, in seconds since the Ripple Epoch.

cancel_afterinteger

The immutable expiration time of the channel, in seconds since the Ripple Epoch.

source_taginteger

The 32-bit tag that identifies the payment source.

destination_taginteger

The 32-bit tag that identifies the payment destination.

limitinteger

The number of channel objects returned.

markerobject

A value that marks a pagination position. Pass the marker value from a previous response to retrieve the next page. Its format depends on the server implementation, so use it verbatim without interpreting its contents.

ledger_hashstring

The hash of the ledger version used. Returned when a validated ledger version was queried.

ledger_indexinteger

The ledger index of the version used. Returned when a validated ledger version was queried.

ledger_current_indexinteger

The ledger index of the in-progress ledger. Returned when the current ledger was queried.

validatedboolean

Whether the response was derived from a validated ledger version.

X-API-KEY
RequestCU50
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "account_channels",
  "params": [
    {
      "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "ledger_index": "validated",
      "limit": 200
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
    "channels": [
      {
        "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
        "amount": "10000000",
        "balance": "2500000",
        "channel_id": "8C0E1B3D5F7A9C0E2D4F6B8A0C1E3D5F7A9B0C2E4D6F8A0B1C3E5D7F9A0B2C4E",
        "destination_account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
        "public_key": "aB44YfzW24VDEJQ2UuLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xoDf",
        "public_key_hex": "032D2471DB0F0F1B0D1E2C3D4E5F60718293A4B5C6D7E8F90A1B2C3D4E5F60718",
        "settle_delay": 86400
      }
    ],
    "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
    "ledger_index": 98765432,
    "validated": true
  }
}