XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

[question] listen new ledgers #2646

Closed frankegoesdown closed 6 years ago

frankegoesdown commented 6 years ago

How can I listen new ledgers via json-rpc? I need to get notifies on new ledgers in blockchain

nbougalis commented 6 years ago

You should take a look at https://developers.ripple.com, which contains a lot of very useful information along with examples.

Of particular interest for you might be:

miguelportilla commented 6 years ago

This link documents the use of the subscribe RPC command. The following will notify you of new validated ledgers.

{ "command": "subscribe", "streams": ["ledger"] }

frankegoesdown commented 6 years ago

thanks a lot