mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 12:15:50 +00:00
Data API: Remove Get Capitalization
This commit is contained in:
@@ -43,7 +43,6 @@ Ledger Contents Methods:
|
|||||||
* [Normalize - `GET /v2/normalize`](#normalize)
|
* [Normalize - `GET /v2/normalize`](#normalize)
|
||||||
* [Get Daily Reports - `GET /v2/reports/`](#get-daily-reports)
|
* [Get Daily Reports - `GET /v2/reports/`](#get-daily-reports)
|
||||||
* [Get Stats - `GET /v2/stats/`](#get-stats)
|
* [Get Stats - `GET /v2/stats/`](#get-stats)
|
||||||
* [Get Capitalization - `GET /v2/capitalization/{currency}`](#get-capitalization)
|
|
||||||
* [Get Active Accounts - `GET /v2/active_accounts/{base}/{counter}`](#get-active-accounts)
|
* [Get Active Accounts - `GET /v2/active_accounts/{base}/{counter}`](#get-active-accounts)
|
||||||
* [Get Exchange Volume - `GET /v2/network/exchange_volume`](#get-exchange-volume)
|
* [Get Exchange Volume - `GET /v2/network/exchange_volume`](#get-exchange-volume)
|
||||||
* [Get Payment Volume - `GET /v2/network/payment_volume`](#get-payment-volume)
|
* [Get Payment Volume - `GET /v2/network/payment_volume`](#get-payment-volume)
|
||||||
@@ -1269,133 +1268,6 @@ Response:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Get Capitalization
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled-historical-database/blob/develop/api/routes/capitalization.js "Source")
|
|
||||||
|
|
||||||
Get the total amount of a single currency issued by a single issuer, also known as the [market capitalization](https://en.wikipedia.org/wiki/Market_capitalization). _(New in [v2.0.4][])_
|
|
||||||
|
|
||||||
#### Request Format
|
|
||||||
|
|
||||||
<!-- MULTICODE_BLOCK_START -->
|
|
||||||
|
|
||||||
*REST*
|
|
||||||
|
|
||||||
```
|
|
||||||
GET /v2/capitaliztion/{currency}
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- MULTICODE_BLOCK_END -->
|
|
||||||
|
|
||||||
[Try it! >](data-api-v2-tool.html#get-capitalization)
|
|
||||||
|
|
||||||
This method requires the following URL parameters:
|
|
||||||
|
|
||||||
| Field | Value | Description |
|
|
||||||
|:-----------|:-------|:-------------------------------------------------------|
|
|
||||||
| `currency` | String | Currency to look up, in the form of [currency](#currency-code)+[issuer](#addresses). XRP is disallowed. |
|
|
||||||
|
|
||||||
|
|
||||||
Optionally, you can provide the following query parameters:
|
|
||||||
|
|
||||||
| Field | Value | Description |
|
|
||||||
|:-------------|:-----------------------|:-------------------------------------|
|
|
||||||
| `start` | String - [Timestamp][] | Start time of query range. The default is `2013-01-01T00:00:00Z`. |
|
|
||||||
| `end` | String - [Timestamp][] | End time of query range. The default is the current time. |
|
|
||||||
| `interval` | String | Aggregation interval - `day`, `week`, or `month`. The default is `day`. |
|
|
||||||
| `limit` | Integer | Maximum results per page. The default is 200. Cannot be more than 1000. |
|
|
||||||
| `marker` | String | [Pagination](#pagination) key from previously returned response. |
|
|
||||||
| `descending` | Boolean | If `true`, return results in reverse chronological order. The default is `false`. |
|
|
||||||
| `adjusted` | Boolean | If `true`, do not count known issuer-owned addresses towards market capitalization. The default is `true`. |
|
|
||||||
| `format` | String | Format of returned results: `csv` or `json`. The default is `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](#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
|
## Get Active Accounts
|
||||||
[[Source]<br>](https://github.com/ripple/rippled-historical-database/blob/develop/api/routes/activeAccounts.js "Source")
|
[[Source]<br>](https://github.com/ripple/rippled-historical-database/blob/develop/api/routes/activeAccounts.js "Source")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user