Ledger Methods

Async methods for obtaining information about the status of the XRP Ledger.

async xrpl.asyncio.ledger.get_fee(client: Client, *, max_fee: float | None = 2, fee_type: str = 'open') str

Query the ledger for the current transaction fee.

Parameters:
  • client – the network client used to make network calls.

  • max_fee – The maximum fee in XRP that the user wants to pay. If load gets too high, then the fees will not scale past the maximum fee. If None, there is no ceiling for the fee. The default is 2 XRP.

  • fee_type – The type of fee to return. The options are “open” (the load-scaled fee to get into the open ledger), “minimum” (the minimum transaction fee) or “dynamic” (dynamic fee-calculation based on the queue size of the node). The default is “open”. The recommended option is “dynamic”.

Returns:

The transaction fee, in drops. Read more about drops

Raises:
async xrpl.asyncio.ledger.get_latest_open_ledger_sequence(client: Client) int

Returns the sequence number of the latest open ledger.

Parameters:

client – The network client to use to send the request.

Returns:

The sequence number of the latest open ledger.

Raises:

XRPLRequestFailureException – if the rippled API call fails.

async xrpl.asyncio.ledger.get_latest_validated_ledger_sequence(client: Client) int

Returns the sequence number of the latest validated ledger.

Parameters:

client – The network client to use to send the request.

Returns:

The sequence number of the latest validated ledger.

Raises:

XRPLRequestFailureException – if the rippled API call fails.