Ledger Methods¶
Methods for obtaining information about the status of the XRP Ledger.
- xrpl.ledger.get_fee(client: xrpl.clients.sync_client.SyncClient, *, max_fee: Optional[float] = 2, fee_type: str = 'open') str ¶
Query the ledger for the current minimum 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 cost). The default is “open”.
- Returns
The minimum fee for transactions.
- Raises
XRPLRequestFailureException – if the rippled API call fails.
- xrpl.ledger.get_latest_open_ledger_sequence(client: xrpl.clients.sync_client.SyncClient) 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.
- xrpl.ledger.get_latest_validated_ledger_sequence(client: xrpl.clients.sync_client.SyncClient) 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.