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).
/portfolio GET
- Get comprehensive information about the assets/ tokens a user owns, including their name, balance, symbol, address, and their equivalent USD price.
/getlatestledger GET
- Get details for the current latest known ledger of the node.
/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
Chain 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
Remote procedural call URL
The public address to get the balance of.
The public address of the issuer.
The code of asset to get the balance of.
* Required, if issuer address is provided.
Sample Request Sample Response
Copy https://api.expand.network/chain/getbalance?chainId=1600&address=rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6&assetCode=USD&issuer=rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"assetCode" : "USD" ,
"issuer" : "rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1" ,
"balance" : "409832045505"
}
}
back to top
/getblock
Get details of a block(ledger).
GET
https://historicallp.api.expand.network/chain/getblock
Query Parameters
Remote procedural call URL.
Sequence number of the ledger.
Sample Request Sample Response
Copy https://historicallp.api.expand.network/chain/getblock?chainId=1600&blockNumber=89475323
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"difficulty" : null ,
"gasLimit" : null ,
"gasUsed" : null ,
"hash" : "CD0165E3895A50A6BF7B663BEBFA2F4D71B74877576B9E5E98F4952128CA0685" ,
"miner" : null ,
"nonce" : null ,
"number" : 89475323 ,
"parentHash" : "2F5640ABEADEF6D6CDBB37744579C917505B25BB6818A0B547DC1192C6725CDF" ,
"size" : null ,
"timestamp" : "774725511" ,
"totalDifficulty" : null ,
"transactions" : [
{
"Account" : "rL72YxzbBv43isRYakrfTUzCaGbg4pWbs4" ,
"Amount" : "43" ,
"DeliverMax" : "43" ,
"Destination" : "rHcXrn8joXL2Qe7BaMnhB5VRuj1XKEmUW6" ,
"DestinationTag" : 2760758033 ,
"Fee" : "10" ,
"Sequence" : 89271357 ,
"SigningPubKey" : "ED0026C5C2EB6FB2048A960ACDF73695F316B7BAE0DFD999D24C0A2075F7A73037" ,
"TransactionType" : "Payment" ,
"TxnSignature" : "8958A0BE36F878C94C02A658647A0E5AA81E32CB1986CC967F1FB1F6728B26DC347D973CABB5EF49D7DFDADC24ABD83ECE116E8206F6DE943ECF945168265C05" ,
"hash" : "01452A92792C71FD3E3ACC9F024535F777FF2D85B607AA7A924E9E13A25CF50E" ,
"metaData" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rHcXrn8joXL2Qe7BaMnhB5VRuj1XKEmUW6" ,
"Balance" : "1059808075" ,
"Flags" : 0 ,
"OwnerCount" : 0 ,
"Sequence" : 73560948
} ,
"LedgerEntryType" : "AccountRoot" ,
"LedgerIndex" : "9EDF161DF605EA574DEE5E5B8FEB76315736D7FB038D5586A85575D64F8F8F43" ,
"PreviousFields" : {
"Balance" : "1059808032"
} ,
"PreviousTxnID" : "2F429C147463DA4DFA7FD5894D990BD0E654AA6B04F01052FCF29EDF77C6B6D8" ,
"PreviousTxnLgrSeq" : 89475323
}
} ,
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rL72YxzbBv43isRYakrfTUzCaGbg4pWbs4" ,
"Balance" : "63645870" ,
"Flags" : 0 ,
"OwnerCount" : 0 ,
"Sequence" : 89271358
} ,
"LedgerEntryType" : "AccountRoot" ,
"LedgerIndex" : "AC35635B8AEDC6378ADFAFBE2F3386D42D04CBFD651E7CB4687BEB9008427C12" ,
"PreviousFields" : {
"Balance" : "63645923" ,
"Sequence" : 89271357
} ,
"PreviousTxnID" : "04A00FE6A74C89BB96CE3FEEDB25DB7AAA20EAFFE2C5771B881B527546673C9A" ,
"PreviousTxnLgrSeq" : 89475323
}
}
] ,
"TransactionIndex" : 52 ,
"TransactionResult" : "tesSUCCESS" ,
"delivered_amount" : "43"
}
}
] ,
"transactionsRoot" : null ,
"uncles" : null
}
}
back to top
/getgasprice
Get the current gas price from the XRPL.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network/chain/getgasprice?chainId=1600
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"gasPrice" : "10"
}
}
back to top
/gettransaction
Get details of a specified transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network/chain/gettransaction?chainId=1600&transactionHash=478061849940F06D822BF28A0D3FF6EE9832729E79DDD10C05967FB0C86B3C5E
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"hash" : "478061849940F06D822BF28A0D3FF6EE9832729E79DDD10C05967FB0C86B3C5E" ,
"transactionStatus" : true ,
"blockNumber" : "89475741" ,
"timestamp" : "774727140" ,
"from" : "rs3RZsga1KbhSZetRsL22pkTyWyFU86Kkf" ,
"to" : "rEzdn46Gjxh8YJNAZrmMUsFh1QDfT8uuTs" ,
"value" : "44" ,
"transactionFees" : "10" ,
"transactionType" : "Payment" ,
"gas" : null ,
"gasPrice" : null ,
"input" : null ,
"nonce" : 89345903 ,
"network" : null ,
"meta" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rs3RZsga1KbhSZetRsL22pkTyWyFU86Kkf" ,
"Balance" : "60430731" ,
"Flags" : 0 ,
"OwnerCount" : 0 ,
"Sequence" : 89345904
} ,
"LedgerEntryType" : "AccountRoot" ,
"LedgerIndex" : "054427CEEE4A008A9E92FC26DEEDB5FEAE6F915D5FD7836B047335C6A20AE7FA" ,
"PreviousFields" : {
"Balance" : "60430785" ,
"Sequence" : 89345903
} ,
"PreviousTxnID" : "2AB13EC6BFA96520B054617121413CB88BF4752E05DEE555F71A1766910368BC" ,
"PreviousTxnLgrSeq" : 89475740
}
} ,
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rEzdn46Gjxh8YJNAZrmMUsFh1QDfT8uuTs" ,
"Balance" : "366727618" ,
"Flags" : 0 ,
"OwnerCount" : 0 ,
"Sequence" : 89221292
} ,
"LedgerEntryType" : "AccountRoot" ,
"LedgerIndex" : "51C728407B1A8B3037D6B40ADB49013ABD9F62FB12ED8981D6575C722A176EB1" ,
"PreviousFields" : {
"Balance" : "366727574"
} ,
"PreviousTxnID" : "AAB53A2D2CA8953EA6C6A21BE1C0F2CB14D7E5302262699134BBCA38656BEEF4" ,
"PreviousTxnLgrSeq" : 89475740
}
}
] ,
"TransactionIndex" : 0 ,
"TransactionResult" : "tesSUCCESS" ,
"delivered_amount" : "44"
} ,
"TxnSignature" : "367F6D98E2EE0F9901C2A0FA494AEDCDB6D83F0744BB32D39E9BAF526DA42DAB72D73294EA57BB098032D37495A06B6ED0546C7342F738EC3814077799B2820B"
}
}
back to top
/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
Remote procedural call URL.
Public addess of the user.
fungible
/nonFungible
standard choice. By default, all
.
By default, false.
If true, tokens with balance > 0 will be listed.
Sample Request Sample Response
Copy https://api.expand.network/chain/chain/portfolio?chainId=1600&address=rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6&assetType=fungible&availableOnly=true
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"native" : "991378078" ,
"assets" : [
{
"assetCode" : "BTC" ,
"issuer" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" ,
"balance" : "818138018" ,
"assetType" : "fungible"
}
]
}
}
back to top
/getusertransactions
Get the historical transaction details for a specific user address.
GET
https://historicallp.api.expand.network/chain/getusertransactions
Query Parameters
Remote procedural call URL.
The public address of the user.
A string ID that points to a specific location in a collection of responses, present at the end of the response.
The transaction sorting order.
asc or desc.
By default, desc.
Sample Request Sample Response
Copy https://historicallp.api.expand.network/chain/getusertransactions?chainId=1600&address=r3KFdr7FTU1hxo9DbS1h65Wq8MXG7e9cgK&pageToken=89465257:45&sortOrder=asc
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"transactions" : [
{
"hash" : "81DD457F8A93F5461595C783B3E2CF096D37FA61BEA5586237F6793640E1CCD3" ,
"transactionStatus" : false ,
"blockNumber" : "89406864" ,
"timestamp" : "774458731" ,
"from" : "rXSYHuUUrFsk8CABEf6PtrYwFWoAfUMrK" ,
"to" : "r3KFdr7FTU1hxo9DbS1h65Wq8MXG7e9cgK" ,
"value" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rhUHDGG5po5Dg6oxtaodMPTR4xytToSL1Y" ,
"value" : "0.139436"
} ,
"transactionFees" : "20" ,
"transactionType" : "Payment" ,
"gas" : null ,
"gasPrice" : null ,
"input" : null ,
"nonce" : 83654435 ,
"network" : null ,
"meta" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Balance" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji" ,
"value" : "-10.03493459156791"
} ,
"Flags" : 2228224 ,
"HighLimit" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "r3KFdr7FTU1hxo9DbS1h65Wq8MXG7e9cgK" ,
"value" : "10937302.217631"
} ,
"HighNode" : "3" ,
"LowLimit" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rhUHDGG5po5Dg6oxtaodMPTR4xytToSL1Y" ,
"value" : "0"
} ,
"LowNode" : "9"
} ,
"LedgerEntryType" : "RippleState" ,
"LedgerIndex" : "4F75D88429A8A5B3007291D2B0DBA5F0344C4F5BD1202C79A194A338F322A353" ,
"PreviousFields" : {
"Balance" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji" ,
"value" : "-9.89549859156791"
}
} ,
"PreviousTxnID" : "A2B4708FB335E089F9C8FE00CE75B8DB0357982EF781C7BAA37929A191C8031B" ,
"PreviousTxnLgrSeq" : 89406849
}
} ,
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rXSYHuUUrFsk8CABEf6PtrYwFWoAfUMrK" ,
"Balance" : "103760378" ,
"Flags" : 0 ,
"OwnerCount" : 5 ,
"Sequence" : 83654436
} ,
"LedgerEntryType" : "AccountRoot" ,
"LedgerIndex" : "8A884B57E13846DA2275DDC4EEA6ED8838E436225799CA5F0FE77F16739BFF85" ,
"PreviousFields" : {
"Balance" : "103760398" ,
"Sequence" : 83654435
} ,
"PreviousTxnID" : "71692EBA11C73E8D6175E32901E51CBC781BC5A7BA080DFE7160CD99CCE54739" ,
"PreviousTxnLgrSeq" : 89406863
}
} ,
{
"ModifiedNode" : {
"FinalFields" : {
"Balance" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji" ,
"value" : "1611629.0842435"
} ,
"Flags" : 1114112 ,
"HighLimit" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rhUHDGG5po5Dg6oxtaodMPTR4xytToSL1Y" ,
"value" : "0"
} ,
"HighNode" : "3" ,
"LowLimit" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rXSYHuUUrFsk8CABEf6PtrYwFWoAfUMrK" ,
"value" : "18053707.5234989"
} ,
"LowNode" : "0"
} ,
"LedgerEntryType" : "RippleState" ,
"LedgerIndex" : "8AFBB525423C5467E47BF8FD594283D46F9881EA9054413B99B341E48F65D4E2" ,
"PreviousFields" : {
"Balance" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji" ,
"value" : "1611629.2933975"
}
} ,
"PreviousTxnID" : "71692EBA11C73E8D6175E32901E51CBC781BC5A7BA080DFE7160CD99CCE54739" ,
"PreviousTxnLgrSeq" : 89406863
}
}
] ,
"TransactionIndex" : 48 ,
"TransactionResult" : "tesSUCCESS" ,
"delivered_amount" : {
"currency" : "457665724275726E000000000000000000000000" ,
"issuer" : "rhUHDGG5po5Dg6oxtaodMPTR4xytToSL1Y" ,
"value" : "0.139436"
}
} ,
"memos" : [
{
"Memo" : {
"MemoData" : "4578747261204661726D696E67207265776172642066726F6D204D61676E6574696320666F722070726F766964696E67206C697175696469747920746F20746865204D41475F585250202B20457665724275726E5F58525020706F6F6C73"
}
}
] ,
"TxnSignature" : "3045022100C0076774DFC94F5F019AF7AF53BD9D386653B0E4CAEC614F9311E64ED75B09D102203AFA6C2B2EA3C969959C95A1BE11779D0B6A407A3DE6383019DDBE3A8F7B1728"
}
] ,
"nextPageToken" : "89406849:89"
}
}
back to top
/getlatestledger
Get details for the current latest known ledger of the node.
GET
https://api.expand.network/chain/getlatestledger
Query Parameters
Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network/chain/getlatestledger?chainId=1600
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"difficulty" : null ,
"gasLimit" : null ,
"gasUsed" : null ,
"miner" : null ,
"nonce" : null ,
"number" : "89515194" ,
"parentHash" : "CA7174CA0D0D6D8250C95B07B525BF543B9FDF63CB1405B8DBA36FB38A306E0C" ,
"size" : null ,
"timestamp" : null ,
"totalDifficulty" : null ,
"transactions" : [
{
"Account" : "rBTwLga3i2gz3doX6Gva3MgEV8ZCD8jjah" ,
"Fee" : "20" ,
"Flags" : 0 ,
"LastLedgerSequence" : 89515196 ,
"OfferSequence" : 145028949 ,
"Sequence" : 145028958 ,
"SigningPubKey" : "0253C1DFDCF898FE85F16B71CCE80A5739F7223D54CC9EBA4749616593470298C5" ,
"TakerGets" : "36570000000" ,
"TakerPays" : {
"currency" : "USD" ,
"issuer" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" ,
"value" : "21693.50385126"
} ,
"TransactionType" : "OfferCreate" ,
"TxnSignature" : "3044022055CE8A031FC49FFDA2D329FB5523EDD6893C1E969CC84BD27D6336DB31D5086202206152BED621E4013E2C49CEC62FA9E01964E0426B93E936D121D7A1D77E9997D1" ,
"hash" : "044A0DFED659DF5D310726ED07D83BD53AD83DFA6ADD22336BF01EF1DF52977F"
}
] ,
"transactionsRoot" : null ,
"uncles" : null
}
}
back to top
/sendtransaction
Submit a signed transaction to XRPL for processing.
POST
https://api.expand.network/chain/sendtransaction
Request Body
Remote procedural call URL.
The signed transaction to broadcast for inclusion in a ledger, serialized as a base64 string.
Sample Request Sample Response
Copy {
"chainId" : "1600" ,
"rawTransaction": "12000022000000002405594454201B055945D261400000000000271068400000000000000C73210330A70B8D820332240B97477520296FD5A8F2E531B17DF54C6DE13F8737012E8374473045022100C32E02C67EEA80379EFBCF450E5BB66F62122B57D0F91F0694F5D5BE840D738802202536AAC1568EAE56BD2F04B8822E580D325C367468455B2475C81F4F3D08B4018114A682E02A8BDB803AB509F3BE5D384841A7227CE583149901A6A96D83F029FB8BCF116527AD19A6EEA803"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1600" ,
"transactionHash" : "CE0EE218F817D29472CEBA606A4C532EC8C04452EFA7D9E30E9639BF018597D9"
}
}
back to top
/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
Remote procedural call URL.
Public address of the sender who funds the account.
Public address of the recipient who will get funded.
Sample Request Sample Response
Copy {
"chainId" : "1600" ,
"from" : "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6" ,
"to" : "rBTwLga3i2gz3doX6Gva3MgEV8ZCD8jjah"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1600" ,
"from" : "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6" ,
"to" : "rBTwLga3i2gz3doX6Gva3MgEV8ZCD8jjah" ,
"fee" : "12" ,
"data" : "eyJUcmFuc2FjdGlvblR5cGUiOiJQYXltZW50IiwiQWNjb3VudCI6InJvZ3VlNUhuUFJTc3pEOUNXR1NVejhVR0hNVndTU0tGNiIsIkFtb3VudCI6IjEwMDAwMDAwIiwiRGVzdGluYXRpb24iOiJyQlR3TGdhM2kyZ3ozZG9YNkd2YTNNZ0VWOFpDRDhqamFoIiwiRmxhZ3MiOjAsIkZlZSI6IjEyIiwiU2VxdWVuY2UiOjU1MDA5MDAsIkxhc3RMZWRnZXJTZXF1ZW5jZSI6ODk1MTgwMjF9" ,
"referenceId" : "11a8db27d6a3411c8ab18abf27375699"
}
}
back to top
/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
A signed XRPL transaction, serialized as a base64 string.
Sample Request Sample Response
Copy {
"chainId" : "1600" ,
"rawTransaction": "12000022000000002405594454201B055945D261400000000000271068400000000000000C73210330A70B8D820332240B97477520296FD5A8F2E531B17DF54C6DE13F8737012E8374473045022100C32E02C67EEA80379EFBCF450E5BB66F62122B57D0F91F0694F5D5BE840D738802202536AAC1568EAE56BD2F04B8822E580D325C367468455B2475C81F4F3D08B4018114A682E02A8BDB803AB509F3BE5D384841A7227CE583149901A6A96D83F029FB8BCF116527AD19A6EEA803"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"TransactionType" : "Payment" ,
"Flags" : 0 ,
"Sequence" : 89736276 ,
"LastLedgerSequence" : 89736658 ,
"Amount" : "10000" ,
"Fee" : "12" ,
"SigningPubKey" : "0330A70B8D820332240B97477520296FD5A8F2E531B17DF54C6DE13F8737012E83" ,
"TxnSignature" : "3045022100C32E02C67EEA80379EFBCF450E5BB66F62122B57D0F91F0694F5D5BE840D738802202536AAC1568EAE56BD2F04B8822E580D325C367468455B2475C81F4F3D08B401" ,
"Account" : "rGBRxEf5GAZyLwHUXvspivv8JNejp58QyN" ,
"Destination" : "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AV"
}
}
back to top
Error Handling Details
Indicates the request is invalid or missing the required parameters. The msg field will contain details about the error.
Indicates the request lacks valid authentication credentials (API key). Ensure that you provide a valid API key in the request headers.
Indicates that the specified endpoint or resource does not exist.
Indicates an internal server error.
back to top