npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rippled-historical-database

v2.1.0

Published

SQL database storing historical data from Rippled.

Downloads

4

Readme

Circle CI

Ripple Data API v2

The Ripple Data API v2 provides access to information about changes in the Ripple Consensus Ledger, including transaction history and processed analytical data. This information is stored in a database for easy access, which frees rippled servers to maintain fewer historical ledger versions. Additionally, the Data API v2 acts as data source for applications such as Ripple Charts and ripple.com.

Ripple provides a live instance of the Data API with as complete a transaction record as possible at the following address:

https://data.ripple.com

More Information

The Ripple Data API v2 replaces the Historical Database v1 and the Charts API.

API Method Reference

The Data API v2 provides a REST API with the following methods:

General Methods:

Account Methods:

Health Checks:

Get Ledger

[Source]

Retrieve a specific Ledger by hash, index, date, or latest validated.

Request Format

REST

GET /v2/ledgers/{:identifier}

Try it! >

The following URL parameters are required by this API endpoint:

| Field | Value | Description | |-------|-------|-------------| | ledger_identifier | Ledger [Hash][], [Ledger Index][], or [Timestamp][] | (Optional) An identifier for the ledger to retrieve: either the full hash in hex, an integer sequence number, or a date-time. If a date-time is provided, retrieve the ledger that was most recently closed at that time. If omitted, retrieve the latest validated ledger. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |-------|-------|-------------| | transactions | Boolean | If true, include the identifying hashes of all transactions that are part of this ledger. | | binary | Boolean | If true, include all transactions from this ledger as hex-formatted binary data. (If provided, overrides transactions.) | | expand | Boolean | If true, include all transactions from this ledger as nested JSON objects. (If provided, overrides binary and transactions.) |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | ledger | Ledger object | The requested ledger |

Example

Request:

GET /v2/ledgers/3170DA37CE2B7F045F889594CBC323D88686D2E90E8FFD2BBCD9BAD12E416DB5

Response:

200 OK
{
    "result": "success",
    "ledger": {
        "ledger_hash": "3170da37ce2b7f045f889594cbc323d88686d2e90e8ffd2bbcd9bad12e416db5",
        "ledger_index": 8317037,
        "parent_hash": "aff6e04f07f441abc6b4133f8c50c65935b817a85b895f06dba098b3fbc1be90",
        "total_coins": 99999980165594400,
        "close_time_res": 10,
        "accounts_hash": "8ad73e49a34d8b9c31bc13b8a97c56981e45ee70225ef4892e8b198fec5a1f7d",
        "transactions_hash": "33e0b9c5fd7766343e67854aed4222f5ed9c9507e0ec0d7ae7d54d0f17adb98e",
        "close_time": 1408047740,
        "close_time_human": "2014-08-14T20:22:20+00:00"
    }
}

Get Ledger Validations

[Source]

Retrieve a any validations recorded for a specific ledger hash. This dataset includes ledgers that are outside the main ledger chain, and only includes data that we have recorded. As such, some ledgers may have no validations even though they were validated by consensus.

Request Format

REST

GET /v2/ledgers/{:ledger_hash}/validations

Try it! >

The following URL parameters are required by this API endpoint:

| Field | Value | Description | |-------|-------|-------------| | ledger_hash | [Hash][] | Ledger hash to retrieve validations for. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |-------|-------|-------------| | limit | Integer | Max results per page (defaults to 200). Cannot be more than 1000. | | marker | String | Pagination key from previously returned response. | | format | String | Format of returned results: csv or json. Defaults to json. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | success | Indicates that the body represents a successful response. | | ledger_hash | [hash][] | ledger hash of the requested ledger. | | count | Integer | Number of validations returned. | | marker | String | (May be omitted) Pagination marker | | validations | Array of [Validation Objects][] | The requested validations. |

Each object in the validations array represents a validation report received, and has the following fields:

| Field | Value | Description | |--------|--------|-------------| | count | Integer | The number of rippleds that reported this validation. | | ledger_hash | [hash][] | Ledger hash validated. | | reporter_public_key | String | Public key of the node that first reported this validation. | | validation_public_key | Public key of the validator. | | signature | Validator signature of the validation details. | | first_datetime | [Timestamp][] | Date and time of the first report of this validation | | last_datetime | [Timestamp][] | Date and time of the last report of this validation |

Example

Request:

GET /v2/ledgers/EB26614C5E171C5A141734BAFFA63A080955811BB7AAE00D76D26FDBE9BC07A5/validations

Response:

200 OK
{
  result: "success",
  ledger_hash: "EB26614C5E171C5A141734BAFFA63A080955811BB7AAE00D76D26FDBE9BC07A5",
  count: 18,
  validations: [
    {
      count: 2,
      first_datetime: "2016-03-28T18:24:24.846Z",
      last_datetime: "2016-03-28T18:24:24.945Z",
      ledger_hash: "EB26614C5E171C5A141734BAFFA63A080955811BB7AAE00D76D26FDBE9BC07A5",
      reporter_public_key: "n9LGDURtWWoaayddmJpjKwTC7p4AKde2L7mC8o5kx1CFDSZdQjcd",
      signature: "304402206F77C7688199343FD911B2ABB0232DBEEC6E30A94F4E00CF7B99CEF444E17FC1022018FF6B21A2A6CB2784429CAAB647AF336E383B5E1630C4B6321616050508306F",
      validation_public_key: "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7"
    },
    ...
  ]
}

Get Ledger Validation

[Source]

Retrieve a validation recorded for a specific ledger hash by a specific validator. This dataset includes ledgers that are outside the main ledger chain, and only includes data that we have recorded. As such, some ledgers may have no validations even though they were validated by consensus.

Request Format

REST

GET /v2/ledgers/{:ledger_hash}/validations/{:validation_public_key}

Try it! >

The following URL parameters are required by this API endpoint:

| Field | Value | Description | |-------|-------|-------------| | ledger_hash | [Hash][] | Ledger hash to retrieve validations for. | | validation_public_key | String| Validator public key identifier |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | success | Indicates that the body represents a successful response. | | count | Integer | The number of rippleds that reported this validation. | | ledger_hash | [hash][] | Ledger hash validated. | | reporter_public_key | String | Public key of the node that first reported this validation. | | validation_public_key | Object | Public key of the validator. | | signature | Validator signature of the validation details. | | first_datetime | [Timestamp][] | Date and time of the first report of this validation | | last_datetime | [Timestamp][] | Date and time of the last report of this validation |

Example

Request:

GET /v2/ledgers/EB26614C5E171C5A141734BAFFA63A080955811BB7AAE00D76D26FDBE9BC07A5/validations/n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7

Response:

200 OK
{
  count: 2,
  first_datetime: "2016-03-28T18:24:24.846Z",
  last_datetime: "2016-03-28T18:24:24.945Z",
  ledger_hash: "EB26614C5E171C5A141734BAFFA63A080955811BB7AAE00D76D26FDBE9BC07A5",
  reporter_public_key: "n9LGDURtWWoaayddmJpjKwTC7p4AKde2L7mC8o5kx1CFDSZdQjcd",
  signature: "304402206F77C7688199343FD911B2ABB0232DBEEC6E30A94F4E00CF7B99CEF444E17FC1022018FF6B21A2A6CB2784429CAAB647AF336E383B5E1630C4B6321616050508306F",
  validation_public_key: "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
  result: "success"
}

Get Transaction

[Source]

Retrieve a specific transaction by its identifying hash.

Request Format

REST

GET /v2/transactions/{:hash}

Try it! >

The following URL parameters are required by this API endpoint:

| Field | Value | Description | |-------|-------|-------------| | hash | String - [Hash][] | The identifying hash of the transaction. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |-------|-------|-------------| | binary | Boolean | If true, return transaction data in binary format, as a hex string. Otherwise, return transaction data as nested JSON. Defaults to false. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | transaction | Transaction object | The requested transaction |

Example

Request:

GET /v2/transactions/03EDF724397D2DEE70E49D512AECD619E9EA536BE6CFD48ED167AE2596055C9A

Response (trimmed for size):

200 OK
{
    "result": "success",
    "transaction": {
        "ledger_index": 8317037,
        "date": "2014-08-14T20:22:20+00:00",
        "hash": "03EDF724397D2DEE70E49D512AECD619E9EA536BE6CFD48ED167AE2596055C9A",
        "tx": {
            "TransactionType": "OfferCreate",
            "Flags": 131072,
            "Sequence": 159244,
            "TakerPays": {
                "value": "0.001567373",
                "currency": "BTC",
                "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
            },
            "TakerGets": "146348921",
            "Fee": "64",
            "SigningPubKey": "02279DDA900BC53575FC5DFA217113A5B21C1ACB2BB2AEFDD60EA478A074E9E264",
            "TxnSignature": "3045022100D81FFECC36A3DEF0922EB5D16F1AA5AA0804C30A18ED3B512093A75E87C81AD602206B221E22A4E3158785C109E7508624AD3DE5C0E06108D34FA709FCC9575C9441",
            "Account": "r2d2iZiCcJmNL6vhUGFjs8U8BuUq6BnmT"
        },
        "meta": {
            "TransactionIndex": 0,
            "AffectedNodes": [
                {
                    "ModifiedNode": {
                        "LedgerEntryType": "AccountRoot",
                        "PreviousTxnLgrSeq": 8317036,
                        "PreviousTxnID": "A56793D47925BED682BFF754806121E3C0281E63C24B62ADF7078EF86CC2AA53",
                        "LedgerIndex": "2880A9B4FB90A306B576C2D532BFE390AB3904642647DCF739492AA244EF46D1",
                        "PreviousFields": {
                            "Balance": "275716601760"
                        },
                        "FinalFields": {
                            "Flags": 0,
                            "Sequence": 326323,
                            "OwnerCount": 27,
                            "Balance": "275862935331",
                            "Account": "rfCFLzNJYvvnoGHWQYACmJpTgkLUaugLEw",
                            "RegularKey": "rfYqosNivHQFJ6KpArouxoci3QE3huKNYe"
                        }
                    }
                },

                ...
            ],
            "TransactionResult": "tesSUCCESS"
        }
    }
}

Get Transactions

[Source]

Retrieve transactions by time

Request Format

REST

GET /v2/transactions/

Try it! >

Optionally, you can include the following query parameters:

| Field | Value | Description | |------------|-------|-------------| | start | String - [Timestamp][] | Filter results to this time and later. | | end | String - [Timestamp][] | Filter results to this time and earlier. | | descending | Boolean | If true, return results in reverse chronological order. Defaults to false. | | type | String | Filter transactions to a specific transaction type. | | result | String | Filter transactions for a specific transaction result. | | binary | Boolean | If true, return transactions in binary form. Defaults to false. | | limit | Integer | Maximum results per page. Defaults to 20. Cannot be more than 100. | | marker | String | Pagination marker from a previous response. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of Transactions returned. | | marker | String | (May be omitted) Pagination marker | | transactions | Array of Transaction object | The requested transactions |

Example

Request:

GET /v2/transactions/?result=tecPATH_DRY&limit=2&type=Payment

Response:

{
  "result": "success",
  "count": 2,
  "marker": "20130106022000|000000053869|00000",
  "transactions": [
    {
      "hash": "B8E4335A94438EC8209135A4E861A4C88F988C651B819DDAF2E8C55F9B41E589",
      "date": "2013-01-02T20:13:40+00:00",
      "ledger_index": 40752,
      "ledger_hash": "55A900C2BA9483DC83F8FC065DE7789570662365BDE98EB75C5F4CE4F9B43214",
      "tx": {
        "TransactionType": "Payment",
        "Flags": 0,
        "Sequence": 61,
        "Amount": {
          "value": "96",
          "currency": "USD",
          "issuer": "rJ6VE6L87yaVmdyxa9jZFXSAdEFSoTGPbE"
        },
        "Fee": "10",
        "SigningPubKey": "02082622E4DA1DC6EA6B38A48956D816881E000ACF0C5F5B52863B9F698799D474",
        "TxnSignature": "304402200A0746192EBC7BC3C1B9D657F42B6345A49D75FE23EF340CB6F0427254C139D00220446BF9169C94AEDC87F56D01DB011866E2A67E2AADDCC45C4D11422550D044CB",
        "Account": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY",
        "Destination": "rJ6VE6L87yaVmdyxa9jZFXSAdEFSoTGPbE"
      },
      "meta": {
        "TransactionIndex": 0,
        "AffectedNodes": [
          {
            "ModifiedNode": {
              "LedgerEntryType": "AccountRoot",
              "PreviousTxnLgrSeq": 40212,
              "PreviousTxnID": "F491DC8B5E51045D4420297293199039D5AE1EA0C6D62CAD9A973E3C89E40CD6",
              "LedgerIndex": "9B242A0D59328CE964FFFBFF7D3BBF8B024F9CB1A212923727B42F24ADC93930",
              "PreviousFields": {
                "Sequence": 61,
                "Balance": "8178999999999400"
              },
              "FinalFields": {
                "Flags": 0,
                "Sequence": 62,
                "OwnerCount": 6,
                "Balance": "8178999999999390",
                "Account": "rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY"
              }
            }
          }
        ],
        "TransactionResult": "tecPATH_DRY"
      }
    },
    {
      "hash": "1E1C14BF5E61682F3DC9D035D9908816497B8E8843E05C0EE98E06DFDDDAE920",
      "date": "2013-01-05T08:43:10+00:00",
      "ledger_index": 51819,
      "ledger_hash": "88ED10E4E31FC7580285CF173B264690B0E8688A3FC9F5F9C62F1A295B96269D",
      "tx": {
        "TransactionType": "Payment",
        "Flags": 0,
        "Sequence": 10,
        "Amount": {
          "value": "2",
          "currency": "EUR",
          "issuer": "rfitr7nL7MX85LLKJce7E3ATQjSiyUPDfj"
        },
        "Fee": "10",
        "SigningPubKey": "03FDDCD97668B686100E60653FD1E5210A8310616669AACB3A1FCC6D2C090CCB32",
        "TxnSignature": "304402204F9BB7E37C14A3A3762E2A7DADB9A28D1AFFB3797521229B6FB98BA666B5491B02204F69AAEAFAC8FA473E52042FF06035AB3618A54E0B76C9852766D55184E98598",
        "Account": "rhdAw3LiEfWWmSrbnZG3udsN7PoWKT56Qo",
        "Destination": "rfitr7nL7MX85LLKJce7E3ATQjSiyUPDfj"
      },
      "meta": {
        "TransactionIndex": 0,
        "AffectedNodes": [
          {
            "ModifiedNode": {
              "LedgerEntryType": "AccountRoot",
              "PreviousTxnLgrSeq": 51814,
              "PreviousTxnID": "5EC1C179996BD87E2EB11FE60A37ADD0FB2229ADC7D13B204FAB04FABED8A38D",
              "LedgerIndex": "AC1B67084F84839A3158A4E38618218BF9016047B1EE435AECD4B02226AB2105",
              "PreviousFields": {
                "Sequence": 10,
                "Balance": "10000999910"
              },
              "FinalFields": {
                "Flags": 0,
                "Sequence": 11,
                "OwnerCount": 2,
                "Balance": "10000999900",
                "Account": "rhdAw3LiEfWWmSrbnZG3udsN7PoWKT56Qo"
              }
            }
          }
        ],
        "TransactionResult": "tecPATH_DRY"
      }
    }
  ]
}

Get Payments

[Source]

Retrieve Payments over time, where Payments are defined as Payment type transactions where the sender of the transaction is not also the destination. (New in v2.0.4)

Results can be returned as individual payments, or aggregated to a specific list of intervals if currency and issuer are provided.

Request Format

REST - All Currencies

GET /v2/payments/

REST - Specific Currency

GET /v2/payments/{:currency}

Try it! >

This method accepts the following URL parameters:

| Field | Value | Description | |-----------|--------|-------------| | :currency | String | (Optional) Currency code, followed by + and a counterparty address. (Or just XRP.) If omitted, return payments for all currencies. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |------------|---------|-------------| | start | String - [Timestamp][] | Filter results to this time and later. | | end | String - [Timestamp][] | Filter results to this time and earlier. | | interval | String | If provided and currency is also specified, return results aggregated into intervals of the specified length instead of individual payments. Valid intervals are day, week, or month. | | descending | Boolean | Reverse chronological order. | | limit | Integer | Maximum results per page. Defaults to 200. Cannot be more than 1000. | | marker | String | Pagination key from previously returned response. | | format | String | Format of returned results: csv or json. Defaults to json. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of Transactions returned | | marker | String | (May be omitted) Pagination marker | | payments | Array of [Payment Objects][], or array of aggregate objects | The requested payments |

Aggregate Results

If the request specifies a currency and an interval, the result includes objects summarizing activity over a specific time period instead of listing individual payments. Each interval summary object has the following fields:

| Field | Value | Description | |--------|-------|-------------| | count | Number | The number of payments that occurred during this interval. | | currency | String - Currency Code | This summary describes payments that delivered the specified currency. | | issuer | String - Address | (Omitted for XRP) This summary describes payments that delivered the currency issued by this address. | | start | String - [Timestamp][] | The start time of this interval | | total_amount | Number | The amount of the currency delivered during this interval. | | average_amount | Number | The average amount of currency delivered by a single payment during this interval. |

Example

Request:

GET /v2/payments/BTC+rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q?limit=2

Response:

200 OK
{
  "result": "success",
  "count": 2,
  "marker": "20131124004240|000003504935|00002",
  "payments": [
    {
      "amount": "100.0",
      "delivered_amount": "100.0",
      "destination_balance_changes": [
        {
          "counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
          "currency": "BTC",
          "value": "100"
        }
      ],
      "transaction_cost": "1.0E-5",
      "source_balance_changes": [
        {
          "counterparty": "rwm98fCBS8tV1YB8CGho8zUPW5J7N41th2",
          "currency": "BTC",
          "value": "-100"
        }
      ],
      "tx_index": 3,
      "currency": "BTC",
      "destination": "rwm98fCBS8tV1YB8CGho8zUPW5J7N41th2",
      "executed_time": "2013-09-27T04:03:00Z",
      "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
      "ledger_index": 2424349,
      "source": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
      "source_currency": "BTC",
      "tx_hash": "EDDE2601C38F886E1183B5E7E1BFD936105C76E3648E3FAD2A6C55E90BABDB47"
    },
    {
      "amount": "0.2",
      "delivered_amount": "0.2",
      "destination_balance_changes": [
        {
          "counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
          "currency": "BTC",
          "value": "0.2"
        }
      ],
      "transaction_cost": "1.5E-5",
      "max_amount": "0.202",
      "source_balance_changes": [
        {
          "counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
          "currency": "BTC",
          "value": "-0.2"
        }
      ],
      "tx_index": 1,
      "currency": "BTC",
      "destination": "rHfcNvcg8pBqBxtSvD9Ma8gF17uxauB31o",
      "executed_time": "2013-11-20T23:52:30Z",
      "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
      "ledger_index": 3445885,
      "source": "rwm98fCBS8tV1YB8CGho8zUPW5J7N41th2",
      "source_currency": "BTC",
      "tx_hash": "F30D6CED4B0C37660F6DD741C9CA49F0BCB2D2648CDB8FC8AD6CFD86A86384E2"
    }
  ]
}

Get Exchanges

[Source]

Retrieve Exchanges for a given currency pair over time. Results can be returned as individual exchanges or aggregated to a specific list of intervals

Request Format

REST

GET /v2/exchanges/{:base}/{:counter}

Try it! >

This method requires the following URL parameters:

| Field | Value | Description | |-------|-------|-------------| | base | String | Base currency of the pair, as a [Currency Code][], followed by + and the issuer [Address][] unless it's XRP. | | counter | String | Counter currency of the pair, as a [Currency Code][], followed by + and the issuer [Address][] unless it's XRP. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |-------------|-------|-------------| | start | String - [Timestamp][] | Filter results to this time and later. | | end | String - [Timestamp][] | Filter results to this time and earlier. | | interval | String | Aggregation interval: 1minute, 5minute, 15minute, 30minute, 1hour, 2hour, 4hour, 1day, 3day, 7day, or 1month. Defaults to non-aggregated results. | | descending | Boolean | If true, return results in reverse chronological order. | | reduce | Boolean | Aggregate all individual results. Defaults to false. | | limit | Integer | Maximum results per page (defaults to 200). Cannot be more than 20,000 if reduce is true. Otherwise cannot be more than 1,000. | | marker | String | Pagination key from previously returned response. | | autobridged | Boolean | If true, filter results to autobridged exchanges only. | | format | String | Format of returned results: csv or json. Defaults to json |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of Transactions returned. | | marker | String | (May be omitted) Pagination marker | | exchanges | Array of [Exchange Objects][] | The requested exchanges |

Example

Request:

GET /v2/exchanges/USD+rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q/XRP?descending=true&limit=3&result=tesSUCCESS&type=OfferCreate

Response:

{
    "result": "success",
    "count": 3,
    "marker": "USD|rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q|XRP||20151021222220|000016612683|00017|00000",
    "exchanges": [
        {
            "base_amount": 4.98954834453577,
            "counter_amount": 1047.806201,
            "node_index": 9,
            "rate": 210.00021000021,
            "tx_index": 0,
            "buyer": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
            "executed_time": "2015-10-21T23:09:50",
            "ledger_index": 16613308,
            "offer_sequence": 1010056,
            "provider": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
            "seller": "rK2o63evRPdRoMT2ZaW72wsHsFzcjnRLLq",
            "taker": "rK2o63evRPdRoMT2ZaW72wsHsFzcjnRLLq",
            "tx_hash": "25600A10E5395D45A9D514E1EC3D98C341C5451FD21C48FA9D104C310EC29D6B",
            "tx_type": "Payment",
            "base_currency": "USD",
            "base_issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
            "counter_currency": "XRP"
        },
        {
            "base_amount": 0.0004716155440678037,
            "counter_amount": 0.1,
            "node_index": 3,
            "rate": 212.03711637126,
            "tx_index": 0,
            "buyer": "rfh3pFHkCXv3TgzsEJgyCzF1CduZHCLi9o",
            "executed_time": "2015-10-21T23:09:50",
            "ledger_index": 16613308,
            "offer_sequence": 158081,
            "provider": "rfh3pFHkCXv3TgzsEJgyCzF1CduZHCLi9o",
            "seller": "rK2o63evRPdRoMT2ZaW72wsHsFzcjnRLLq",
            "taker": "rK2o63evRPdRoMT2ZaW72wsHsFzcjnRLLq",
            "tx_hash": "25600A10E5395D45A9D514E1EC3D98C341C5451FD21C48FA9D104C310EC29D6B",
            "tx_type": "Payment",
            "base_currency": "USD",
            "base_issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
            "counter_currency": "XRP"
        },
        {
            "base_amount": 0.0004714169229390923,
            "counter_amount": 0.1,
            "node_index": 3,
            "rate": 212.1264535361624,
            "tx_index": 17,
            "autobridged_currency": "USD",
            "autobridged_issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
            "buyer": "rfh3pFHkCXv3TgzsEJgyCzF1CduZHCLi9o",
            "executed_time": "2015-10-21T22:22:20",
            "ledger_index": 16612683,
            "offer_sequence": 158059,
            "provider": "rfh3pFHkCXv3TgzsEJgyCzF1CduZHCLi9o",
            "seller": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
            "taker": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
            "tx_hash": "F05F670B06D641D7F6FE18E450DDB2C7A4DDF76D580C34C820939DC22AD9F582",
            "tx_type": "OfferCreate",
            "base_currency": "USD",
            "base_issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
            "counter_currency": "XRP"
        }
    ]
}

Get Exchange Rates

[Source]

Retrieve an exchange rate for a given currency pair at a specific time.

Request Format

REST

GET /v2/exchange_rates/{:base}/{:counter}

Try it! >

This method requires the following URL parameters:

| Field | Value | Description | |----------|--------|-------------| | :base | String | Base currency of the pair, as a [Currency Code][], followed by + and the issuer [Address][] unless it's XRP. | | :counter | String | Counter currency of the pair, as a [Currency Code][], followed by + and the issuer [Address][] unless it's XRP. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |--------|---------|-------------| | date | String - [Timestamp][] | Return an exchange rate for the specified time. Defaults to the current time. | | strict | Boolean | If false, allow rates derived from less than 10 exchanges. Defaults to true. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | rate | Number | The requested exchange rate, or 0 if the exchange rate could not be determined. |

All exchange rates are calcuated by converting the base currency and counter currency to XRP.

The rate is derived from the volume weighted average over the calendar day specified, averaged with the volume weighted average of the last 50 trades within the last 14 days.

Example

Request:

GET /v2/exchange_rates/USD+rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q/XRP?date=2015-11-13T00:00:00Z

Response:

{
  "result": "success",
  "rate": "224.65709"
}

Normalize

[Source]

Convert an amount from one currency and issuer to another, using the network exchange rates.

Request Format

REST

GET /v2/normalize

Try it! >

This method uses the following query parameters:

| Field | Value | Description | |-------------------|---------|-------------| | amount | Number | (Required) Amount of currency to normalize | | currency | String - [Currency Code][] | The currency code of the amount to convert from. (Defaults to XRP.) | | issuer | String - [Address][] | The issuer of the currency to convert from. (Required if currency is not XRP.) | | exchange_currency | String - [Currency Code][] | The currency to convert to. (Defaults to XRP.) | | exchange_issuer | String - [Address][] | The issuer of the currency to convert to. (Required if exchange_currency is not XRP.) | | date | String - [Timestamp][] | Convert according to the exchange rate at this time. (Defaults to the current time.) | | strict | Boolean | If true, do not use exchange rates that are determined by less than 10 exchanges. (Defaults to true.) |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | amount | Number | Pre-conversion amount specified in the request | | converted | Number | Post-conversion amount of the exchange_currency, or 0 if the exchange rate could not be determined. | | rate | Number | Exchange rate used to calculate the conversion, or 0 if the exchange rate could not be determined. |

All exchange rates are calculating by converting both currencies to XRP.

Example

Request:

GET /v2/normalize?amount=100&currency=XRP&exchange_currency=USD&exchange_issuer=rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q

Response:

{
  "result": "success",
  "amount": "100",
  "converted": "0.4267798022744489",
  "rate": "0.0042677980"
}

Get Daily Reports

[Source]

Retrieve per account per day aggregated payment summaries

Request Format

REST

GET /v2/reports/{:date}

Try it! >

This method uses the following URL parameters:

| Field | Value | Description | |-------|--------|-------------| | date | String | (Optional) UTC query date. If omitted, use the current day. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |----------|---------|-------------| | accounts | Boolean | If true, include lists of counterparty accounts. Defaults to false. | | payments | Boolean | If true, include lists of individual payments. Defaults to false. | | format | String | Format of returned results: csv or json. Defaults to json. | | limit | Integer | Maximum results per page. Defaults to 200. Cannot be more than 1000. | | marker | String | Pagination key from previously returned response |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | date | String - [Timestamp][] | The date for which this report applies. | | count | Integer | Number of reports returned. | | marker | String | (May be omitted) Pagination marker. | | reports | Array of [Reports Objects][] | The requested reports. Each report pertains to a single account. |

WARNING: This method may return a very large amount of data (more than 1 megabyte), which may cause poor performance in your client application.

Example

Request:

GET /v2/reports/2015-08-19T00:00:00Z?accounts=true&payments=true

Response (trimmed for size):

{
    "result": "success",
    "date": "2015-08-19T00:00:00Z",
    "count": 2,
    "marker": "20150819000000|r2nt4zXDP6Be5FNrLsiuuTEBETbGR9RFw",
    "reports": [
        {
            "account": "r2LXq2rZWSgQ1thhKiEytzi1smg6oEn8A",
            "date": "2015-08-19T00:00:00Z",
            "high_value_received": "7000",
            "high_value_sent": "3400",
            "payments": [
                {
                    "tx_hash": "A032EFBB219B1102BBD9BCCB91EDC6EAA8185509574FA476A2D3FE6BA79B04EF",
                    "amount": "1700",
                    "type": "received"
                },
                {
                    "tx_hash": "8B059360DC83777CDCABA84824C169651AFD6A7AB44E8742A3B8C6BC2AAF7384",
                    "amount": "40",
                    "type": "received"
                },

                ...(additional results trimmed)...

                {
                    "tx_hash": "76041BD6546389B5EC2CDBAA543200CF7B8D300F34F908BA5CA8523B0CA158C8",
                    "amount": "1400",
                    "type": "sent"
                }
            ],
            "payments_received": 155,
            "payments_sent": 49,
            "receiving_counterparties": [
                "rDMFJrKg2jyoNG6WDWJknXDEKZ6ywNFGwD",
                "r4XXHxraHLuCiLmLMw96FTPXXywZSnWSyR",

                ...(additional results trimmed)...


                "rp1C4Ld6uGjurFpempUJ8q5hPSWhak5EQf"
            ],
            "sending_counterparties": [
                "rwxcJVWZSEgN2DmLZYYjyagHjMx5jQ7BAa",

                ...(additional results trimmed)...


                "rBK1rLjbWsSU9EuST1cAz9RsiYdJPVGXXA"
            ],
            "total_value": "210940",
            "total_value_received": "100540",
            "total_value_sent": "110400"
        },
        {
            "account": "r2adXWaWFJt9mHeoWN77iHJozDz2FDAPA",
            "date": "2015-08-19T00:00:00Z",
            "high_value_received": "7400",
            "high_value_sent": "15900",
            "payments": [
                {
                    "tx_hash": "9C7EA76D467AE58E6AEFAAC7994D42FB4E7FA72BFA22F90260937386D76BDB64",
                    "amount": "900",
                    "type": "sent"
                },

                ...(additional results trimmed)...


                {
                    "tx_hash": "EC25427964419394BB5D06343BC74235C33655C1F70523C688F9A201957D65BA",
                    "amount": "100",
                    "type": "sent"
                }
            ],
            "payments_received": 43,
            "payments_sent": 62,
            "receiving_counterparties": [
                "rB4cyZxrBrTmJcWZSBc8YoW2t3bafiKRp",

                ...(additional results trimmed)...


                "rKybkw3Pu74VfJfrWr7QJbVPJNarnKP2EJ"
            ],
            "sending_counterparties": [
                "rNRCXw8PQRjvTwMDDLZVvuLHSKqqXUXQHv",
                "r7CLMVEuNvK2yXTPLPnkWMqzkkXuopWeL",

                ...(additional results trimmed)...


                "ranyeoYRhvwiFABzDvxSVyqQKp1bMkFsaX"
            ],
            "total_value": "117600",
            "total_value_received": "54700",
            "total_value_sent": "62900"
        }
    ]
}

Get Stats

[Source]

Retrieve statistics about transaction activity in the Ripple Consensus Ledger, divided into intervals of time.

Request Format

REST

GET /v2/stats

Try it! >

Optionally, you can also include the following query parameters:

| Field | Value | Description | |------------|---------|-------------| | family | String | If provided, filter results to a single family of stats: type, result, or metric. By default, provides all stats from all families. | | metrics | String | Filter results to one or more metrics (in a comma-separated list). Requires the family of the metrics to be specified. By default, provides all metrics in the family. | | start | String - [Timestamp][] | Filter results to this time and later. | | end | String - [Timestamp][] | Filter results to this time and earlier | | interval | String | Aggregation interval (hour,day,week, defaults to day) | | limit | Integer | Maximum results per page. Defaults to 200. Cannot be more than 1000. | | marker | String | Pagination key from previously returned response. | | descending | Boolean | If true, return results in reverse chronological order. Defaults to false. | | format | String | Format of returned results: csv or json. Defaults to json. |

Families and Metrics

The family and metrics query parameters provide a way to filter results to a specific subset of all metrics available for transactions in any given interval. Each metric is tied to a specific family, as follows:

| Family | Included Metrics | Meaning | |--------|------------------|---------| | type | All Ripple transaction types, including Payment, AccountSet, OfferCreate, and others. | Number of transactions of the given type that occurred during the interval. | | result | All transaction result codes (string codes, not the numeric codes), including tesSUCCESS, tecPATH_DRY, and many others. | Number of transactions that resulted in the given code during the interval. | | metric | Data-API defined Special Transaction Metrics. | (Varies) |

Special Transaction Metrics

The Data API derives the following values for every interval. These metrics are part of the metric family.

| Field | Value | Description | |--------|-------|-------------| | accounts_created | Number | The number of new accounts funded during this interval. | | exchanges_count | Number | The number of currency exchanges that occurred during this interval. | | ledger_count | Number | The number of ledgers closed during this interval. | | ledger_interval | Number | The average number of seconds between ledgers closing during this interval. | | payments_count | Number | The number of payments from one account to another during this interval. | | tx_per_ledger | Number | The average number of transactions per ledger in this interval. |

If any of the metrics have a value of 0, they are omitted from the results.

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of reports returned. | | marker | String | (May be omitted) Pagination marker | | stats | Array of stats objects | The requested stats. Omits metrics with a value of 0, and intervals that have no nonzero metrics. |

Example

Request:

GET /v2/stats/?start=2015-08-30&end=2015-08-31&interval=day&family=metric&metrics=accounts_created,exchanges_count,ledger_count,payments_count

Response:

{
  "result": "success",
  "count": 2,
  "stats": [
    {
      "accounts_created": 15,
      "exchanges_count": 19368,
      "ledger_count": 20307,
      "payments_count": 24763,
      "date": "2015-08-30T00:00:00Z"
    },
    {
      "accounts_created": 18,
      "exchanges_count": 17192,
      "ledger_count": 19971,
      "payments_count": 30894,
      "date": "2015-08-31T00:00:00Z"
    }
  ]
}

Get Capitalization

[Source]

Get the total amount of a single currency issued by a single issuer, also known as the market capitalization. (New in v2.0.4)

Request Format

REST

GET /v2/capitaliztion/{:currency}

Try it! >

This method requires the following URL parameters:

| Field | Value | Description | |-----------|----------------------------|-------------| | :currency | String | Currency to look up, in the form of currency+issuer. XRP is disallowed. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |------------|---------|-------------| | start | String - [Timestamp][] | Start time of query range. Defaults to 2013-01-01T00:00:00Z. | | end | String - [Timestamp][] | End time of query range. Defaults to the current time. | | interval | String | Aggregation interval - day, week, or month. Defaults to day. | | limit | Integer | Maximum results per page. Defaults to 200. Cannot be more than 1000. | | marker | String | Pagination key from previously returned response | | descending | Boolean | If true, return results in reverse chronological order. Defaults to false. | | adjusted | Boolean | If true, do not count known issuer-owned wallets towards market capitalization. Defaults to true. | | format | String | Format of returned results: csv or json. Defaults to json. |

If the request omits both start and end, the API returns only the most recent sample.

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of reports returned. | | currency | String | Currency requested | | issuer | String | Issuer requested | | marker | String | (May be omitted) Pagination marker | | rows | Array of issuer capitalization objects | The requested capitalization data |

Each issuer capitalization object has the following fields:

| Field | Value | Description | |--------|-------|-------------| | date | String - [Timestamp][] | The start time of the interval this object represents. | | amount | [String - Number][] | The total amount of currency issued by the issuer as of the start of this interval. |

Example

Request:

GET /v2/capitalization/USD+rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q?start=2015-01-01T00:00:00Z&end=2015-10-31&interval=month

Response:

200 OK
{
  "result": "success",
  "currency": "USD",
  "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
  "count": 10,
  "rows": [
    {
      "date": "2015-01-01T00:00:00Z",
      "amount": "4212940.254176095"
    },
    {
      "date": "2015-02-01T00:00:00Z",
      "amount": "5102817.663782776"
    },
    {
      "date": "2015-03-01T00:00:00Z",
      "amount": "4179270.8503426993"
    },
    {
      "date": "2015-04-01T00:00:00Z",
      "amount": "2609239.954946732"
    },
    {
      "date": "2015-05-01T00:00:00Z",
      "amount": "2262976.3681027396"
    },
    {
      "date": "2015-06-01T00:00:00Z",
      "amount": "2401904.277326213"
    },
    {
      "date": "2015-07-01T00:00:00Z",
      "amount": "2007614.760195671"
    },
    {
      "date": "2015-08-01T00:00:00Z",
      "amount": "2286058.6013003727"
    },
    {
      "date": "2015-09-01T00:00:00Z",
      "amount": "2070512.4729615194"
    },
    {
      "date": "2015-10-01T00:00:00Z",
      "amount": "2140238.7719266433"
    }
  ]
}

Get Active Accounts

[Source]

Get information on which accounts are actively trading in a specific currency pair. (New in v2.0.4)

Request Format

REST

GET /v2/active_accounts/{:base}/{:counter}

Try it! >

This method requires the following URL parameters:

| Field | Value | Description | |----------|--------|-------------| | :base | String | Base currency of the pair, as a [Currency Code][], followed by + and the issuer [Address][] unless it's XRP. | | :counter | String | Counter currency of the pair, as a [Currency Code][], followed by + and the issuer [Address][] unless it's XRP. |

Optionally, you can also include the following query parameters:

| Field | Value | Description | |--------------------|---------|-------------| | period | String | Get results for trading activity during a chosen time period. Valid periods are 1day, 3day, or 7day. Defaults to 1day. | | date | String | Get results for the period starting at this time. Defaults to the most recent period available. | | include_exchanges | Boolean | Include individual exchanges for each account in the results. | | format | String | Format of returned results: csv or json. Defaults to json. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of accounts returned. | | exchanges_count | Integer | Total number of exchanges in the period. | | accounts | Array of active Account Trading Objects | Active trading accounts for the period |

Each "Account Trading Object" describes the activity of a single account during the period, and has the following fields:

| Field | Value | Description | |-----------------|------------------|-------------| | buy | Object | Summary of currency exchanges buying the base currency| | buy.base_volume | Number | Amount of base currency the account bought in this period. | | buy.counter_volume | Number | Amount of counter currency the account sold in this period. | | buy.count | Number | Number of trades that bought the base currency in this period. | | sell | Object | Summary of currency changes selling the base currency | | sell.base_volume | Number | Amount of the base currency the account sold this period. | | sell.counter_volume | Number | Amount of the counter currency the account bought this period. | | sell.count | Number | Number of trades that sold the base currency. | | account | String - Address | The address whose activity this object describes | | base_volume | Number | The total volume of the base currency the account bought and sold in this period. | | counter_volume | Number | The total volume of the counter currency the account bought and sold in this period. | | count | Number | The total number of exchanges the account made during this period. |

Example

Request:

GET /v2/active_accounts/XRP/USD+rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q

Response:

{
    "result": "success",
    "count": 12,
    "exchanges_count": 11,
    "accounts": [
        {
            "buy": {
                "base_volume": 0,
                "counter_volume": 0,
                "count": 0
            },
            "sell": {
                "base_volume": 13084.822874,
                "counter_volume": 54.499328645454604,
                "count": 4
            },
            "account": "rGBQhB8EH5DmqMmfKPLchpqr3MR19pv6zN",
            "base_volume": 13084.822874,
            "counter_volume": 54.499328645454604,
            "count": 4
        },
        {
            "buy": {
                "base_volume": 12597.822874,
                "counter_volume": 52.4909286454546,
                "count": 1
            },
            "sell": {
                "base_volume": 0,
                "counter_volume": 0,
                "count": 0
            },
            "account": "rQE5Z3FgVnRMbVfS6xiVQFgB4J3X162FVD",
            "base_volume": 12597.822874,
            "counter_volume": 52.4909286454546,
            "count": 1
        },

        ... (additional results trimmed)...

        {
            "buy": {
                "base_volume": 1.996007,
                "counter_volume": 0.008782427920595,
                "count": 1
            },
            "sell": {
                "base_volume": 0,
                "counter_volume": 0,
                "count": 0
            },
            "account": "rD8LigXE7165r3VWhSQ4FwzJy7PNrTMwUq",
            "base_volume": 1.996007,
            "counter_volume": 0.008782427920595,
            "count": 1
        },
        {
            "buy": {
                "base_volume": 0,
                "counter_volume": 0,
                "count": 0
            },
            "sell": {
                "base_volume": 0.1,
                "counter_volume": 0.0004821658905462904,
                "count": 1
            },
            "account": "rfh3pFHkCXv3TgzsEJgyCzF1CduZHCLi9o",
            "base_volume": 0.1,
            "counter_volume": 0.0004821658905462904,
            "count": 1
        }
    ]
}

Get Exchange Volume

[Source]

Get aggregated exchange volume for a given time period. (New in v2.0.4)

The API returns results in units of a single display currency rather than many different currencies. The conversion uses standard rates to and from XRP.

Request Format

REST

GET /v2/network/exchange_volume

Try it! >

Optionally, you can include the following query parameters:

| Field | Value | Description | |----------|---------|-------------| | start | String - [Timestamp][] | Start time of query range. Defaults to the start of the most recent interval. | | end | String - [Timestamp][] | End time of query range. Defaults to the end of the most recent interval. | | interval | String | Aggregation interval - valid intervals are day, week, or month. Defaults to day. | | exchange_currency | String - [Currency Code][] | Normalize all amounts to use this as a display currency. If not XRP, exchange_issuer is also required. Defaults to XRP. | | exchange_issuer | String - [Address][] | Normalize results to the specified currency issued by this issuer. | | limit | Integer | Maximum results per page. Defaults to 200. Cannot be more than 1000. | | marker | String | Pagination key from previously returned response | | format | String | Format of returned results: csv or json. Defaults to json. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of results returned. | | rows | Array of exchange [Volume Objects][] | Exchange volumes for each interval in the requested time period. (By default, this method only returns the most recent interval.) |

Each object in the components array of the Volume Objects represent the volume of exchanges in a market between two currencies, and has the following fields:

| Field | Value | Description | |--------|--------|-------------| | count | Number | The number of exchanges in this market during this interval. | | rate | Number | The exchange rate from the base currency to the display currency. | | amount | Number | The amount of volume in the market, in units of the base currency. | | base | Object | The currency and issuer that identify the base currency of this market. There is no issuer for XRP. | | counter | Object | The currency and issuer that identify the counter currency of this market. There is no issuer for XRP. | | converted_amount | Number | The total amount of volume in the market, converted to the display currency. (Before v2.1.0, this was convertedAmount.) |

Example

Request:

GET /v2/network/exchange_volume?exchange_currency=USD&exchange_issuer=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B

Response:

{
    "result": "success",
    "count": 1,
    "rows": [
        {
            "components": [
                {
                    "count": 1711,
                    "rate": 5.514373809662552e-8,
                    "amount": 333.7038784107369,
                    "base": {
                        "currency": "BTC",
                        "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
                    },
                    "counter": {
                        "currency": "XRP"
                    },
                    "converted_amount": 117720.99268355068
                },
                {
                    "count": 1977,
                    "rate": 0.000019601413454357618,
                    "amount": 74567.72531650064,
                    "base": {
                        "currency": "USD",
                        "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
                    },
                    "counter": {
                        "currency": "XRP"
                    },
                    "converted_amount": 74003.51871932109
                },

                ... (additional results trimmed) ...

                {
                    "count": 3,
                    "rate": 0.022999083584408355,
                    "amount": 85.40728674708998,
                    "base": {
                        "currency": "CNY",
                        "issuer": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA"
                    },
                    "counter": {
                        "currency": "USD",
                        "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
                    },
                    "converted_amount": 12.72863756671683
                },
                {
                    "count": 3,
                    "rate": 1.7749889023209692e-7,
                    "amount": 570.687912196755,
                    "base": {
                        "currency": "JPY",
                        "issuer": "r94s8px6kSw1uZ1MV98dhSRTvc6VMPoPcN"
                    },
                    "counter": {
                        "currency": "BTC",
                        "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
                    },
                    "converted_amount": 4.4137945368632545
                }
            ],
            "count": 11105,
            "endTime": "2015-09-11T19:58:58+00:00",
            "exchange": {
                "currency": "USD",
                "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
            },
            "exchangeRate": 0.004410567085248279,
            "startTime": "2015-11-10T00:06:04+00:00",
            "total": 442442.5974313684
        }
    ]
}

Get Payment Volume

[Source]

Get aggregated payment volume for a given time period. (New in v2.0.4)

The API returns results in units of a single display currency rather than many different currencies. The conversion uses standard rates to and from XRP.

Request Format

REST

GET /v2/network/payment_volume

Try it! >

Optionally, you can include the following query parameters:

| Field | Value | Description | |----------|---------|-------------| | start | String - [Timestamp][] | Start time of query range. Defaults to the start of the most recent interval. | | end | String - [Timestamp][] | End time of query range. Defaults to the end of the most recent interval. | | interval | String | Aggregation interval - valid intervals are day, week, or month. Defaults to day. | | exchange_currency | String - [Currency Code][] | Normalize all amounts to use this as a display currency. If not XRP, exchange_issuer is also required. Defaults to XRP. | | exchange_issuer | String - [Address][] | Normalize results to the specified currency issued by this issuer. | | limit | Integer | Maximum results per page. Defaults to 200. Cannot be more than 1000. | | marker | String | Pagination key from previously returned response | | format | String | Format of returned results: csv or json. Defaults to json. |

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

| Field | Value | Description | |--------|-------|-------------| | result | String | The value success indicates that this is a successful response. | | count | Integer | Number of results retur