XRP Ledger
Available Endpoints:
Click on the endpoint to jump to the section with full details
/getbalance
GET
- Get the balance or number of the given token in the requested public address./getblock
GET
- Get details of a block(ledger)./getgasprice
GET
- Get the current gas price from the XRPL./gettransaction
GET
- Get details of a specified transaction./portfolio
GET
- Get comprehensive information about the assets/ tokens a user owns, including their name, balance, symbol, address, and their equivalent USD price./getusertransactions
GET
- Get the historical transaction details for a specific user address./getlatestledger
GET
- Get details for the current latest known ledger of the node./sendtransaction
POST
- Submit a signed transaction to XRPL for processing./createaccount
POST
- Initiates a transaction to fund a newly created account 10 XRP using the public key as the account ID./decodetransaction
POST
- Get the decoded transaction(sender, recipient, gas limit, method signature, and more) for the provided raw transaction.
Also, see Error Handling Details
DEX IDs
Please use Chain ID 1600 for the XRP Ledger Mainnet and 1601 for the XRP Ledger Testnet See the Chain ID for a complete list of DEX IDs.
Endpoint Details
/getbalance
Get the balance or number of the given token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
address* | String | The public address to get the balance of. |
issuer | String | The public address of the issuer. |
assetCode | String | The code of asset to get the balance of. *Required, if issuer address is provided. |
/getblock
Get details of a block(ledger).
GET
https://historicallp.api.expand.network/chain/getblock
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
blockNumber* | String | Sequence number of the ledger. |
/getgasprice
Get the current gas price from the XRPL.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
/gettransaction
Get details of a specified transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
transactionHash* | String | The transaction hash. |
/portfolio
Get the comprehensive information about the assets/ tokens owned by a user, including their name, balance, symbol, address, and their equivalent USD price.
GET
https://api.expand.network/chain/portfolio
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
address* | String | Public addess of the user. |
assetType | String |
|
availableOnly | Boolean | By default, false. If true, tokens with balance > 0 will be listed. |
/getusertransactions
Get the historical transaction details for a specific user address.
GET
https://historicallp.api.expand.network/chain/getusertransactions
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
address* | String | The public address of the user. |
pageToken | String | A string ID that points to a specific location in a collection of responses, present at the end of the response. |
sortOrder | String | The transaction sorting order. asc or desc. By default, desc. |
/getlatestledger
Get details for the current latest known ledger of the node.
GET
https://api.expand.network/chain/getlatestledger
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
/sendtransaction
Submit a signed transaction to XRPL for processing.
POST
https://api.expand.network/chain/sendtransaction
Request Body
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
rawTransaction* | String | The signed transaction to broadcast for inclusion in a ledger, serialized as a base64 string. |
/createaccount
Initiates a transaction to fund a newly created account 10 XRP using the public key as the account ID.
POST
https://api.expand.network/chain/createaccount
Request body
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
chainId* | String | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
from* | String | Public address of the sender who funds the account. |
to* | String | Public address of the recipient who will get funded. |
destinationTag | String |
/decodetransaction
Get the decoded transaction(sender, recipient, gas limit, method signature, and more) for the provided raw transaction.
POST
https://api.expand.network/chain/decodetransaction
Request Body
Name | Type | Description |
---|---|---|
chainId* | String | Refer to the Chain ID page for details. By default, Ethereum. |
chainSymbol | String | Refer to the Chain ID page for details. |
rawTransaction* | String | A signed XRPL transaction, serialized as a base64 string. |
Error Handling Details
Error | Description |
---|---|
400 (Bad Request) | Indicates the request is invalid or missing the required parameters. The msg field will contain details about the error. |
401 (Unauthorised) | Indicates the request lacks valid authentication credentials (API key). Ensure that you provide a valid API key in the request headers. |
404 (Not Found) | Indicates that the specified endpoint or resource does not exist. |
500 (Server Error) | Indicates an internal server error. |
Last updated