Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
version: 1.3.0
title: CryptoQuant Data XRP AMM Data API
termsOfService: https://cryptoquant.com/terms-of-service
contact:
name: API Support
email: contact@cryptoquant.com
description: The CryptoQuant Data API provides simple and powerful endpoints to get information on general transaction data and aggregate on-chain statistics straight from the blockchain. The API root endpoint URL is `https://api.cryptoquant.com/v1/`.
servers:
- url: https://api.cryptoquant.com/v1
description: Default server
tags:
- name: XRP AMM Data
description: 'This namespace contains endpoints to retrieve metrics related to XRP AMM Data.
### Supported AMM Pairs
| Name | AMM Account | AMM | Status |
|----------------|-------------|--------------|-------------|
| MAG/XRP |`rNZ2ZVF1ZU34kFQvcN4xkFAvdSvve5bXce`| `mag-xrp` | Validated |
| XGO/XRP |`rLeAEvRQ5RnN6LJnZ29Xw4pboWfKqYut3c`| `xgo-xrp` | Validated |
| SOLO/XRP |`rMEJo9H5XvTe17UoAJzj8jtKVvTRcxwngo`| `solo-xrp` | Validated |
| USDC/XRP |`rGHt6LT5v9DVaEAmFzj5ciuxuj41ZjLofs`| `usdc-xrp` | Validated |
| BTC/XRP |`rQBeAghWHEwWvKShryBSa5yR3VRX9oyQ5T`| `btc-xrp` | Validated |
| USD/XRP |`rHUpaqUPbwzKZdzQ8ZQCme18FrgW9pB4am`| `usd-xrp` | Validated |
| XPM/XRP |`rakZprdzwsUJ1rD2ouhYYAVP7tPbhrCbtz`| `xpm-xrp` | Validated |
| CSC/XRP |`rf7g4JWCxu9oE1MKsWTihL9whY75AphCaV`| `csc-xrp` | Validated |
| RLT/XRP |`rwzCasMZW2WisfohuMCVWdDD58HK9QtDyC`| `rlt-xrp` | Validated |
| CORE/XRP |`rBu4LXTxM9cfs3JsFCuDbPMzvGBDR66wpi`| `core-xrp` | Validated |'
paths:
/xrp/amm-data/price:
get:
tags:
- XRP AMM Data
summary: Price
description: This endpoint returns XRP exchange rate on AMM. Currently, we only cover non-XRP/XRP pairs.
operationId: getXrplAmmPrice
parameters:
- description: An AMM pair from the table that we support. [See here](#tag/XRP-AMM-Data).
explode: false
in: query
name: amm
required: true
schema:
type: string
style: form
example: mag-xrp
- description: Currently, we support `day` and `hour`.
explode: false
in: query
name: window
schema:
type: string
default: day
style: form
example: day
- description: This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.
explode: false
in: query
name: from
required: false
schema:
type: string
style: form
example: 20191001T100000
- description: This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.
explode: false
in: query
name: to
required: false
schema:
type: string
style: form
example: 20191001T103025
- description: The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.
explode: false
in: query
name: limit
required: false
schema:
type: integer
default: 100
minimum: 1
maximum: 100000
style: form
example: 100
- description: A format type about return message type. Supported formats are json, csv.
explode: false
in: query
name: format
required: false
schema:
type: string
default: json
style: form
example: json
x-codeSamples:
- lang: Shell
source: 'curl -X GET "https://api.cryptoquant.com/v1/xrp/amm-data/price?window=day&from=20240601&limit=2" \
-H "Authorization: Bearer <YOUR_API_KEY>"'
- lang: JavaScript
source: "fetch(\"https://api.cryptoquant.com/v1/xrp/amm-data/price?window=day&from=20240601&limit=2\", { headers: { \"Authorization\": \"Bearer <YOUR_API_KEY>\"} })\n .then(response => response.json())\n .then(data => console.log(data))"
- lang: NodeJS
source: "require('axios')\n .get(\"https://api.cryptoquant.com/v1/xrp/amm-data/price?window=day&from=20240601&limit=2\", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })\n .then(response => console.log(response))"
- lang: Ruby
source: 'require ''net/http''
uri = URI("https://api.cryptoquant.com/v1/xrp/amm-data/price?window=day&from=20240601&limit=2")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body'
- lang: Python
source: 'import requests
headers = {''Authorization'': ''Bearer <YOUR_API_KEY>''}
url = "https://api.cryptoquant.com/v1/xrp/amm-data/price?window=day&from=20240601&limit=2"
print(requests.get(url, headers=headers).json())'
responses:
'200':
description: XRP exchange rate on AMM
content:
application/json:
schema:
type: object
required:
- status
- result
properties:
status:
type: object
description: The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.
properties:
code:
type: integer
format: int32
description: HTTP status code
message:
type: string
description: Text description of the error or success.
required:
- code
- message
result:
type: object
required:
- window
- data
properties:
window:
type: string
description: The size of window. It can be day or hour, and it depends on the user request.
data:
type: array
items:
type: object
required:
- price_xrp
- price_usd
properties:
date:
type: string
description: The date in YYYY-DD-MM. This optional field only appears when window=day is used.
price_xrp:
type: number
description: XRP exchange rate
price_usd:
type: number
description: USD exchange rate
example:
status:
code: 200
message: success
result:
window: day
data:
- date: '2024-03-23'
price_xrp: 648.08029308
price_usd: 401.63659852
- date: '2024-03-24'
price_xrp: 635.9036217
price_usd: 403.28196389
security:
- AccessToken: []
/xrp/amm-data/liquidity:
get:
tags:
- XRP AMM Data
summary: Liquidity
description: This endpoint returns the total amount of liquidity on AMM. Currently, we only cover non-XRP/XRP pairs.
operationId: getXrplAmmLiquidity
parameters:
- description: An AMM pair from the table that we support. [See here](#tag/XRP-AMM-Data).
explode: false
in: query
name: amm
required: true
schema:
type: string
style: form
example: mag-xrp
- description: Currently, we support `day` and `hour`.
explode: false
in: query
name: window
schema:
type: string
default: day
style: form
example: day
- description: This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.
explode: false
in: query
name: from
required: false
schema:
type: string
style: form
example: 20191001T100000
- description: This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.
explode: false
in: query
name: to
required: false
schema:
type: string
style: form
example: 20191001T103025
- description: The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.
explode: false
in: query
name: limit
required: false
schema:
type: integer
default: 100
minimum: 1
maximum: 100000
style: form
example: 100
- description: A format type about return message type. Supported formats are json, csv.
explode: false
in: query
name: format
required: false
schema:
type: string
default: json
style: form
example: json
x-codeSamples:
- lang: Shell
source: 'curl -X GET "https://api.cryptoquant.com/v1/xrp/amm-data/liquidity?window=day&from=20240601&limit=2" \
-H "Authorization: Bearer <YOUR_API_KEY>"'
- lang: JavaScript
source: "fetch(\"https://api.cryptoquant.com/v1/xrp/amm-data/liquidity?window=day&from=20240601&limit=2\", { headers: { \"Authorization\": \"Bearer <YOUR_API_KEY>\"} })\n .then(response => response.json())\n .then(data => console.log(data))"
- lang: NodeJS
source: "require('axios')\n .get(\"https://api.cryptoquant.com/v1/xrp/amm-data/liquidity?window=day&from=20240601&limit=2\", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })\n .then(response => console.log(response))"
- lang: Ruby
source: 'require ''net/http''
uri = URI("https://api.cryptoquant.com/v1/xrp/amm-data/liquidity?window=day&from=20240601&limit=2")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body'
- lang: Python
source: 'import requests
headers = {''Authorization'': ''Bearer <YOUR_API_KEY>''}
url = "https://api.cryptoquant.com/v1/xrp/amm-data/liquidity?window=day&from=20240601&limit=2"
print(requests.get(url, headers=headers).json())'
responses:
'200':
description: The total amount of liquidity on AMM
content:
application/json:
schema:
type: object
required:
- status
- result
properties:
status:
type: object
description: The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.
properties:
code:
type: integer
format: int32
description: HTTP status code
message:
type: string
description: Text description of the error or success.
required:
- code
- message
result:
type: object
required:
- window
- data
properties:
window:
type: string
description: The size of window. It can be day or hour, and it depends on the user request.
data:
type: array
items:
type: object
required:
- liquidity_xrp
- liquidity_usd
properties:
date:
type: string
description: The date in YYYY-DD-MM. This optional field only appears when window=day is used.
liquidity_xrp:
type: number
description: Total amount of liquidity in XRP
liquidity_usd:
type: number
description: Total amount of liquidity in USD
example:
status:
code: 200
message: success
result:
window: day
data:
- date: '2024-03-23'
liquidity_xrp: 9817.12
liquidity_usd: 6083.99
- date: '2024-03-24'
liquidity_xrp: 5381.33
liquidity_usd: 3412.77
security:
- AccessToken: []
/xrp/amm-data/fee:
get:
tags:
- XRP AMM Data
summary: Fee
description: This endpoint returns the trading fee on AMM. Currently, we only cover non-XRP/XRP pairs.
operationId: getXrplAmmFee
parameters:
- description: An AMM pair from the table that we support. [See here](#tag/XRP-AMM-Data).
explode: false
in: query
name: amm
required: true
schema:
type: string
style: form
example: mag-xrp
- description: Currently, we support `day` and `hour`.
explode: false
in: query
name: window
schema:
type: string
default: day
style: form
example: day
- description: This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.
explode: false
in: query
name: from
required: false
schema:
type: string
style: form
example: 20191001T100000
- description: This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.
explode: false
in: query
name: to
required: false
schema:
type: string
style: form
example: 20191001T103025
- description: The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.
explode: false
in: query
name: limit
required: false
schema:
type: integer
default: 100
minimum: 1
maximum: 100000
style: form
example: 100
- description: A format type about return message type. Supported formats are json, csv.
explode: false
in: query
name: format
required: false
schema:
type: string
default: json
style: form
example: json
x-codeSamples:
- lang: Shell
source: 'curl -X GET "https://api.cryptoquant.com/v1/xrp/amm-data/fee?window=day&from=20240601&limit=2" \
-H "Authorization: Bearer <YOUR_API_KEY>"'
- lang: JavaScript
source: "fetch(\"https://api.cryptoquant.com/v1/xrp/amm-data/fee?window=day&from=20240601&limit=2\", { headers: { \"Authorization\": \"Bearer <YOUR_API_KEY>\"} })\n .then(response => response.json())\n .then(data => console.log(data))"
- lang: NodeJS
source: "require('axios')\n .get(\"https://api.cryptoquant.com/v1/xrp/amm-data/fee?window=day&from=20240601&limit=2\", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })\n .then(response => console.log(response))"
- lang: Ruby
source: 'require ''net/http''
uri = URI("https://api.cryptoquant.com/v1/xrp/amm-data/fee?window=day&from=20240601&limit=2")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body'
- lang: Python
source: 'import requests
headers = {''Authorization'': ''Bearer <YOUR_API_KEY>''}
url = "https://api.cryptoquant.com/v1/xrp/amm-data/fee?window=day&from=20240601&limit=2"
print(requests.get(url, headers=headers).json())'
responses:
'200':
description: The trading fee on AMM
content:
application/json:
schema:
type: object
required:
- status
- result
properties:
status:
type: object
description: The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.
properties:
code:
type: integer
format: int32
description: HTTP status code
message:
type: string
description: Text description of the error or success.
required:
- code
- message
result:
type: object
required:
- window
- data
properties:
window:
type: string
description: The size of window. It can be day or hour, and it depends on the user request.
data:
type: array
items:
type: object
required:
- fee_percent
properties:
date:
type: string
description: The date in YYYY-DD-MM. This optional field only appears when window=day is used.
fee_percent:
type: number
description: Trading fee percentage
example:
status:
code: 200
message: success
result:
window: day
data:
- date: '2024-03-23'
fee_percent: 1
- date: '2024-03-24'
fee_percent: 1
security:
- AccessToken: []
/xrp/amm-data/swap-stats:
get:
tags:
- XRP AMM Data
summary: Swap Statistics
description: This endpoint returns the swap statistics on AMM. Currently, we only cover non-XRP/XRP pairs.
operationId: getXrplAmmSwapStatistics
parameters:
- description: An AMM pair from the table that we support. [See here](#tag/XRP-AMM-Data).
explode: false
in: query
name: amm
required: true
schema:
type: string
style: form
example: mag-xrp
- description: Currently, we support `day` and `hour`.
explode: false
in: query
name: window
schema:
type: string
default: day
style: form
example: day
- description: This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.
explode: false
in: query
name: from
required: false
schema:
type: string
style: form
example: 20191001T100000
- description: This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.
explode: false
in: query
name: to
required: false
schema:
type: string
style: form
example: 20191001T103025
- description: The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.
explode: false
in: query
name: limit
required: false
schema:
type: integer
default: 100
minimum: 1
maximum: 100000
style: form
example: 100
- description: A format type about return message type. Supported formats are json, csv.
explode: false
in: query
name: format
required: false
schema:
type: string
default: json
style: form
example: json
x-codeSamples:
- lang: Shell
source: 'curl -X GET "https://api.cryptoquant.com/v1/xrp/amm-data/swap-stats?window=day&from=20240601&limit=2" \
-H "Authorization: Bearer <YOUR_API_KEY>"'
- lang: JavaScript
source: "fetch(\"https://api.cryptoquant.com/v1/xrp/amm-data/swap-stats?window=day&from=20240601&limit=2\", { headers: { \"Authorization\": \"Bearer <YOUR_API_KEY>\"} })\n .then(response => response.json())\n .then(data => console.log(data))"
- lang: NodeJS
source: "require('axios')\n .get(\"https://api.cryptoquant.com/v1/xrp/amm-data/swap-stats?window=day&from=20240601&limit=2\", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })\n .then(response => console.log(response))"
- lang: Ruby
source: 'require ''net/http''
uri = URI("https://api.cryptoquant.com/v1/xrp/amm-data/swap-stats?window=day&from=20240601&limit=2")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer <YOUR_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body'
- lang: Python
source: 'import requests
headers = {''Authorization'': ''Bearer <YOUR_API_KEY>''}
url = "https://api.cryptoquant.com/v1/xrp/amm-data/swap-stats?window=day&from=20240601&limit=2"
print(requests.get(url, headers=headers).json())'
responses:
'200':
description: The swap statistics on AMM
content:
application/json:
schema:
type: object
required:
- status
- result
properties:
status:
type: object
description: The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.
properties:
code:
type: integer
format: int32
description: HTTP status code
message:
type: string
description: Text description of the error or success.
required:
- code
- message
result:
type: object
required:
- window
- data
properties:
window:
type: string
description: The size of window. It can be day or hour, and it depends on the user request.
data:
type: array
items:
type: object
required:
- num_swaps
- num_traders
properties:
date:
type: string
description: The date in YYYY-DD-MM. This optional field only appears when window=day is used.
num_swaps:
type: number
description: Number of swaps
num_traders:
type: number
description: Number of traders
example:
status:
code: 200
message: success
result:
window: day
data:
- date: '2024-03-23'
num_swaps: 64
num_traders: 13
- date: '2024-03-24'
num_swaps: 131
num_traders: 21
security:
- AccessToken: []
components:
securitySchemes:
AccessToken:
type: http
scheme: bearer
bearerFormat: JWT
description: 'For each API request, include this HTTP header:
`Authorization` with the `Bearer <YOUR_API_KEY>`. Bearer access token is the type of HTTP Authorization. You have to include access token to the HTTP header and note that leading bearer is required.
You must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You''ll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription.'
QueryParameter:
type: apiKey
name: api_key
in: query
description: 'For each API reqeust, include `api_key` parameter.
You must request with your access token in query parameter in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You''ll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription.
If you are using Excel, you can use the `api_key` parameter to request with your access token to return data either in `json` or `csv`.'
x-tagGroups:
- name: Discovery
tags:
- Available Endpoints
- Supported Stablecoin List
- Supported ERC20 List
- Supported Alt List
- name: Bitcoin
tags:
- BTC Entity Status
- BTC Exchange Flows
- BTC Flow Indicator
- BTC Market Indicator
- BTC Network Indicator
- BTC Miner Flows
- BTC Inter Entity Flows
- BTC Fund Data
- BTC Market Data
- BTC Miner Data
- BTC Network Data
- BTC Mempool Statistics
- BTC Lightning Statistics
- name: Ethereum
tags:
- ETH Entity Status
- ETH Exchange Flows
- ETH Flow Indicator
- ETH Market Indicator
- ETH 2.0
- ETH Fund Data
- ETH Market Data
- ETH Network Data
- name: XRP
tags:
- XRP Entity Status
- XRP Entity Flows
- XRP Flow Indicator
- XRP Market Data
- XRP Network Data
- XRP Network Indicator
- XRP Dex Data
- XRP AMM Data
- name: TRX
tags:
- TRX Market Data
- TRX Network Data
- TRX DEFI
- name: Stablecoin
tags:
- Stablecoin Entity Status
- Stablecoin Exchange Flows
- Stablecoin Flow Indicator
- Stablecoin Market Data
- Stablecoin Network Data
- name: ERC20
tags:
- ERC20 Entity Status
- ERC20 Exchange Flows
- ERC20 Flow Indicator
- ERC20 Market Data
- ERC20 Network Data
- name: Alt
tags:
- Alt Market Data
- name: Utilities
tags:
- Latency
x-provenance:
method: harvested
publisher: CryptoQuant
source: https://docs.cryptoquant.com/openapi/v1.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)