Jump to content

XRP JSON-RPC Batch Request


Recommended Posts

I would like to get multiple transaction details with a single API call. Using the documentation at: https://xrpl.org/tx.html, I managed to get the details for a single transaction.

As stated in the JSON-RPC docs it should be (but it doesn't have to be) possible to make a batch request. I would like to send multiple transaction hashes with 1 API call.

An example curl command for 1 transaction would be:

curl http://s1.ripple.com:51234/ -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"tx","params":[{"transaction": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9","binary": false}],"id":1}'

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 10/13/2021 at 12:56 PM, Patroklos said:

As stated in the JSON-RPC docs it should be (but it doesn't have to be) possible to make a batch request.

Where are batch requests for JSON-RPC methods of rippled mentioned? I personally don't see the advantage by the way, what do you expect to gain from requesting several transactions in one API call instead of e.g. calling out to several servers at once?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.