diff --git a/content/reference-data-api.md b/content/reference-data-api.md
index 20d51289c6..92e6458f3e 100644
--- a/content/reference-data-api.md
+++ b/content/reference-data-api.md
@@ -24,6 +24,7 @@ The Ripple Data API v2 replaces the Historical Database v1 and the [Charts API](
[v2.0.8]: https://github.com/ripple/rippled-historical-database/releases/tag/v2.0.8
[v2.1.0]: https://github.com/ripple/rippled-historical-database/releases/tag/v2.1.0
[v2.2.0]: https://github.com/ripple/rippled-historical-database/releases/tag/v2.2.0
+[v2.3.0]: https://github.com/ripple/rippled-historical-database/releases/tag/v2.3.0
# API Method Reference #
@@ -65,8 +66,9 @@ Account Methods:
* [Get Account Transaction Stats - `GET /v2/accounts/{:address}/stats/transactions`](#get-account-transaction-stats)
* [Get Account Value Stats - `GET /v2/accounts/{:address}/stats/value`](#get-account-value-stats)
-Gateway Information Methods:
+External Information Methods:
+* [Get rippled Versions - `GET /v2/network/rippled_versions`](#get-rippled-versions)
* [Get All Gateways - `GET /v2/gateways`](#get-all-gateways)
* [Get Gateway - `GET /v2/gateways/{:gateway}`](#get-gateway)
* [Get Currency Image - `GET /v2/currencies/{:currencyimage}`](#get-currency-image)
@@ -1581,6 +1583,7 @@ Optionally, you can provide the following query parameters:
| `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`. |
+| `live` | String | Return a live rolling window of this length of time. Valid values are `day`, `hour`, or `minute`. Ignored if `interval` is provided. _(New in [v2.3.0][])_ |
| `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. |
@@ -1594,7 +1597,7 @@ A successful response uses the HTTP code **200 OK** and has a JSON body with the
|--------|-------|-------------|
| `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.) |
+| `rows` | Array of exchange [Volume Objects][] | Exchange volumes for each interval in the requested time period. (By default, this array contains only the most recent complete interval. If `live` is specified and `interval` isn't, this array contains the specified rolling window instead.) |
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:
@@ -1730,6 +1733,7 @@ Optionally, you can provide the following query parameters:
| `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`. |
+| `live` | String | Return a live rolling window of this length of time. Valid values are `day`, `hour`, or `minute`. Ignored if `interval` is provided. _(New in [v2.3.0][])_ |
| `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. |
@@ -1743,7 +1747,7 @@ A successful response uses the HTTP code **200 OK** and has a JSON body with the
|--------|-------|-------------|
| `result` | String | The value `success` indicates that this is a successful response. |
| `count` | Integer | Number of results returned. |
-| `rows` | Array of payment [Volume Objects][] | Payment volumes for each interval in the requested time period. (By default, this method only returns the most recent interval.) |
+| `rows` | Array of payment [Volume Objects][] | Payment volumes for each interval in the requested time period. (By default, this array contains only the most recent interval. If `live` is specified and `interval` isn't, this array contains the specified rolling window instead.) |
Each object in the `components` array of the Volume Objects represent the volume of payments for one currencies and issuer, and has the following fields:
@@ -3174,6 +3178,80 @@ Response:
```
+## Get rippled Versions ##
+[[Source]
](https://github.com/ripple/rippled-historical-database/blob/develop/api/routes/network/getVersions.js "Source")
+
+Reports the latest versions of `rippled` available from the official Ripple Yum repositories. _(New in [v2.3.0][].)_
+
+#### Request Format ####
+
+
+
+*REST*
+
+```
+GET /v2/network/rippled_versions
+```
+
+
+
+[Try it! >](data-api-v2-tool.html#get-rippled-versions)
+
+
+#### 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 the body represents a successful response. |
+| `count` | Integer | Number of rows returned. |
+| `rows` | Array of Version Objects | Description of the latest `rippled` version in each repository. |
+
+Each Version Object contains the following fields:
+
+| Field | Value | Description |
+|:----------|:-----------------------|:---------------------------------------|
+| `date` | String - [Timestamp][] | The date this `rippled` version was released. |
+| `repo` | String | The Yum repository where this `rippled` is available. The `stable` repository has the latest production version. Other versions are for development and testing. |
+| `version` | String | The version string for this version of `rippled`. |
+
+#### Example ####
+
+Request:
+
+```
+GET /v2/network/rippled_versions
+```
+
+Response:
+
+```
+200 OK
+{
+ "result": "success",
+ "count": 3,
+ "rows": [
+ {
+ "date": "2016-06-24T00:00:00Z",
+ "repo": "nightly",
+ "version": "0.32.0-rc2"
+ },
+ {
+ "date": "2016-06-24T00:00:00Z",
+ "repo": "stable",
+ "version": "0.32.0"
+ },
+ {
+ "date": "2016-06-24T00:00:00Z",
+ "repo": "unstable",
+ "version": "0.32.0-rc1"
+ }
+ ]
+}
+```
+
+
## Get All Gateways ##
[[Source]
](https://github.com/ripple/rippled-historical-database/blob/develop/api/routes/gateways.js "Source")
diff --git a/reference-data-api.html b/reference-data-api.html
index 9568c9b9e2..18b141131c 100644
--- a/reference-data-api.html
+++ b/reference-data-api.html
@@ -170,6 +170,7 @@
GET /v2/accounts/{:address}/stats/transactionsGET /v2/accounts/{:address}/stats/valueGateway Information Methods:
+External Information Methods:
GET /v2/network/rippled_versionsGET /v2/gatewaysGET /v2/gateways/{:gateway}GET /v2/currencies/{:currencyimage}day, week, or month. Defaults to day.liveday, hour, or minute. Ignored if interval is provided. (New in v2.3.0)exchange_currencyexchange_issuer is also required. Defaults to XRP.rowslive is specified and interval isn't, this array contains the specified rolling window instead.)day, week, or month. Defaults to day.liveday, hour, or minute. Ignored if interval is provided. (New in v2.3.0)exchange_currencyexchange_issuer is also required. Defaults to XRP.rowslive is specified and interval isn't, this array contains the specified rolling window instead.)Get information about known gateways. (New in v2.0.4)
+Reports the latest versions of rippled available from the official Ripple Yum repositories. (New in v2.3.0.)
GET /v2/gateways/
+GET /v2/network/rippled_versions
+
+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 the body represents a successful response. |
+
count |
+Integer | +Number of rows returned. | +
rows |
+Array of Version Objects | +Description of the latest rippled version in each repository. |
+
Each Version Object contains the following fields:
+| Field | +Value | +Description | +
|---|---|---|
date |
+String - Timestamp | +The date this rippled version was released. |
+
repo |
+String | +The Yum repository where this rippled is available. The stable repository has the latest production version. Other versions are for development and testing. |
+
version |
+String | +The version string for this version of rippled. |
+
Request:
+GET /v2/network/rippled_versions
+
+Response:
+200 OK
+{
+ "result": "success",
+ "count": 3,
+ "rows": [
+ {
+ "date": "2016-06-24T00:00:00Z",
+ "repo": "nightly",
+ "version": "0.32.0-rc2"
+ },
+ {
+ "date": "2016-06-24T00:00:00Z",
+ "repo": "stable",
+ "version": "0.32.0"
+ },
+ {
+ "date": "2016-06-24T00:00:00Z",
+ "repo": "unstable",
+ "version": "0.32.0-rc1"
+ }
+ ]
+}
+
+Get information about known gateways. (New in v2.0.4)
+GET /v2/gateways/
This method takes no query parameters.
-A successful response uses the HTTP code 200 OK and has a JSON body.
Each field in the top level JSON object is a Currency Code. The content of each field is an array of objects, representing gateways that issue that currency. Each object has the following fields:
Request:
GET /v2/gateways/
@@ -4897,10 +5002,10 @@
Get information about a specific gateway from the Data API's list of known gateways. (New in v2.0.4)
-GET /v2/gateways/{:gateway}
+GET /v2/gateways/{:gateway}
This method takes no query parameters.
-A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/gateways/Gatehub
@@ -5028,10 +5133,10 @@
Retrieve vector icons for various currencies. (New in v2.0.4)
-GET /v2/currencies/{:currencyimage}
+GET /v2/currencies/{:currencyimage}
This method requires the following URL parameter:
@@ -5051,9 +5156,9 @@ -A successful response uses the HTTP code 200 OK and has a Content-Type header of image/svg+xml to indicate that the contents are XML representing a file in SVG format.
Request:
GET /v2/currencies/mxn.svg
@@ -5082,10 +5187,10 @@ Content-Type: image/svg+xml
Retrieve information about the creation of new accounts in the Ripple Consensus Ledger.
-GET /v2/accounts
+GET /v2/accounts
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v1/accounts?parent=rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn
@@ -5242,10 +5347,10 @@ Content-Type: image/svg+xml
Get creation info for a specific ripple account
-GET /v2/accounts/{:address}
+GET /v2/accounts/{:address}
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn
@@ -5310,9 +5415,9 @@ Content-Type: image/svg+xml
Get all balances held or owed by a specific Ripple account.
-GET /v2/accounts/{:address}/balances
+GET /v2/accounts/{:address}/balances
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn/balances?currency=USD&date=2015-01-01T00:00:00Z&limit=3
@@ -5456,10 +5561,10 @@ Content-Type: image/svg+xml
Get orders in the order books, placed by a specific account. This does not return orders that have already been filled.
-GET /v2/account/{:address}/orders
+GET /v2/account/{:address}/orders
If none of ledger_index, ledger_hash, or date are specified, the API uses the most current data available.
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/accounts/rK5j9n8baXfL4gzUoZsfxBvvsv97P5swaV/orders?limit=2&date=2015-11-11T00:00:00Z
@@ -5666,10 +5771,10 @@ Content-Type: image/svg+xml
Retrieve a history of transactions that affected a specific account. This includes all transactions the account sent, payments the account received, and payments that rippled through the account.
-GET /v2/accounts/{:address}/transactions
+GET /v2/accounts/{:address}/transactions
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn/transactions?type=Payment&result=tesSUCCESS&limit=1
@@ -5860,10 +5965,10 @@ Content-Type: image/svg+xml
Retrieve a specifc transaction originating from a specified account
-GET /v2/accounts/{:address}/transactions/{:sequence}
+GET /v2/accounts/{:address}/transactions/{:sequence}
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn/transactions/10?binary=true
@@ -5949,10 +6054,10 @@ Content-Type: image/svg+xml
Retrieve a payments for a specified account
-GET /v2/accounts/{:address}/payments
+GET /v2/accounts/{:address}/payments
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
Request:
GET /v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn/payments?currency=USD&limit=1
@@ -6118,14 +6223,14 @@ Content-Type: image/svg+xml
Retrieve Exchanges for a given account over time.
-There are two variations on this method:
-GET /v2/accounts/{:address}/exchanges/
+GET /v2/accounts/{:address}/exchanges/
-GET /v2/accounts/{:address}/exchanges/{:base}/{:counter}
+GET /v2/accounts/{:address}/exchanges/{:base}/{:counter}
@@ -6198,7 +6303,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
@@ -6231,7 +6336,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/accounts/rsyDrDi9Emy6vPU78qdxovmNpmj5Qh4NKw/exchanges/KRW+rUkMKjQitpgAM5WTGk79xpjT38DEJY283d/XRP?start=2015-08-08T00:00:00Z&end=2015-08-31T00:00:00Z&limit=2
@@ -6286,10 +6391,10 @@ Content-Type: image/svg+xml
Get Account Balance Changes
Retrieve Balance changes for a given account over time.
-Request Format
-
+Request Format
+
-GET /v2/accounts/{:address}/balance_changes/
+GET /v2/accounts/{:address}/balance_changes/
@@ -6362,7 +6467,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
@@ -6395,7 +6500,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/accounts/rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn/balance_changes?descending=true&limit=3
@@ -6443,12 +6548,12 @@ Content-Type: image/svg+xml
Get Account Reports
Retrieve daily summaries of payment activity for an account.
-
+
-GET /v2/accounts/{:address}/reports/
+GET /v2/accounts/{:address}/reports/
-GET /v2/accounts/{:address}/reports/{:date}
+GET /v2/accounts/{:address}/reports/{:date}
@@ -6516,7 +6621,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
@@ -6544,7 +6649,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/accounts/rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q/reports?start=2015-08-28T00:00:00&end=2015-08-28T00:00:00&accounts=true&payments=true&descending=true
@@ -6599,9 +6704,9 @@ Content-Type: image/svg+xml
Get Account Transaction Stats
Retrieve daily summaries of transaction activity for an account. (New in v2.1.0.)
-
+
-GET /v2/accounts/{:address}/stats/transactions
+GET /v2/accounts/{:address}/stats/transactions
@@ -6664,7 +6769,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
@@ -6724,7 +6829,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/accounts/rGFuMiw48HdbnrUbkRYuitXTmfrDBNTCnX/stats/transactions?start=2015-01-01&limit=2
@@ -6763,9 +6868,9 @@ Content-Type: image/svg+xml
Get Account Value Stats
Retrieve daily summaries of transaction activity for an account. (New in v2.1.0.)
-
+
-GET /v2/accounts/{:address}/stats/value
+GET /v2/accounts/{:address}/stats/value
@@ -6828,7 +6933,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK and has a JSON body with the following:
@@ -6883,7 +6988,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/accounts/rGFuMiw48HdbnrUbkRYuitXTmfrDBNTCnX/stats/value?limit=2&descending=true
@@ -6910,9 +7015,9 @@ Content-Type: image/svg+xml
Health Check - API
Check the health of the API service.
-
+
-GET /v2/health/api
+GET /v2/health/api
@@ -6938,7 +7043,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK. By default, the response body is an integer health value only.
The health value 0 always indicates a healthy status. Other health values are defined as follows:
@@ -6986,7 +7091,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/health/api?verbose=true
@@ -7001,9 +7106,9 @@ Content-Type: image/svg+xml
Health Check - Ledger Importer
Check the health of the Ledger Importer Service.
-
+
-GET /v2/health/importer
+GET /v2/health/importer
@@ -7034,7 +7139,7 @@ Content-Type: image/svg+xml
-Response Format
+Response Format
A successful response uses the HTTP code 200 OK. By default, the response body is an integer health value only.
The health value 0 always indicates a healthy status. Other health values are defined as follows:
@@ -7101,7 +7206,7 @@ Content-Type: image/svg+xml
-Example
+Example
Request:
GET /v2/health/importer?verbose=true
@@ -7119,9 +7224,9 @@ Content-Type: image/svg+xml
Health Check - Nodes ETL
Check the health of the Topology Nodes Extract, Transform, Load (ETL) Service.
-
+
-GET /v2/health/nodes_etl
+GET /v2/health/nodes_etl
@@ -7147,102 +7252,6 @@ Content-Type: image/svg+xml
-Response Format
-A successful response uses the HTTP code 200 OK. By default, the response body is an integer health value only.
-The health value 0 always indicates a healthy status. Other health values are defined as follows:
-
-
-
-Value
-Meaning
-
-
-
-
-0
-The most recent imported topology data was less than threshold (Default: 120) seconds ago.
-
-
-1
-The most recent imported topology data was more than threshold seconds ago.
-
-
-
-If the request specifies verbose=true in the query parameters, the response body is a JSON object, with the following fields:
-
-
-
-Field
-Value
-Description
-
-
-
-
-score
-0-1
-Health value, as defined above.
-
-
-gap
-String - Human-readable time
-Difference between the latest imported data and the current time.
-
-
-gap_threshold
-String - Human-readable time
-Maximum gap to be considered healthy.
-
-
-message
-String
-Description of the reason for a non-zero score, if applicable.
-
-
-
-Example
-Request:
-GET /v2/health/nodes_etl?verbose=true
-
-Response:
-200 OK
-{
- "score": 0,
- "gap": "1.891s",
- "gap_threshold": "2.00m",
-}
-
-Health Check - Validations ETL
-
-Check the health of the Validations Extract, Transform, Load (ETL) Service.
-
-
-GET /v2/health/validations_etl
-
-
-
-Optionally, you can provide the following query parameters:
-
-
-
-Field
-Value
-Description
-
-
-
-
-threshold
-Integer
-Consider the service unhealthy if more than this amount of time, in seconds, has elapsed since the latest data was imported. Defaults to 120 seconds.
-
-
-verbose
-Boolean
-If true, return a JSON response with data points. By default, return an integer value only.
-
-
-
Response Format
A successful response uses the HTTP code 200 OK. By default, the response body is an integer health value only.
The health value 0 always indicates a healthy status. Other health values are defined as follows:
@@ -7308,6 +7317,102 @@ Content-Type: image/svg+xml
"gap_threshold": "2.00m",
}
+Health Check - Validations ETL
+
+Check the health of the Validations Extract, Transform, Load (ETL) Service.
+
+
+GET /v2/health/validations_etl
+
+
+
+Optionally, you can provide the following query parameters:
+
+
+
+Field
+Value
+Description
+
+
+
+
+threshold
+Integer
+Consider the service unhealthy if more than this amount of time, in seconds, has elapsed since the latest data was imported. Defaults to 120 seconds.
+
+
+verbose
+Boolean
+If true, return a JSON response with data points. By default, return an integer value only.
+
+
+
+Response Format
+A successful response uses the HTTP code 200 OK. By default, the response body is an integer health value only.
+The health value 0 always indicates a healthy status. Other health values are defined as follows:
+
+
+
+Value
+Meaning
+
+
+
+
+0
+The most recent imported topology data was less than threshold (Default: 120) seconds ago.
+
+
+1
+The most recent imported topology data was more than threshold seconds ago.
+
+
+
+If the request specifies verbose=true in the query parameters, the response body is a JSON object, with the following fields:
+
+
+
+Field
+Value
+Description
+
+
+
+
+score
+0-1
+Health value, as defined above.
+
+
+gap
+String - Human-readable time
+Difference between the latest imported data and the current time.
+
+
+gap_threshold
+String - Human-readable time
+Maximum gap to be considered healthy.
+
+
+message
+String
+Description of the reason for a non-zero score, if applicable.
+
+
+
+Example
+Request:
+GET /v2/health/nodes_etl?verbose=true
+
+Response:
+200 OK
+{
+ "score": 0,
+ "gap": "1.891s",
+ "gap_threshold": "2.00m",
+}
+
API Conventions
Basic Types
As a REST API, the Data API v2 uses JSON's native datatypes to represent API fields, with some special cases.