Insights

XRPL Trading Bots & Automated Trading

On the XRP Ledger an order is just a transaction, so a program holding a key can trade as freely as a person, for about 0.000012 XRP an order. Bots already send most of the ledger’s trading transactions: in the last 7 days one source tag alone sent 658,750, from 118 accounts. Here is what a bot costs, the limits it meets, and three ways to build one.

0.000012 XRP
network fee per order or cancel
0.2 XRP
held in reserve per order resting on the book
10
transactions a server will queue per account
3–5 s
between ledgers, when an order settles

How much trading is already automated

Trading transactions in the last 7 days, by the source tag on themaccounts
Tag 804681468658,750118
Tag 222249,79012
xrp.cafe227,0541,896
HBot169,7475
FirstLedger31,132869
Tag 12213112519,004234
Magnetic17,0541,511
Tag 174138363316,8746,614
Of 1.49 million tagged trading transactions in the week. A source tag is a number an app or bot writes into its transactions; a tag with millions of transactions from a handful of accounts is automated. Every app’s figures: platform stats.

Those transactions came from 13,213 accounts in all; the busiest few hundred send most of them, quoting and cancelling orders all day.

The limits a bot meets first

  • A reserve per open order. An order that rests on the book is an object in your account and holds 0.2 XRP until it fills or you cancel it. A bot with a thousand open orders has 200 XRP set aside; without it, new orders fail with tecINSUF_RESERVE_OFFER.
  • A queue per account. A server holds at most 10 of one account’s transactions waiting for a ledger (xrpl.org). Beyond that, send from more accounts or wait for the next ledger.
  • Fees rise under load. The 10-drop minimum climbs when the network is busy; a bot that always pays the minimum can be left in the queue.
  • No paying to go first. The order of transactions inside a ledger is shuffled, not sold, so being fastest or paying more does not put you ahead of another order in the same ledger (how ordering works).

Three ways to automate

  1. Ask in plain words. xrpl.to’s AI assistant has more than 90 tools for prices, research, swaps, limit orders and portfolio checks, and signs nothing you have not approved. No code.
  2. Your code, xrpl.to’s data. Prices, candles, order books, pools and trending lists from the API, live updates over WebSocket, and swap quotes with the route already worked out (swap API); your code signs and submits.
  3. Straight to the ledger. A client library such as xrpl.js (libraries): read the book with book_offers, place orders with OfferCreate and its flags (passive, immediate-or-cancel, fill-or-kill, sell) or an expiry, cancel with OfferCancel, and subscribe to new ledgers (xrpl.org).

Strategies bots run here

  • Market making: resting buy and sell orders on both sides, re-quoted as the price moves, earning the gap between them.
  • Arbitrage: trading the order book against an AMM pool when their prices drift apart by more than the pool’s fee.
  • Grid and dollar-cost averaging: orders at fixed price steps, or a fixed amount bought on a schedule.
  • Launch sniping: buying a new token in its first ledgers. Most new tokens fail, and others watch for exactly these buyers (sniping guide).

Keeping the key safe

  • Never give a bot service your seed: whoever holds it controls the account.
  • Run the bot on its own wallet, funded with what you can afford to lose.
  • Give the bot a regular key and keep the master key offline; a regular key can be replaced or removed if the bot is compromised (xrpl.org: keys).
  • Build in a daily loss limit that stops the bot, and check what it did every day.

Questions

Can I run a trading bot on the XRP Ledger?
Yes. Orders are ordinary transactions, so any program holding a key can place and cancel them through a public server or your own, with a client library such as xrpl.js or xrpl-py.
How much does a trading bot cost to run on the XRP Ledger?
About 0.000012 XRP per order or cancel in network fees, plus 0.2 XRP held in reserve for every order resting on the book, returned when it fills or is cancelled.
Is it safe to give a bot service my seed?
No. Whoever holds the seed controls the account. Run bots on a separate wallet funded with what you can lose, and give a service at most a regular key you can revoke.