XRPL Request Models

Request models.

class xrpl.models.requests.AccountChannels(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request returns information about an account’s Payment Channels. This includes only channels where the specified account is the channel’s source, not the destination. (A channel’s “source” and “owner” are the same.)

All information retrieved is relative to a particular version of the ledger.

See account_channels

account: str = <object object>

This field is required.

destination_account: Optional[str] = None
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: int = 200
marker: Optional[Any] = None
method: xrpl.models.requests.request.RequestMethod = 'account_channels'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.AccountCurrencies(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request retrieves a list of currencies that an account can send or receive, based on its trust lines.

This is not a thoroughly confirmed list, but it can be used to populate user interfaces.

See account_currencies

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'account_currencies'
strict: bool = False
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.AccountInfo(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request retrieves information about an account, its activity, and its XRP balance.

All information retrieved is relative to a particular version of the ledger.

See account_info

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'account_info'
queue: bool = False
signer_lists: bool = False
strict: bool = False
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.AccountLines(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request returns information about an account’s trust lines, including balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger.

See account_lines

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: Optional[int] = None
marker: Optional[Any] = None
method: xrpl.models.requests.request.RequestMethod = 'account_lines'
peer: Optional[str] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.AccountObjectType(value)

Bases: str, enum.Enum

Represents the object types that an AccountObjectsRequest can ask for.

CHECK = 'check'
DEPOSIT_PREAUTH = 'deposit_preauth'
ESCROW = 'escrow'
OFFER = 'offer'
PAYMENT_CHANNEL = 'payment_channel'
SIGNER_LIST = 'signer_list'
STATE = 'state'
TICKET = 'ticket'
class xrpl.models.requests.AccountObjects(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request returns the raw ledger format for all objects owned by an account.

For a higher-level view of an account’s trust lines and balances, see AccountLinesRequest instead.

See account_objects

account: str = <object object>

This field is required.

deletion_blockers_only: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: Optional[int] = None
marker: Optional[Any] = None
method: xrpl.models.requests.request.RequestMethod = 'account_objects'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

type: Optional[xrpl.models.requests.account_objects.AccountObjectType] = None
validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.AccountOffers(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request retrieves a list of offers made by a given account that are outstanding as of a particular ledger version.

See account_offers

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: Optional[int] = None
marker: Optional[Any] = None
method: xrpl.models.requests.request.RequestMethod = 'account_offers'
strict: bool = False
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.AccountTx(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request retrieves from the ledger a list of transactions that involved the specified account.

See account_tx

account: str = <object object>

This field is required.

binary: bool = False
forward: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
ledger_index_max: Optional[int] = None
ledger_index_min: Optional[int] = None
limit: Optional[int] = None
marker: Optional[Any] = None
method: xrpl.models.requests.request.RequestMethod = 'account_tx'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.BookOffers(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The book_offers method retrieves a list of offers, also known as the order book, between two currencies.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: Optional[int] = None
method: xrpl.models.requests.request.RequestMethod = 'book_offers'
taker: Optional[str] = None
taker_gets: Union[xrpl.models.currencies.issued_currency.IssuedCurrency, xrpl.models.currencies.xrp.XRP] = <object object>

This field is required.

taker_pays: Union[xrpl.models.currencies.issued_currency.IssuedCurrency, xrpl.models.currencies.xrp.XRP] = <object object>

This field is required.

to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.ChannelAuthorize(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The channel_authorize method creates a signature that can be used to redeem a specific amount of XRP from a payment channel.

Warning: Do not send secret keys to untrusted servers or through unsecured network connections. (This includes the secret, seed, seed_hex, or passphrase fields of this request.) You should only use this method on a secure, encrypted network connection to a server you run or fully trust with your funds. Otherwise, eavesdroppers could use your secret key to sign claims and take all the money from this payment channel and anything else using the same key pair. See Set Up Secure Signing for instructions.

See channel_authorize

amount: str = <object object>

This field is required.

channel_id: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

key_type: Optional[xrpl.constants.CryptoAlgorithm] = None
method: xrpl.models.requests.request.RequestMethod = 'channel_authorize'
passphrase: Optional[str] = None
secret: Optional[str] = None
seed: Optional[str] = None
seed_hex: Optional[str] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.ChannelVerify(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The channel_verify method checks the validity of a signature that can be used to redeem a specific amount of XRP from a payment channel.

amount: str = <object object>

This field is required.

channel_id: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'channel_verify'
public_key: str = <object object>

This field is required.

signature: str = <object object>

This field is required.

to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.DepositAuthorized(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The deposit_authorized command indicates whether one account is authorized to send payments directly to another. See Deposit Authorization for information on how to require authorization to deliver money to your account.

destination_account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[str] = None
method: xrpl.models.requests.request.RequestMethod = 'deposit_authorized'
source_account: str = <object object>

This field is required.

to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Fee(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The fee command reports the current state of the open-ledger requirements for the transaction cost. This requires the FeeEscalation amendment to be enabled.

This is a public command available to unprivileged users.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'fee'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.GatewayBalances(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request calculates the total balances issued by a given account, optionally excluding amounts held by operational addresses.

See gateway_balances

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

hotwallet: Optional[Union[str, List[str]]] = None
id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'gateway_balances'
strict: bool = False
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Ledger(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

Retrieve information about the public ledger. See ledger

accounts: bool = False
binary: bool = False
expand: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

full: bool = False
id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'ledger'
owner_funds: bool = False
queue: bool = False
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

transactions: bool = False
validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.LedgerClosed(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The ledger_closed method returns the unique identifiers of the most recently closed ledger. (This ledger is not necessarily validated and immutable yet.)

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: str = <object object>

This field is required.

ledger_index: int = <object object>

This field is required.

method: xrpl.models.requests.request.RequestMethod = 'ledger_closed'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.LedgerCurrent(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The ledger_current method returns the unique identifiers of the current in-progress ledger. This command is mostly useful for testing, because the ledger returned is still in flux.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'ledger_current'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.LedgerData(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version. See ledger data

binary: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: Optional[int] = None
marker: Optional[Any] = None
method: xrpl.models.requests.request.RequestMethod = 'ledger_data'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.LedgerEntry(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The ledger_entry method returns a single ledger object from the XRP Ledger in its raw format. See ledger format for information on the different types of objects you can retrieve. See ledger entry

account_root: Optional[str] = None
binary: bool = False
check: Optional[str] = None
deposit_preauth: Optional[Union[str, xrpl.models.requests.ledger_entry.DepositPreauth]] = None
directory: Optional[Union[str, xrpl.models.requests.ledger_entry.Directory]] = None
escrow: Optional[Union[str, xrpl.models.requests.ledger_entry.Escrow]] = None
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
index: Optional[str] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'ledger_entry'
offer: Optional[Union[str, xrpl.models.requests.ledger_entry.Offer]] = None
payment_channel: Optional[str] = None
ripple_state: Optional[xrpl.models.requests.ledger_entry.RippleState] = None
ticket: Optional[Union[str, xrpl.models.requests.ledger_entry.Ticket]] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Manifest(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The manifest method reports the current “manifest” information for a given validator public key. The “manifest” is the public portion of that validator’s configured token.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'manifest'
public_key: str = <object object>

This field is required.

to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.NoRippleCheck(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

This request provides a quick way to check the status of the Default Ripple field for an account and the No Ripple flag of its trust lines, compared with the recommended settings.

See noripple_check

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
limit: Optional[int] = 300
method: xrpl.models.requests.request.RequestMethod = 'noripple_check'
role: xrpl.models.requests.no_ripple_check.NoRippleCheckRole = <object object>

This field is required.

to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

transactions: bool = False
validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.NoRippleCheckRole(value)

Bases: str, enum.Enum

Represents the options for the address role in a NoRippleCheckRequest.

GATEWAY = 'gateway'
USER = 'user'
class xrpl.models.requests.PathFind(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

WebSocket API only! The path_find method searches for a path along which a transaction can possibly be made, and periodically sends updates when the path changes over time. For a simpler version that is supported by JSON-RPC, see the ripple_path_find method. For payments occurring strictly in XRP, it is not necessary to find a path, because XRP can be sent directly to any account.

Although the rippled server tries to find the cheapest path or combination of paths for making a payment, it is not guaranteed that the paths returned by this method are, in fact, the best paths. Due to server load, pathfinding may not find the best results. Additionally, you should be careful with the pathfinding results from untrusted servers. A server could be modified to return less-than-optimal paths to earn money for its operators. If you do not have your own server that you can trust with pathfinding, you should compare the results of pathfinding from multiple servers run by different parties, to minimize the risk of a single server returning poor results. (Note: A server returning less-than-optimal results is not necessarily proof of malicious behavior; it could also be a symptom of heavy server load.)

destination_account: str = <object object>

This field is required.

destination_amount: Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str] = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'path_find'
paths: Optional[List[List[xrpl.models.requests.path_find.PathStep]]] = None
send_max: Optional[Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str]] = None
source_account: str = <object object>

This field is required.

subcommand: xrpl.models.requests.path_find.PathFindSubcommand = <object object>

This field is required.

to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.PathFindSubcommand(value)

Bases: str, enum.Enum

There are three different modes, or sub-commands, of the path_find command. Specify which one you want with the subcommand parameter:

create - Start sending pathfinding information close - Stop sending pathfinding information status - Get the information of the currently-open pathfinding request

CLOSE = 'close'
CREATE = 'create'
STATUS = 'status'
class xrpl.models.requests.PathStep(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.base_model.BaseModel

A path set is an array. Each member of the path set is another array that represents an individual path. Each member of a path is an object that specifies the step. A step has the following fields.

account: Optional[str] = None
currency: Optional[str] = None
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

issuer: Optional[str] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a BaseModel.

If not overridden, returns the object dict with all non-None values.

Returns

The dictionary representation of a BaseModel.

type: Optional[int] = None
type_hex: Optional[str] = None
validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Ping(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The ping command returns an acknowledgement, so that clients can test the connection status and latency.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'ping'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Random(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The random command provides a random number to be used as a source of entropy for random number generation by clients.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'random'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.RipplePathFind(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The ripple_path_find method is a simplified version of the path_find method that provides a single response with a payment path you can use right away. It is available in both the WebSocket and JSON-RPC APIs. However, the results tend to become outdated as time passes. Instead of making multiple calls to stay updated, you should instead use the path_find method to subscribe to continued updates where possible.

Although the rippled server tries to find the cheapest path or combination of paths for making a payment, it is not guaranteed that the paths returned by this method are, in fact, the best paths.

destination_account: str = <object object>

This field is required.

destination_amount: Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str] = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'ripple_path_find'
send_max: Optional[Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str]] = None
source_account: str = <object object>

This field is required.

source_currencies: Optional[List[Union[xrpl.models.currencies.issued_currency.IssuedCurrency, xrpl.models.currencies.xrp.XRP]]] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.ServerInfo(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The server_info command asks the server for a human-readable version of various information about the rippled server being queried.

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'server_info'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.ServerState(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The server_state command asks the server for various machine-readable information about the rippled server’s current state. The response is almost the same as the server_info method, but uses units that are easier to process instead of easier to read. (For example, XRP values are given in integer drops instead of scientific notation or decimal values, and time is given in milliseconds instead of seconds.)

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'server_state'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Sign(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The sign method takes a transaction in JSON format and a seed value, and returns a signed binary representation of the transaction. To contribute one signature to a multi-signed transaction, use the sign_for method instead.

By default, this method is admin-only. It can be used as a public method if the server has enabled public signing.

Caution: Unless you run the rippled server yourself, you should do local signing with RippleAPI instead of using this command. An untrustworthy server could change the transaction before signing it, or use your secret key to sign additional arbitrary transactions as if they came from you.

See sign

build_path: Optional[bool] = None
fee_div_max: int = 1
fee_mult_max: int = 10
classmethod from_dict(value: Dict[str, Any])xrpl.models.requests.sign.Sign

Construct a new Sign from a dictionary of parameters.

Parameters

value – The value to construct the Sign from.

Returns

A new Sign object, constructed using the given parameters.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

key_type: Optional[xrpl.constants.CryptoAlgorithm] = None
method: xrpl.models.requests.request.RequestMethod = 'sign'
offline: bool = False
passphrase: Optional[str] = None
secret: Optional[str] = None
seed: Optional[str] = None
seed_hex: Optional[str] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Sign.

Returns

The dictionary representation of a Sign.

transaction: xrpl.models.transactions.transaction.Transaction = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.SignAndSubmit(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.submit.Submit

The submit method applies a transaction and sends it to the network to be confirmed and included in future ledgers.

This command has two modes: * Submit-only mode takes a signed, serialized transaction as a binary blob, and submits it to the network as-is. Since signed transaction objects are immutable, no part of the transaction can be modified or automatically filled in after submission. * Sign-and-submit mode takes a JSON-formatted Transaction object, completes and signs the transaction in the same manner as the sign method, and then submits the signed transaction. We recommend only using this mode for testing and development.

To send a transaction as robustly as possible, you should construct and sign it in advance, persist it somewhere that you can access even after a power outage, then submit it as a tx_blob. After submission, monitor the network with the tx method command to see if the transaction was successfully applied; if a restart or other problem occurs, you can safely re-submit the tx_blob transaction: it won’t be applied twice since it has the same sequence number as the old transaction.

See submit

build_path: Optional[bool] = None
fee_div_max: int = 1
fee_mult_max: int = 10
classmethod from_dict(value: Dict[str, Any])xrpl.models.requests.sign_and_submit.SignAndSubmit

Construct a new SignAndSubmit from a dictionary of parameters.

Parameters

value – The value to construct the SignAndSubmit from.

Returns

A new SignAndSubmit object, constructed using the given parameters.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

key_type: Optional[CryptoAlgorithm] = None
method: RequestMethod = 'submit'
offline: bool = False
passphrase: Optional[str] = None
secret: Optional[str] = None
seed: Optional[str] = None
seed_hex: Optional[str] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a SignAndSubmit.

Returns

The dictionary representation of a SignAndSubmit.

transaction: Transaction = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.SignFor(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The sign_for command provides one signature for a multi-signed transaction.

By default, this method is admin-only. It can be used as a public method if the server has enabled public signing.

This command requires the MultiSign amendment to be enabled.

See sign_for

account: str = <object object>

This field is required.

classmethod from_dict(value: Dict[str, Any])xrpl.models.requests.sign_for.SignFor

Construct a new SignFor from a dictionary of parameters.

Parameters

value – The value to construct the SignFor from.

Returns

A new SignFor object, constructed using the given parameters.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

key_type: Optional[xrpl.constants.CryptoAlgorithm] = None
method: xrpl.models.requests.request.RequestMethod = 'sign_for'
passphrase: Optional[str] = None
secret: Optional[str] = None
seed: Optional[str] = None
seed_hex: Optional[str] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a SignFor.

Returns

The dictionary representation of a SignFor.

transaction: xrpl.models.transactions.transaction.Transaction = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.StreamParameter(value)

Bases: str, enum.Enum

Represents possible values of the streams query param for subscribe.

CONSENSUS = 'consensus'
LEDGER = 'ledger'
MANIFESTS = 'manifests'
PEER_STATUS = 'peer_status'
SERVER = 'server'
TRANSACTIONS = 'transactions'
TRANSACTIONS_PROPOSED = 'transactions_proposed'
VALIDATIONS = 'validations'
class xrpl.models.requests.Submit(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The submit method applies a transaction and sends it to the network to be confirmed and included in future ledgers.

This command has two modes: * Submit-only mode takes a signed, serialized transaction as a binary blob, and submits it to the network as-is. Since signed transaction objects are immutable, no part of the transaction can be modified or automatically filled in after submission. * Sign-and-submit mode takes a JSON-formatted Transaction object, completes and signs the transaction in the same manner as the sign method, and then submits the signed transaction. We recommend only using this mode for testing and development.

To send a transaction as robustly as possible, you should construct and sign it in advance, persist it somewhere that you can access even after a power outage, then submit it as a tx_blob. After submission, monitor the network with the tx method command to see if the transaction was successfully applied; if a restart or other problem occurs, you can safely re-submit the tx_blob transaction: it won’t be applied twice since it has the same sequence number as the old transaction.

See submit

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: RequestMethod = 'submit'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.SubmitMultisigned(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The submit_multisigned command applies a multi-signed transaction and sends it to the network to be included in future ledgers. (You can also submit multi-signed transactions in binary form using the submit command in submit-only mode.)

This command requires the MultiSign amendment to be enabled.

See submit_multisigned

fail_hard: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'submit_multisigned'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

tx_json: xrpl.models.transactions.transaction.Transaction = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.SubmitOnly(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.submit.Submit

The submit method applies a transaction and sends it to the network to be confirmed and included in future ledgers.

This command has two modes: * Submit-only mode takes a signed, serialized transaction as a binary blob, and submits it to the network as-is. Since signed transaction objects are immutable, no part of the transaction can be modified or automatically filled in after submission. * Sign-and-submit mode takes a JSON-formatted Transaction object, completes and signs the transaction in the same manner as the sign method, and then submits the signed transaction. We recommend only using this mode for testing and development.

To send a transaction as robustly as possible, you should construct and sign it in advance, persist it somewhere that you can access even after a power outage, then submit it as a tx_blob. After submission, monitor the network with the tx method command to see if the transaction was successfully applied; if a restart or other problem occurs, you can safely re-submit the tx_blob transaction: it won’t be applied twice since it has the same sequence number as the old transaction.

See submit

fail_hard: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: RequestMethod = 'submit'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

tx_blob: str = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Subscribe(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The subscribe method requests periodic notifications from the server when certain events happen.

WebSocket API only.

See subscribe

accounts: Optional[List[str]] = None
accounts_proposed: Optional[List[str]] = None
books: Optional[List[xrpl.models.requests.subscribe.SubscribeBook]] = None
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'subscribe'
streams: Optional[List[xrpl.models.requests.subscribe.StreamParameter]] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

url: Optional[str] = None
url_password: Optional[str] = None
url_username: Optional[str] = None
validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.TransactionEntry(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The transaction_entry method retrieves information on a single transaction from a specific ledger version. (The tx method, by contrast, searches all ledgers for the specified transaction. We recommend using that method instead.)

See transaction_entry

classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

ledger_hash: Optional[str] = None
ledger_index: Optional[Union[str, int]] = None
method: xrpl.models.requests.request.RequestMethod = 'transaction_entry'
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

tx_hash: str = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Tx(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The tx method retrieves information on a single transaction.

See tx

binary: bool = False
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

max_ledger: Optional[int] = None
method: xrpl.models.requests.request.RequestMethod = 'tx'
min_ledger: Optional[int] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

transaction: str = <object object>

This field is required.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.

class xrpl.models.requests.Unsubscribe(*args: List[Any], **kwargs: Dict[str, Any])

Bases: xrpl.models.requests.request.Request

The unsubscribe command tells the server to stop sending messages for a particular subscription or set of subscriptions.

WebSocket API only.

See unsubscribe

accounts: Optional[List[str]] = None
accounts_proposed: Optional[List[str]] = None
books: Optional[List[xrpl.models.requests.unsubscribe.UnsubscribeBook]] = None
classmethod from_dict(value: Dict[str, Any])xrpl.models.base_model.BaseModel

Construct a new BaseModel from a dictionary of parameters.

Parameters

value – The value to construct the BaseModel from.

Returns

A new BaseModel object, constructed using the given parameters.

Raises

XRPLModelException – If the dictionary provided is invalid.

classmethod from_xrpl(value: Union[str, Dict[str, Any]])xrpl.models.base_model.BaseModel

Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.

Parameters

value – The dictionary or JSON string to be instantiated.

Returns

A BaseModel object instantiated from the input.

id: Optional[int] = None
classmethod is_dict_of_model(dictionary: Dict[str, Any])bool

Checks whether the provided dictionary is a dictionary representation of this class.

Note: This only checks the exact model, and does not count model inheritance. This method returns False if the dictionary represents a subclass of this class.

Parameters

dictionary – The dictionary to check.

Returns

True if dictionary is a dict representation of an instance of this class; False if not.

is_valid()bool

Returns whether this BaseModel is valid.

Returns

Whether this BaseModel is valid.

method: xrpl.models.requests.request.RequestMethod = 'unsubscribe'
streams: Optional[List[xrpl.models.requests.subscribe.StreamParameter]] = None
to_dict()Dict[str, Any]

Returns the dictionary representation of a Request.

Returns

The dictionary representation of a Request.

validate()None

Raises if this object is invalid.

Raises

XRPLModelException – if this object is invalid.