Strict Send Paths Request Builder
Builds requests connected to strict send paths.
The strict send path finding endpoint lists the possible payment paths that can be taken starting with a specific source asset and amount. This is useful when you know how much you want to send and want to find out what destinations are reachable.
You must specify:
Source asset (what you're sending)
Source amount (how much you're sending)
Either a destination account OR a list of destination assets
Example usage:
val server = HorizonServer("https://horizon.stellar.org")
// Find paths sending 10 XLM to a specific account
val paths = server.strictSendPaths()
.sourceAsset("native")
.sourceAmount("10.0")
.destinationAccount("GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B")
.execute()
// Find paths sending 100 USD to accounts holding EUR or GBP
val paths2 = server.strictSendPaths()
.sourceAsset("credit_alphanum4", "USD", "ISSUER_ID")
.sourceAmount("100.0")
.destinationAssets(listOf(
Triple("credit_alphanum4", "EUR", "ISSUER_ID"),
Triple("credit_alphanum4", "GBP", "ISSUER_ID")
))
.execute()See also
Functions
Sets the cursor parameter for pagination.
Sets the destination account for the path search. Cannot be used together with destinationAssets().
Sets the list of destination assets for the path search. Cannot be used together with destinationAccount().
Build and execute request to get a page of paths.
Sets the limit parameter defining maximum number of paths to return.
Sets the order parameter defining the order in which to return paths.
Sets the source amount for the path search. This is the amount you want to send.
Sets the source asset for the path search. This is the asset you want to send.
Creates a Server-Sent Events (SSE) stream for this request. The stream will automatically reconnect on connection loss and resume from the last received event.