The HCNet allows payments to be made across assets through path payments. A path payment specifies a series of assets to route a payment through, from source asset (the asset debited from the payer) to destination asset (the asset credited to the payee).
A path search is specified using:
As part of the search, aurora will load a list of assets available to the source account id and will find any payment paths from those source assets to the desired destination asset. The search’s amount parameter will be used to determine if there a given path can satisfy a payment of the desired amount.
GET /paths?destination_account={da}&source_account={sa}&destination_asset_type={at}&destination_asset_code={ac}&destination_asset_issuer={di}&destination_amount={amount}
Arguments
Name | Notes | Description | Example |
---|---|---|---|
?destination_account | string | The destination account that any returned path should use | GAEDTJ4PPEFVW5XV2S7LUXBEHNQMX5Q2GM562RJGOQG7GVCE5H3HIB4V |
?destination_asset_type | string | The type of the destination asset | credit_alphanum4 |
?destination_asset_code | string | The destination asset code, if destination_asset_type is not “native” | USD |
?destination_asset_issuer | string | The issuer for the destination, if destination_asset_type is not “native” | GAEDTJ4PPEFVW5XV2S7LUXBEHNQMX5Q2GM562RJGOQG7GVCE5H3HIB4V |
?destination_amount | string | The amount, denominated in the destination asset, that any returned path should be able to satisfy | 10.1 |
?source_account | string | The sender’s account id. Any returned path must use a source that the sender can hold | GARSFJNXJIHO6ULUBK3DBYKVSIZE7SC72S5DYBCHU7DKL22UXKVD7MXP |
Response
This endpoint responds with a page of path resources. See path resource for reference.
{
"bids" : [
"price_r" : {
"n" : 100000000,
"d" : 12953367
},
"price" : "7.7200005",
"amount" : "12.0000000"
}
],
"asks" : [
"price_r" : {
"n" : 194,
"d" : 25
},
"price" : "7.7600000",
"amount" : "238.4804125"
}
],
"base" : {
"asset_type" : "native"
},
"counter" : {
"asset_type" : "credit_alphanum4",
"asset_code" : "FOO",
"asset_issuer" : "GBAUUA74H4XOQYRSOW2RZUA4QL5PB37U3JS5NE3RTB2ELJVMIF5RLMAG"
}
}
Support Agent
*Powered by HashCash