XRPL.PathOrderbook (xrpl v1.0.0)

XRPL.PathOrderbook is a module to interact with orderbook modules on the XRP Ledger.

Paths define a way for payments to flow through intermediary steps on their way from sender to receiver. Paths enable cross-currency payments by connecting sender and receiver through order books. Use these methods to work with paths and other books.

Official RPC documentation https://xrpl.org/path-and-order-book-methods.html

Summary

Functions

The amm_info method retrieves information about an Automated Market Maker (AMM) account.

The book_offers method retrieves a list of Offers between two currencies, also known as an order book. The response omits unfunded Offers and reports how much of each remaining Offer's total is currently funded.

Builds a changeset from the schema and params.

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.

The nft_buy_offers method returns a list of buy offers for a given NFToken object.

The nft_sell_offers method returns a list of sell offers for a given NFToken object.

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.

Returns the validated parameters or an error changeset.

Returns the validated parameters or an error changeset. Expects a schema to be defined with defparams.

Functions

Link to this function

amm_info(params)

The amm_info method retrieves information about an Automated Market Maker (AMM) account.

Official documentation: https://xrpl.org/amm_info.html

Link to this function

amm_info!(params)

Link to this function

book_offers(params)

The book_offers method retrieves a list of Offers between two currencies, also known as an order book. The response omits unfunded Offers and reports how much of each remaining Offer's total is currently funded.

Official documentation: https://xrpl.org/book_offers.html

Link to this function

book_offers!(params)

Link to this function

changeset(name, params \\ %{}, opts \\ [])

Builds a changeset from the schema and params.

Link to this function

deposit_authorized(params)

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.

Official documentation: https://xrpl.org/deposit_authorized.html

Link to this function

deposit_authorized!(params)

Link to this function

nft_buy_offers(params)

The nft_buy_offers method returns a list of buy offers for a given NFToken object.

Official documentation: https://xrpl.org/nft_buy_offers.html

Link to this function

nft_buy_offers!(params)

Link to this function

nft_sell_offers(params)

The nft_sell_offers method returns a list of sell offers for a given NFToken object.

Official documentation: https://xrpl.org/nft_sell_offers.html

Link to this function

nft_sell_offers!(params)

Link to this function

ripple_path_find(params)

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.

Official documentation: https://xrpl.org/ripple_path_find.html

Link to this function

ripple_path_find!(params)

Link to this function

validate(changeset)

@spec validate(changeset()) :: {:ok, params()} | {:error, changeset()}

Returns the validated parameters or an error changeset.

Link to this function

validate(name, params \\ %{}, opts \\ [])

@spec validate(name(), params(), opts()) :: {:ok, params()} | {:error, changeset()}

Returns the validated parameters or an error changeset. Expects a schema to be defined with defparams.

Link to this function

xrpl(method, params)

Link to this function

xrpl(method, validator, params)