XRPL.to API Trading API
The Trading API from XRPL.to API — 8 operation(s) for trading.
The Trading API from XRPL.to API — 8 operation(s) for trading.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/xrpl-to:xrpl-to-trading-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: XRPL.to Trading API
description: 'XRPL token analytics, market data, NFT, trading, and on-chain account API.
## Usage policy
Applies to every caller — no key, Free, and every paid tier alike.
- **Attribution is required.** Any app, website, bot, or dashboard that displays xrpl.to data must show a visible, clickable credit to xrpl.to on the same screen as that data — not buried in an about page. Use: `Data by xrpl.to`
- **Redistribution needs permission.** Storing our data and re-serving it from your own API, dataset, or public dashboard requires written permission first. Email hello@xrpl.to — the answer is usually yes, we just need to know who is doing it.
- **Indexers and aggregators:** use the paginated list endpoints instead of looping one item at a time, cache what you fetch, and honour `Retry-After` on a 429 — a repeated 429 means back off, not retry. Get a key rather than running anonymous so we can raise your limits instead of blocking you.
- **Partner tier** (invitation-only, free): 100 req/sec, 200M credits/mo, direct support — for integrations that credit us properly. Email hello@xrpl.to or DM @xrplto on X.
Successful responses on the tiers that pay nothing (anonymous, free, partner) carry an `attribution` string right after `success`, restating this requirement. It is informational — safe to ignore in code, but not optional to comply with.'
version: '1.20'
contact:
name: XRPL.to
url: https://xrpl.to
servers:
- url: https://api.xrpl.to/v1
description: Production (canonical)
- url: https://api.xrpl.to/api
description: Production (alias — identical API, prefer /v1)
tags:
- name: Trading
paths:
/history:
get:
tags:
- Trading
summary: Trade history by token, account, or both
operationId: get_history
description: 'Cursor pagination: pass meta.nextCursor as cursor; it is null on the last page (meta.hasMore false). One row per Payment and pair (its fills merged), so meta.total counts fills; a page ends on a whole ledger and can hold a few rows more or fewer than limit. Offset pagination capped at 100k rows (meta.truncated: true, total capped to servable window; use cursor for deeper history). Trades carry sourceTag (numeric, on-chain SourceTag) and/or platform (canonical name for memo-identified platforms, e.g. SPYDEX)'
parameters:
- name: md5
in: query
required: false
description: token id (optional if account provided)
schema:
type: string
- name: account
in: query
required: false
description: r-address
schema:
type: string
- name: limit
in: query
required: false
description: int (max 1000)
schema:
type: integer
- name: offset
in: query
required: false
description: int
schema:
type: integer
- name: start_time
in: query
required: false
description: unix ms
schema:
type: string
- name: end_time
in: query
required: false
description: unix ms
schema:
type: string
- name: type
in: query
required: false
description: 'trades|liquidity|all (default: trades)'
schema:
type: string
- name: liquidity_type
in: query
required: false
description: create|deposit|withdraw
schema:
type: string
- name: pair_type
in: query
required: false
description: xrp|token
schema:
type: string
- name: xrp_only
in: query
required: false
description: bool
schema:
type: boolean
- name: xrp_amount
in: query
required: false
description: float (min XRP threshold)
schema:
type: number
- name: cursor
in: query
required: false
description: int
schema:
type: integer
- name: direction
in: query
required: false
description: 'asc|desc (default: desc)'
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: '{ success, took, data[], meta: { total, offset, limit, direction, nextCursor, hasMore, truncated?, timeRange } }'
/amm:
get:
tags:
- Trading
summary: List AMM pools
operationId: get_amm
parameters:
- name: sort
in: query
required: false
description: fees|apy|liquidity|volume|volume24h|created (fees, apy, liquidity and volume rank the 7-day figures)
schema:
type: string
- name: status
in: query
required: false
description: active|all
schema:
type: string
- name: limit
in: query
required: false
description: int (max 100)
schema:
type: integer
- name: offset
in: query
required: false
description: int
schema:
type: integer
- name: token
in: query
required: false
description: token id
schema:
type: string
- name: currency
in: query
required: false
description: currency code filter
schema:
type: string
- name: issuer
in: query
required: false
description: issuer address filter
schema:
type: string
- name: minLiquidity
in: query
required: false
description: only pools holding at least this much, in XRP (7-day liquidity)
schema:
type: string
responses:
'200':
description: Success
/amm/info:
get:
tags:
- Trading
summary: Live AMM pool info
operationId: get_amm_info
parameters:
- name: amm_account
in: query
required: false
description: AMM account address
schema:
type: string
- name: asset
in: query
required: false
description: XRP | token id
schema:
type: string
- name: asset2
in: query
required: false
description: XRP | token id
schema:
type: string
responses:
'200':
description: Success
/amm/liquidity-chart:
get:
tags:
- Trading
summary: Historical TVL chart data
operationId: get_amm_liquidity_chart
parameters:
- name: token
in: query
required: false
description: token id
schema:
type: string
- name: token2
in: query
required: false
description: token id
schema:
type: string
- name: ammAccount
in: query
required: false
description: address
schema:
type: string
- name: period
in: query
required: false
description: 1d|5d|1w|1m|3m|6m|1y|5y|all
schema:
type: string
- name: poolType
in: query
required: false
description: xrp|token|all
schema:
type: string
responses:
'200':
description: Success
/pairs:
get:
tags:
- Trading
summary: Trading pairs for a token
operationId: get_pairs
parameters:
- name: md5
in: query
required: false
description: token id (required)
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: '{ success, took, count, limit: 100, truncated, pairs[] }'
/orderbook:
get:
tags:
- Trading
summary: Live DEX orderbook
operationId: get_orderbook
parameters:
- name: base
in: query
required: false
description: token id
schema:
type: string
- name: quote
in: query
required: false
description: token id
schema:
type: string
- name: limit
in: query
required: false
description: int (max 400, default 20)
schema:
type: integer
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: '{ success, pair, base, quote, bids[], asks[], ledger_index (falls back to ledger_current_index) }'
/dex/quote:
post:
tags:
- Trading
summary: Get swap quote with routing / path finding (successor to POST…
operationId: post_dex_quote
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: '{ status, took, requiresTrustline, quote: { source_amount, destination_amount, execution_rate, price_impact, amm_price_change, suggested_slippage, ahead_value + ahead_impact (only with an ahead_value: how much less than destination_amount this trade receives if all of it fills first; already inside suggested_slippage), warnings[] (with a destination_account also recipient_no_trustline | recipient_not_authorized | recipient_line_frozen | recipient_limit_low | recipient_unverified — each means the Payment would fail), destination_account (echoed when it differs from source_account), paths_count }, alternatives[] }'
requestBody:
required: true
content:
application/json:
schema:
type: object
description: '{ source_account, destination_token, destination_value, source_token?, slippage?, destination_account? (Payment Destination when the output goes to another account), ahead_value? (XRP-to-token and token-to-XRP only: how much of the same input fills ahead of this trade in the same ledger; the quote stays the stand-alone fill, suggested_slippage covers landing after it) }'
parameters: []
/pairs/{id}:
get:
tags:
- Trading
summary: Trading pairs for a specific token
operationId: get_pairs_id
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: '{ success, took, count, limit: 100, truncated, pairs[] }'
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-Api-Key
WalletSignature:
type: apiKey
in: header
name: X-Signature
description: Send X-Wallet, X-Timestamp, X-Signature, X-Public-Key headers.
AdminKey:
type: apiKey
in: header
name: X-Admin-Key