Ledger Methods

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

async xrpl.asyncio.ledger.get_fee(client: xrpl.asyncio.clients.client.Client, *, max_fee: Optional[float] = 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) or “minimum” (the minimum transaction fee). The default is “open”.

Returns

The transaction fee, in drops.

Raises
async xrpl.asyncio.ledger.get_latest_open_ledger_sequence(client: xrpl.asyncio.clients.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: xrpl.asyncio.clients.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.