skip to navigation
skip to content

grapple 0.1.2

Ripple ledger extractor

Latest Version: 0.2.2

Download the Ripple ledger from rippled.

Grapple extracts the ledger from rippled via websocket. It starts at the current ledger index, and walks backwards until it reaches the genesis ledger. The genesis ledger index is set by default to 152370, but is adjustable.

Grapple can collect data from a local or remote rippled instance. If you have a local rippled instance running that has downloaded all or most of the ledger, I strongly recommend doing local data collection. Fetching data from Ripple’s public websocket is very slow!

Also resamples the transaction time series to create “Open-Hi-Lo-Close” data, which can be useful for statistical tests, or simply for drawing charts.


The easiest way to install Grapple is using pip:

pip install grapple

Grapple is designed to integrate with PostgreSQL, using connection information in By default, it assumes that your database is located on localhost (, and that your database username, password, and password are all “grapple”.

(While this is certainly not the most secure setup, it may be convenient for people who install Grapple via pip, and do not wish to edit its source code.)


Grapple can be used as a Python module:

from grapple import Grapple

grapple = Grapple()

The Grapple constructor accepts the following keyword arguments:

socket_url (str):
rippled websocket URL (default=”ws://”)
full (bool):
True if downloading the full ledger (starting from the current ledger and walking back to the genesis ledger). False if the download should stop at the last current ledger (i.e., the last time grapple was run). (default=True)
genesis (int):
Genesis block index. If full=True, this is where the download ends; otherwise, this value is ignored. (default=152370)
quiet (bool):
If True, suppress console output. (default=True)
resampling_frequencies (tuple):
Resampling frequencies, using pandas frequency codes. If None, then resampling is disabled. (default=(‘D’,) or daily)

It can also be run as a script:

python [-flags]

Optional flags:

-w, --websocket [websocket url]:
    Specify the rippled websocket url. (default=ws://

-p, --public:
    Use Ripple Labs' public websocket, wss://

-f, --full:
    Download the full Ripple ledger.  Automatic on your first run.

-g, --genesis [ledger index]:
    Halting point for full downloads; ignored for partial downloads.

-q, --quiet:
    Suppress command line output.

Copyright 2014, Dyffy Inc. License: MIT

File Type Py Version Uploaded on Size
grapple-0.1.2.tar.gz (md5) Source 2014-08-30 8KB
  • Downloads (All Versions):
  • 7 downloads in the last day
  • 108 downloads in the last week
  • 466 downloads in the last month