Get desktop application:
View/edit binary Protocol Buffers messages
The primary service for interacting with a running xud node.
Adds a currency to the list of supported currencies. Once added, the currency may be used for new trading pairs. shell: xucli addcurrency <currency> <swap_client> [decimal_places] [token_address]
(message has no fields)
Adds a trading pair to the list of supported trading pairs. The newly supported pair is advertised to peers so they may begin sending orders for it. shell: xucli addpair <base_currency> <quote_currency>
The base currency that is bought and sold for this trading pair.
The currency used to quote a price for the base currency.
(message has no fields)
Bans a node and immediately disconnects from it. This can be used to prevent any connections to a specific node. shell: xucli ban <node_identifier>
The node pub key or alias of the node to ban.
(message has no fields)
Changes the xud master password, including the wallet passwords for any underlying clients. shell: xucli changepass
(message has no fields)
Closes any existing payment channels with a peer for the specified currency. shell: xucli closechannel <currency> [node_identifier ] [--force]
The node pub key or alias of the peer with which to close any channels with.
The ticker symbol of the currency of the channel to close.
Whether to force close the channel in case the peer is offline or unresponsive.
The on-chain address to send funds extracted from the channel. If unspecified, the funds return to the default wallet for the client closing the channel.
For Connext only - the amount to extract from the channel. If 0 or unspecified, the entire off-chain balance for the specified currency will be extracted.
A manual fee rate set in sat/byte that should be used when crafting the closure transaction.
The id of the transaction per channel close.
Attempts to connect to a node. Once connected, the node is added to the list of peers and becomes available for swaps and trading. A handshake exchanges information about the peer's supported trading and swap clients. Orders will be shared with the peer upon connection and upon new order placements. shell: xucli connect <node_uri>
The uri of the node to connect to in "[nodePubKey]@[host]:[port]" format.
(message has no fields)
Gets an address to deposit a given currency into the xud wallets. shell: xucli walletdeposit <currency>
Gets an address to deposit a given currency directly into a channel. shell: xucli deposit <currency>
Discover nodes from a specific peer and apply new connections
The node pub key or alias of the peer to discover nodes from.
Gets the total balance available across all payment channels and wallets for one or all currencies. shell: xucli getbalance [currency]
The ticker symbol of the currency to query for, if unspecified then balances for all supported currencies are queried.
A map between currency ticker symbols and their balances.
Gets general information about this node. shell: xucli getinfo
(message has no fields)
The version of this instance of xud.
The node pub key of this node.
A list of uris that can be used to connect to this node. These are shared with peers.
The number of currently connected peers.
The number of supported trading pairs.
The number of active, standing orders in the order book.
The alias of this instance of xud.
The network of this node.
Gets the master seed mnemonic . shell: xucli getnemonic
(message has no fields)
Gets general information about a node. shell: xucli getnodeinfo <node_identifier>
The node pub key or alias of the node for which to get information.
The node's reputation score. Points are subtracted for unexpected or potentially malicious behavior. Points are added when swaps are successfully executed.
Whether the node is currently banned.
Gets orders from the order book. This call returns the state of the order book at a given point in time, although it is not guaranteed to still be vaild by the time a response is received and processed by a client. It accepts an optional trading pair id parameter. If specified, only orders for that particular trading pair are returned. Otherwise, all orders are returned. Orders are separated into buys and sells for each trading pair, but unsorted. shell: xucli listorders [pair_id] [include_own_orders] [limit]
The trading pair for which to retrieve orders.
Whether only own, only peer or both orders should be included in result.
The maximum number of orders to return from each side of the order book.
Whether to include the node aliases of owners of the orders.
A map between pair ids and their buy and sell orders.
Gets a list of this node's supported currencies. shell: xucli listcurrencies
(message has no fields)
The list of available currencies in the orderbook.
Gets a list of this nodes suported trading pairs. shell: xucli listpairs
(message has no fields)
The list of supported trading pair tickers in formats like "LTC/BTC".
Gets a list of connected peers. shell: xucli listpeers
(message has no fields)
The list of connected peers.
Opens a payment channel to a peer for the specified amount and currency. shell: xucli openchannel <currency> <amount> [node_identifier] [push_amount]
The node pub key or alias of the peer with which to open channel with.
The ticker symbol of the currency to open the channel for.
The amount to be deposited into the channel denominated in satoshis.
The balance amount to be pushed to the remote side of the channel denominated in satoshis.
The manual fee rate set in sat/byte that should be used when crafting the funding transaction in the channel.
The id of the transaction that opened the channel.
Gets an order book depth chart where orders are grouped into "buckets" according to their price rounded to a given level of precision. shell: xucli orderbook [pair_id] [precision]
The trading pair for which to retrieve orders.
The number of digits to the right of the decimal point for each price bucket. A negative number rounds digits to the left of the decimal point, e.g. -2 would round to the hundreds place.
The maximum number of price "buckets" to return, if zero or unspecified then no limit is imposed.
A map between currency tickers and sorted lists of order buckets
Adds an order to the order book. If price is zero or unspecified a market order will get added.
An order (or portion thereof) that matched the newly placed order.
A successful swap of a peer order that matched the newly placed order.
The remaining portion of the order, after matches, that enters the order book.
A swap attempt that failed.
The synchronous, non-streaming version of PlaceOrder. shell: xucli buy <quantity> <pair_id> <price> [order_id] [stream] shell: xucli sell <quantity> <pair_id> <price> [order_id] [stream]
A list of own orders (or portions thereof) that matched the newly placed order.
A list of successful swaps of peer orders that matched the newly placed order.
The remaining portion of the order, after matches, that enters the order book.
A list of swap attempts that failed.
Executes a swap on a maker peer order.
The order id of the maker order.
The trading pair of the swap orders.
The node pub key of the peer which owns the maker order. This is optional but helps locate the order more quickly.
The quantity to swap denominated in satoshis. The whole order will be swapped if unspecified.
Removes a currency from the list of supported currencies. Only currencies that are not in use for any currently supported trading pairs may be removed. Once removed, the currency can no longer be used for any supported trading pairs. shell: xucli removecurrency <currency>
The ticker symbol for this currency such as BTC, LTC, ETH, etc...
(message has no fields)
Removes an order from the order book by its local id. This should be called when an order is canceled or filled outside of xud. Removed orders become immediately unavailable for swaps, and peers are notified that the order is no longer valid. Any portion of the order that is on hold due to ongoing swaps will not be removed until after the swap attempts complete. shell: xucli removeorder <order_id> [quantity]
The local id of the order to remove.
The quantity to remove from the order denominated in satoshis. If zero or unspecified then the entire order is removed.
Any portion of the order that was on hold due to ongoing swaps at the time of the request and could not be removed until after the swaps finish.
Remaining portion of the order if it was a partial removal.
Successfully removed portion of the order.
Removed order's pairId. (e.g. ETH/BTC)
Removes all orders from the order book. Removed orders become immediately unavailable for swaps, and peers are notified that the orders are no longer valid. Any portion of the orders that is on hold due to ongoing swaps will not be removed until after the swap attempts complete. shell: xucli removeallorders
(message has no fields)
The local order ids that were successfully removed.
The local order ids that were on hold and failed to be removed.
Removes a trading pair from the list of currently supported trading pair. This call will effectively cancel any standing orders for that trading pair. Peers are informed when a pair is no longer supported so that they will know to stop sending orders for it. shell: xucli removepair <pair_id>
The trading pair ticker to remove in a format such as "LTC/BTC".
(message has no fields)
Set the logging level. shell: xucli loglevel <level>
(message has no fields)
Begin gracefully shutting down xud. shell: xucli shutdown
(message has no fields)
(message has no fields)
Subscribes to orders being added to and removed from the order book. This call allows the client to maintain an up-to-date view of the order book. For example, an exchange that wants to show its users a real time view of the orders available to them would subscribe to this streaming call to be alerted as new orders are added and expired orders are removed.
Whether to transmit all existing active orders upon establishing the stream.
An order that was added to the order book.
An order (or portion thereof) that was removed from the order book.
Subscribes to failed swaps. By default, only swaps that are initiated by a remote peer are transmitted unless a flag is set to include swaps initiated by the local node. This call allows the client to get real-time notifications when swap attempts are failing. It can be used for status monitoring, debugging, and testing purposes.
Subscribes to completed swaps. By default, only swaps that are initiated by a remote peer are transmitted unless a flag is set to include swaps initiated by the local node. This call allows the client to get real-time notifications when its orders are filled by a peer. It can be used for tracking order executions, updating balances, and informing a trader when one of their orders is settled through the Exchange Union network.
Subscribes to accepted swaps. This stream emits a message when the local xud node accepts a swap request from a peer, but before the swap has actually succeeded.
(message has no fields)
The global UUID for the order that was accepted to be swapped.
The local id for the order that was accepted to be swapped.
The trading pair that the swap is for.
The order quantity that was accepted to be swapped.
The price for the swap.
The node pub key of the peer that executed this order.
The hex-encoded payment hash for the swap.
The amount received denominated in satoshis.
The amount sent denominated in satoshis.
The ticker symbol of the currency received.
The ticker symbol of the currency sent.
Gets a list of completed trades. shell: xucli tradehistory [limit]
The maximum number of trades to return
Gets the trading limits for one or all currencies. shell: xucli tradinglimits [currency]
The ticker symbol of the currency to query for, if unspecified then trading limits for all supported currencies are queried.
A map between currency ticker symbols and their trading limits.
Removes a ban from a node manually and, optionally, attempts to connect to it. shell: xucli unban <node_identifier> [reconnect]
The node pub key or alias of the peer to unban.
Whether to attempt to connect to the peer after it is unbanned.
(message has no fields)
Withdraws a given currency from the xud wallets to a specified address. shell: xucli withdraw [amount] [currency] <destination> [fee]
The ticker symbol of the currency to withdraw.
The address to withdraw funds to.
The amount to withdraw denominated in satoshis
Whether to withdraw all available funds for this currency. If true, the amount field is ignored.
The fee to use for the withdrawal transaction denominated in satoshis per byte.
The id of the withdrawal transaction.
A service for interacting with a locked or uninitalized xud node.
Creates an xud identity node key and underlying wallets. The node key and wallets are derived from a single seed and encrypted using a single password provided as a parameter to the call. shell: xucli create
The password in utf-8 with which to encrypt the new xud node key as well as any uninitialized underlying wallets.
The 24 word mnemonic to recover the xud identity key and underlying wallets
The list of lnd clients that were initialized.
Whether the connext wallet was initialized.
Restores an xud instance and underlying wallets from a seed. shell: xucli restore [backup_directory]
The 24 word mnemonic to recover the xud identity key and underlying wallets
The password in utf-8 with which to encrypt the restored xud node key as well as any restored underlying wallets.
A map between the currency of the LND and its multi channel SCB
The XUD database backup
The list of lnd clients that were initialized.
Whether the connext wallet was initialized.
Unlocks and decrypts the xud node key and any underlying wallets. shell: xucli unlock
The password in utf-8 with which to unlock an existing xud node key as well as underlying client wallets such as lnd.
The list of lnd clients that were unlocked.
The list of lnd clients that could not be unlocked.
Used in:
Total balance denominated in satoshis.
Sum of confirmed channel balances denominated in satoshis.
Sum of pending channel balances denominated in satoshis.
Sum of inactive channel balances denominated in satoshis.
Confirmed wallet balance in satoshis.
Unconfirmed wallet balance in satoshis.
Used in:
The blockchain the swap client is on (eg bitcoin, litecoin)
The network the swap client is on (eg regtest, testnet, mainnet)
Used in:
The number of active/online channels for this lnd instance that can be used for swaps.
The number of inactive/offline channels for this lnd instance.
The number of channels that are pending on-chain confirmation before they can be used.
The number of channels that have been closed.
Used in:
Used as request type in: Xud.AddCurrency
Used as field type in:
The ticker symbol for this currency such as BTC, LTC, ETH, etc...
The payment channel network client to use for executing swaps.
The contract address for layered tokens such as ERC20.
The number of places to the right of the decimal point of the smallest subunit of the currency. For example, BTC, LTC, and others where the smallest subunits (satoshis) are 0.00000001 full units (bitcoins) have 8 decimal places. ETH has 18. This can be thought of as the base 10 exponent of the smallest subunit expressed as a positive integer. A default value of 8 is used if unspecified.
Used in:
Used as request type in: Xud.Deposit, Xud.WalletDeposit
The ticker symbol of the currency to deposit.
Used as response type in: Xud.Deposit, Xud.WalletDeposit
The address to use to deposit funds.
Used in:
Used in:
Used in:
Used in:
,The pub key of this node
An alias for this node deterministically generated from the pub key
Used in:
, , , ,The price of the order.
The quantity of the order in satoshis.
The trading pair that this order is for.
A UUID for this order.
The identifier of the node that created this order.
The local id for this order, if applicable.
The epoch time in milliseconds when this order was created.
Whether this order is a buy or sell
Whether this order is a local own order or a remote peer order.
The quantity on hold pending swap execution.
Used in:
The rounded price of the bucket.
The total quantity for all orders that fall into this bucket.
Used in:
A sorted list of buckets for sell orders
A sorted list of buckets for buy orders.
Used in:
The quantity removed from the order.
The trading pair that the order is for.
The global UUID for the order.
The local id for the order, if applicable.
Whether the order being removed is a local own order or a remote peer order.
Used in:
, ,Used in:
A list of buy orders sorted by descending price.
A list of sell orders sorted by ascending price.
Used in:
The number of orders belonging to remote xud nodes.
The number of orders belonging to our local xud node.
Used in:
The socket address with host and port for this peer.
The node pub key to uniquely identify this peer.
A map of ticker symbols to lnd pub keys for this peer
Indicates whether this peer was connected inbound.
A list of trading pair tickers supported by this peer.
The version of xud being used by the peer.
The time in seconds that we have been connected to this peer.
The alias for this peer's public key
The connext identifier for this peer
A map of ticker symbols to lnd uris for this peer
Used in:
Used as request type in: Xud.PlaceOrder, Xud.PlaceOrderSync
The price of the order.
The quantity of the order denominated in satoshis.
The trading pair that the order is for.
The local id to assign to the order.
Whether the order is a buy or sell.
The local id of an existing order to be replaced. If provided, the order must be successfully found and removed before the new order is placed, otherwise an error is returned.
Whether the order must be filled immediately and not allowed to enter the order book.
Used in:
,Used as request type in: Xud.SubscribeSwapFailures, Xud.SubscribeSwaps
Whether to include the results for swaps initiated via the PlaceOrder or ExecuteSwap calls. These swap results are also returned in the responses for the respective calls.
Used as response type in: Xud.SubscribeSwapFailures
Used as field type in:
,The global UUID for the order that failed the swap.
The trading pair that the swap is for.
The order quantity that was attempted to be swapped.
The node pub key of the peer that we attempted to swap with.
The reason why the swap failed.
Used as response type in: Xud.ExecuteSwap, Xud.SubscribeSwaps
Used as field type in:
,The global UUID for the order that was swapped.
The local id for the order that was swapped.
The trading pair that the swap is for.
The order quantity that was swapped.
The hex-encoded payment hash for the swap.
The amount received denominated in satoshis.
The amount sent denominated in satoshis.
The node pub key of the peer that executed this order.
Our role in the swap, either MAKER or TAKER.
The ticker symbol of the currency received.
The ticker symbol of the currency sent.
The hex-encoded preimage.
The price used for the swap.
Used in:
The maker order involved in this trade.
The taker order involved in this trade. Note that when a trade occurs from a remote peer filling one of our orders, we do not receive the order (only a swap request) and this field will be empty.
The payment hash involved in this trade.
The quantity transacted in this trade.
The trading pair for this trade.
The price used for the trade.
Our role in the trade.
The epoch time in milliseconds that this trade was executed
Whether this node was on the buy or sell side of the trade - or both in case of internal trades.
The counterparty to this trade, if applicable.
Used in:
Maximum outbound limit for a sell order denominated in satoshis.
Maximum inbound limit for a buy order denominated in satoshis.
The outbound amount reserved for open sell orders.
The inbound amount reserved for open buy orders.