
Connect to XRP Ledger via Vezgo API
Accounts
Positions
Transactions
Support for Accounts, Positions and Transactions enabled.
- Full transaction coverage.
- Swap txns will have parts indicating inflows and outflows.
- Max 50k txns per connection.
Data mapping
A field-level guide to the Vezgo API data for the XRP Ledger — what each attribute means and where to read it — so you can map it into your own system.
| Data | Where to read it | Source on XRP Ledger |
|---|---|---|
| Account & wallet | account.wallets[].address | The connected XRP Ledger account address (classic "r…" address). One address is one account; wallet.address is the stable identity reused across syncs and reconnects. |
| Balances / positions | account.balances[] | Native XRP plus issued tokens (trust-line balances) from the live on-chain snapshot. Each balance has ticker, amount, decimals and fiat_value (USD); issued tokens add ticker_address — the token's issuer account. |
| Transactions | GET /accounts/:id/transactions | XRP and issued-token payments plus on-ledger DEX swaps, one per transaction. See "How to read a transaction" below. |
| Assets / securities | balance.ticker · balance.ticker_address | Native XRP uses ticker XRP. Issued tokens are keyed by ticker_address — the issuer account — because the same currency code can be issued by different issuers. Non-standard currency codes are 40-character (160-bit) hex and are decoded to a readable ticker; standard 3-character codes are used as-is. |
How to read a transaction
Each XRP Ledger transaction maps to a single Vezgo transaction. Read the value movement from parts[]; cross-currency self-payment swaps produce two parts (sent + received):
- Value movement — parts[] (direction sent/received, ticker, amount, fiat_value). XRP uses ticker "XRP"; issued tokens use their decoded currency code.
- Swaps — misc.swap and the two-leg parts[] are set only for a successful cross-currency Payment to your own account (Account == Destination; one leg XRP, one leg a token); a failed swap carries misc.failed and a single part instead. OfferCreate / OfferCancel DEX orders are NOT emitted as two-leg swaps.
- Network fee — fees[] (always XRP; only the sender pays a fee on the XRP Ledger).
- The transaction hash is in transaction_hash and misc.origin_id; misc.origin_type is the XRPL transaction type.
// One Vezgo transaction = one XRPL transaction (tx.misc.origin_id = hash)
const hash = tx.misc.origin_id; // == tx.transaction_hash
const kind = tx.misc.origin_type; // XRPL TransactionType (e.g. Payment, OfferCreate)
const parts = tx.parts ?? []; // value movement; swaps have sent + received legs
const gas = tx.fees?.[0]; // network fee, always in XRP (sender only)
if (tx.misc.swap) { /* cross-currency self-payment swap — parts holds both legs */ }
if (tx.misc.failed) { /* tx did not succeed (misc.txResult != tesSUCCESS) — no value moved */ }
// XRPL has no tokenTransfers / nftTransfers / internalTransfers arrays.| Where to read it | Attributes | What it is |
|---|---|---|
tx.parts[] | direction, ticker, amount, fiat_value, from_address, to_address | Value movement. One part normally; two (sent + received) for a self-payment swap, where from_address and to_address are both your own account (not counterparties). |
tx.fees[0] | ticker ("XRP"), amount, fiat_value | Network fee — always XRP; only the sender is charged. |
misc.origin_type is the XRPL transaction type. Common values:
- Payment
- OfferCreate
- OfferCancel
- TrustSet
- CheckCash
- EscrowCreate
- EscrowFinish
- PaymentChannelClaim
- AccountSet
Supported
- Native XRP balances and transfers
- Issued tokens (trust-line balances and transfers)
- Cross-currency swaps (self-payment via the XRPL DEX)
- Network fees (reported in XRP)
- USD fiat valuation for balances and transactions
Notes & limitations
- Issued-token balances reflect the current trust-line snapshot.
- decimals is populated only for tickers in Vezgo's known-decimals table (e.g. XRP, USDC, USDT); any other issued token is null — read the amount directly.
- A successful OfferCreate appears as a single 'sent' part valued at the offer's TakerGets (the amount being offered/sold, not necessarily the filled or settled amount); OfferCancel appears as a zero-value entry.
- fiat_value can be null (balances and non-swap parts) or 0 (swap legs) when a USD exchange rate is unavailable.
- Only the sender is charged the network fee (XRP).
Try to connect to XRP Ledger in our Demo Sandbox
Open DemoLet's get you started
To get your API Keys, sign up on the portal or reach out to the team at sales@vezgo.com