You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md
+15-31Lines changed: 15 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,8 @@ The request includes the following parameters:
59
59
|`destination_account`| String - [Address][]| Yes | The account to find a path to. (In other words, the account that would receive a payment.) |
60
60
|`destination_amount`|[Currency Amount][]| Yes | How much the destination account would receive. **Special case:** You can specify `"-1"` (for XRP) or provide -1 as the contents of the `value` field (for tokens). This requests a path to deliver as much as possible, while spending no more than the amount specified in `send_max` (if provided). |
61
61
|`domain`| String - [Hash][]| No | The ledger entry ID of a permissioned domain. If provided, only return paths that use the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md). {% amendment-disclaimer name="PermissionedDEX" /%} |
62
-
| `paths` | Array | No | Array of arrays of objects, representing [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to check.
63
-
|`send_max`|[Currency Amount][]| No | Maximum amount that would be spent. Not compatible with `source_currencies`. |
64
-
You can use this to keep updated on changes to particular paths you already know about, or to check the overall cost to make a payment along a certain path. |
62
+
|`paths`| Array | No | Array of arrays of objects, representing [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to check. You can use this to keep updated on changes to particular paths you already know about, or to check the overall cost to make a payment along a certain path. |
63
+
|`send_max`|[Currency Amount][]| No | Maximum amount that would be spent. Not compatible with `source_currencies`. |
65
64
66
65
The server also recognizes the following fields, but the results of using them are not guaranteed: `source_currencies`, `bridges`. These fields should be considered reserved for future use.
67
66
@@ -79,21 +78,21 @@ An example of a successful response:
79
78
80
79
The initial response follows the [standard format](../../api-conventions/response-formatting.md), with a successful result containing the following fields:
|`alternatives`| Array | Array of objects with suggested [paths](../../../../concepts/tokens/fungible-tokens/paths.md) to take, as described below. If empty, then no paths were found connecting the source and destination accounts. |
85
-
|`destination_account`| String | Unique address of the account that would receive a transaction. |
86
-
|`destination_amount`|String or Object |[Currency Amount][]that the destination would receive in a transaction. |
87
-
|`source_account`| String | Unique address that would send a transaction. |
88
-
|`full_reply`| Boolean | If `false`, this is the result of an incomplete search. A later reply may have a better path. If `true`, then this is the best path found. (It is still theoretically possible that a better path could exist, but `rippled` won't find it.) Until you close the pathfinding request, `rippled` continues to send updates each time a new ledger closes. |
|`alternatives`| Array | Array of objects with suggested [paths](../../../../concepts/tokens/fungible-tokens/paths.md) to take, as described below. If empty, then no paths were found connecting the source and destination accounts. |
84
+
|`destination_account`| String - [Address][]| The account that would receive a transaction. |
85
+
|`destination_amount`|[Currency Amount][]| How much the destination would receive in a transaction. |
86
+
|`source_account`| String - [Address][]| The account that would send a transaction. |
87
+
|`full_reply`| Boolean | If `false`, this is the result of an incomplete search. A later reply may have a better path. If `true`, then this is the best path found. (It is still theoretically possible that a better path could exist, but `rippled` won't find it.) Until you close the pathfinding request, `rippled` continues to send updates each time a new ledger closes. |
89
88
90
89
Each element in the `alternatives` array is an object that represents a path from one possible source currency (held by the initiating account) to the destination account and currency. This object has the following fields:
|`paths_computed`| Array | Array of arrays of objects defining [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md)|
95
-
|`source_amount`|String or Object |[Currency Amount][]that the source would have to send along this path for the destination to receive the desired amount. |
96
-
|`destination_amount`|String or Object |_(May be omitted)_[Currency Amount][] that the destination would receive along this path. Only included if the `destination_amount` from the request was the "-1" special case. |
|`paths_computed`| Array | Array of arrays of objects defining [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md)|
94
+
|`source_amount`|[Currency Amount][]| How much the source would have to send along this path for the destination to receive the desired amount. |
95
+
|`destination_amount`|[Currency Amount][]|_(May be omitted)_How much the destination would receive along this path. Only included if the `destination_amount` from the request was the "-1" special case. |
97
96
98
97
### Possible Errors
99
98
@@ -112,22 +111,7 @@ Here is an example of an asynchronous follow-up from a path_find create request:
112
111
{% tabs %}
113
112
114
113
{% tab label="WebSocket" %}
115
-
```json
116
-
{
117
-
"id": 1,
118
-
"type": "path_find",
119
-
"alternatives": [
120
-
/* paths omitted from this example; same format as the initial response */
0 commit comments