Field | Type | Label | Description |
---|---|---|---|
base_currency | string | The base currency that is bought and sold for this trading pair. | |
quote_currency | string | The currency used to quote a price for the base currency. |
Field | Type | Label | Description |
---|---|---|---|
total_balance | uint64 | Total balance denominated in satoshis. | |
channel_balance | uint64 | Sum of confirmed channel balances denominated in satoshis. | |
pending_channel_balance | uint64 | Sum of pending channel balances denominated in satoshis. | |
inactive_channel_balance | uint64 | Sum of inactive channel balances denominated in satoshis. | |
wallet_balance | uint64 | Confirmed wallet balance in satoshis. | |
unconfirmed_wallet_balance | uint64 | Unconfirmed wallet balance in satoshis. |
Field | Type | Label | Description |
---|---|---|---|
node_identifier | string | The node pub key or alias of the node to ban. |
Field | Type | Label | Description |
---|---|---|---|
chain | string | The blockchain the swap client is on (eg bitcoin, litecoin) | |
network | string | The network the swap client is on (eg regtest, testnet, mainnet) |
Field | Type | Label | Description |
---|---|---|---|
new_password | string | ||
old_password | string |
Field | Type | Label | Description |
---|---|---|---|
active | uint32 | The number of active/online channels for this lnd instance that can be used for swaps. | |
inactive | uint32 | The number of inactive/offline channels for this lnd instance. | |
pending | uint32 | The number of channels that are pending on-chain confirmation before they can be used. | |
closed | uint32 | The number of channels that have been closed. |
Field | Type | Label | Description |
---|---|---|---|
node_identifier | string | The node pub key or alias of the peer with which to close any channels with. | |
currency | string | The ticker symbol of the currency of the channel to close. | |
force | bool | Whether to force close the channel in case the peer is offline or unresponsive. | |
destination | string | 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. | |
amount | uint64 | 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. | |
fee | uint64 | A manual fee rate set in sat/byte that should be used when crafting the closure transaction. |
Field | Type | Label | Description |
---|---|---|---|
transaction_ids | string | repeated | The id of the transaction per channel close. |
Field | Type | Label | Description |
---|---|---|---|
node_uri | string | The uri of the node to connect to in "[nodePubKey]@[host]:[port]" format. |
Field | Type | Label | Description |
---|---|---|---|
status | string | ||
address | string | ||
version | string | ||
chain | string |
Field | Type | Label | Description |
---|---|---|---|
password | string | The password in utf-8 with which to encrypt the new xud node key as well as any uninitialized underlying wallets. |
Field | Type | Label | Description |
---|---|---|---|
seed_mnemonic | string | repeated | The 24 word mnemonic to recover the xud identity key and underlying wallets |
initialized_lnds | string | repeated | The list of lnd clients that were initialized. |
initialized_connext | bool | Whether the connext wallet was initialized. |
Field | Type | Label | Description |
---|---|---|---|
currency | string | The ticker symbol for this currency such as BTC, LTC, ETH, etc... | |
swap_client | Currency.SwapClient | The payment channel network client to use for executing swaps. | |
token_address | string | The contract address for layered tokens such as ERC20. | |
decimal_places | uint32 | 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. |
Field | Type | Label | Description |
---|---|---|---|
currency | string | The ticker symbol of the currency to deposit. |
Field | Type | Label | Description |
---|---|---|---|
address | string | The address to use to deposit funds. |
Field | Type | Label | Description |
---|---|---|---|
node_identifier | string | The node pub key or alias of the peer to discover nodes from. |
Field | Type | Label | Description |
---|---|---|---|
num_nodes | uint32 |
Field | Type | Label | Description |
---|---|---|---|
order_id | string | The order id of the maker order. | |
pair_id | string | The trading pair of the swap orders. | |
peer_pub_key | string | The node pub key of the peer which owns the maker order. This is optional but helps locate the order more quickly. | |
quantity | uint64 | The quantity to swap denominated in satoshis. The whole order will be swapped if unspecified. |
Field | Type | Label | Description |
---|---|---|---|
currency | string | The ticker symbol of the currency to query for, if unspecified then balances for all supported currencies are queried. |
Field | Type | Label | Description |
---|---|---|---|
balances | GetBalanceResponse.BalancesEntry | repeated | A map between currency ticker symbols and their balances. |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | Balance |
Field | Type | Label | Description |
---|---|---|---|
version | string | The version of this instance of xud. | |
node_pub_key | string | The node pub key of this node. | |
uris | string | repeated | A list of uris that can be used to connect to this node. These are shared with peers. |
num_peers | uint32 | The number of currently connected peers. | |
num_pairs | uint32 | The number of supported trading pairs. | |
orders | OrdersCount | The number of active, standing orders in the order book. | |
lnd | GetInfoResponse.LndEntry | repeated | |
alias | string | The alias of this instance of xud. | |
network | string | The network of this node. | |
pending_swap_hashes | string | repeated | |
connext | ConnextInfo |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | LndInfo |
Field | Type | Label | Description |
---|---|---|---|
seed_mnemonic | string | repeated |
Field | Type | Label | Description |
---|---|---|---|
node_identifier | string | The node pub key or alias of the node for which to get information. |
Field | Type | Label | Description |
---|---|---|---|
reputationScore | sint32 | The node's reputation score. Points are subtracted for unexpected or potentially malicious behavior. Points are added when swaps are successfully executed. | |
banned | bool | Whether the node is currently banned. |
Field | Type | Label | Description |
---|---|---|---|
currencies | Currency | repeated | The list of available currencies in the orderbook. |
Field | Type | Label | Description |
---|---|---|---|
pair_id | string | The trading pair for which to retrieve orders. | |
owner | ListOrdersRequest.Owner | Whether only own, only peer or both orders should be included in result. | |
limit | uint32 | The maximum number of orders to return from each side of the order book. | |
include_aliases | bool | Whether to include the node aliases of owners of the orders. |
Field | Type | Label | Description |
---|---|---|---|
orders | ListOrdersResponse.OrdersEntry | repeated | A map between pair ids and their buy and sell orders. |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | Orders |
Field | Type | Label | Description |
---|---|---|---|
pairs | string | repeated | The list of supported trading pair tickers in formats like "LTC/BTC". |
Field | Type | Label | Description |
---|---|---|---|
peers | Peer | repeated | The list of connected peers. |
Field | Type | Label | Description |
---|---|---|---|
status | string | ||
channels | Channels | ||
chains | Chain | repeated | |
blockheight | uint32 | ||
uris | string | repeated | |
version | string | ||
alias | string |
Field | Type | Label | Description |
---|---|---|---|
node_pub_key | string | The pub key of this node | |
alias | string | An alias for this node deterministically generated from the pub key |
Field | Type | Label | Description |
---|---|---|---|
node_identifier | string | The node pub key or alias of the peer with which to open channel with. | |
currency | string | The ticker symbol of the currency to open the channel for. | |
amount | uint64 | The amount to be deposited into the channel denominated in satoshis. | |
push_amount | uint64 | The balance amount to be pushed to the remote side of the channel denominated in satoshis. | |
fee | uint64 | The manual fee rate set in sat/byte that should be used when crafting the funding transaction in the channel. |
Field | Type | Label | Description |
---|---|---|---|
transaction_id | string | The id of the transaction that opened the channel. |
Field | Type | Label | Description |
---|---|---|---|
price | double | The price of the order. | |
quantity | uint64 | The quantity of the order in satoshis. | |
pair_id | string | The trading pair that this order is for. | |
id | string | A UUID for this order. | |
node_identifier | NodeIdentifier | The identifier of the node that created this order. | |
local_id | string | The local id for this order, if applicable. | |
created_at | uint64 | The epoch time in milliseconds when this order was created. | |
side | OrderSide | Whether this order is a buy or sell | |
is_own_order | bool | Whether this order is a local own order or a remote peer order. | |
hold | uint64 | The quantity on hold pending swap execution. |
Field | Type | Label | Description |
---|---|---|---|
pair_id | string | The trading pair for which to retrieve orders. | |
precision | int32 | 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. | |
limit | uint32 | The maximum number of price "buckets" to return, if zero or unspecified then no limit is imposed. |
Field | Type | Label | Description |
---|---|---|---|
buckets | OrderBookResponse.BucketsEntry | repeated | A map between currency tickers and sorted lists of order buckets |
Field | Type | Label | Description |
---|---|---|---|
price | double | The rounded price of the bucket. | |
quantity | uint64 | The total quantity for all orders that fall into this bucket. |
Field | Type | Label | Description |
---|---|---|---|
sell_buckets | OrderBookResponse.Bucket | repeated | A sorted list of buckets for sell orders |
buy_buckets | OrderBookResponse.Bucket | repeated | A sorted list of buckets for buy orders. |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | OrderBookResponse.Buckets |
Field | Type | Label | Description |
---|---|---|---|
quantity | uint64 | The quantity removed from the order. | |
pair_id | string | The trading pair that the order is for. | |
order_id | string | The global UUID for the order. | |
local_id | string | The local id for the order, if applicable. | |
is_own_order | bool | Whether the order being removed is a local own order or a remote peer order. |
Field | Type | Label | Description |
---|---|---|---|
order | Order | An order that was added to the order book. | |
order_removal | OrderRemoval | An order (or portion thereof) that was removed from the order book. |
Field | Type | Label | Description |
---|---|---|---|
buy_orders | Order | repeated | A list of buy orders sorted by descending price. |
sell_orders | Order | repeated | A list of sell orders sorted by ascending price. |
Field | Type | Label | Description |
---|---|---|---|
peer | uint32 | The number of orders belonging to remote xud nodes. | |
own | uint32 | The number of orders belonging to our local xud node. |
Field | Type | Label | Description |
---|---|---|---|
address | string | The socket address with host and port for this peer. | |
node_pub_key | string | The node pub key to uniquely identify this peer. | |
lnd_pub_keys | Peer.LndPubKeysEntry | repeated | A map of ticker symbols to lnd pub keys for this peer |
inbound | bool | Indicates whether this peer was connected inbound. | |
pairs | string | repeated | A list of trading pair tickers supported by this peer. |
xud_version | string | The version of xud being used by the peer. | |
seconds_connected | uint32 | The time in seconds that we have been connected to this peer. | |
alias | string | The alias for this peer's public key | |
lnd_uris | Peer.LndUris | repeated | |
connext_identifier | string | The connext identifier for this peer |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | string |
A map of ticker symbols to lnd uris for this peer
Field | Type | Label | Description |
---|---|---|---|
currency | string | ||
uri | string | repeated |
Field | Type | Label | Description |
---|---|---|---|
match | Order | An order (or portion thereof) that matched the newly placed order. | |
swap_success | SwapSuccess | A successful swap of a peer order that matched the newly placed order. | |
remaining_order | Order | The remaining portion of the order, after matches, that enters the order book. | |
swap_failure | SwapFailure | A swap attempt that failed. |
Field | Type | Label | Description |
---|---|---|---|
price | double | The price of the order. | |
quantity | uint64 | The quantity of the order denominated in satoshis. | |
pair_id | string | The trading pair that the order is for. | |
order_id | string | The local id to assign to the order. | |
side | OrderSide | Whether the order is a buy or sell. | |
replace_order_id | string | 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. | |
immediate_or_cancel | bool | Whether the order must be filled immediately and not allowed to enter the order book. |
Field | Type | Label | Description |
---|---|---|---|
internal_matches | Order | repeated | A list of own orders (or portions thereof) that matched the newly placed order. |
swap_successes | SwapSuccess | repeated | A list of successful swaps of peer orders that matched the newly placed order. |
remaining_order | Order | The remaining portion of the order, after matches, that enters the order book. | |
swap_failures | SwapFailure | repeated | A list of swap attempts that failed. |
Field | Type | Label | Description |
---|---|---|---|
removed_order_ids | string | repeated | The local order ids that were successfully removed. |
on_hold_order_ids | string | repeated | The local order ids that were on hold and failed to be removed. |
Field | Type | Label | Description |
---|---|---|---|
currency | string | The ticker symbol for this currency such as BTC, LTC, ETH, etc... |
Field | Type | Label | Description |
---|---|---|---|
order_id | string | The local id of the order to remove. | |
quantity | uint64 | The quantity to remove from the order denominated in satoshis. If zero or unspecified then the entire order is removed. |
Field | Type | Label | Description |
---|---|---|---|
quantity_on_hold | uint64 | 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_quantity | uint64 | Remaining portion of the order if it was a partial removal. | |
removed_quantity | uint64 | Successfully removed portion of the order. | |
pair_id | string | Removed order's pairId. (e.g. ETH/BTC) |
Field | Type | Label | Description |
---|---|---|---|
pair_id | string | The trading pair ticker to remove in a format such as "LTC/BTC". |
Field | Type | Label | Description |
---|---|---|---|
seed_mnemonic | string | repeated | The 24 word mnemonic to recover the xud identity key and underlying wallets |
password | string | The password in utf-8 with which to encrypt the restored xud node key as well as any restored underlying wallets. | |
lnd_backups | RestoreNodeRequest.LndBackupsEntry | repeated | A map between the currency of the LND and its multi channel SCB |
xud_database | bytes | The XUD database backup |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | bytes |
Field | Type | Label | Description |
---|---|---|---|
restored_lnds | string | repeated | The list of lnd clients that were initialized. |
restored_connext | bool | Whether the connext wallet was initialized. |
Field | Type | Label | Description |
---|---|---|---|
log_level | LogLevel |
Field | Type | Label | Description |
---|---|---|---|
existing | bool | Whether to transmit all existing active orders upon establishing the stream. |
Field | Type | Label | Description |
---|---|---|---|
include_taker | bool | 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. |
Field | Type | Label | Description |
---|---|---|---|
order_id | string | The global UUID for the order that was accepted to be swapped. | |
local_id | string | The local id for the order that was accepted to be swapped. | |
pair_id | string | The trading pair that the swap is for. | |
quantity | uint64 | The order quantity that was accepted to be swapped. | |
price | double | The price for the swap. | |
peer_pub_key | string | The node pub key of the peer that executed this order. | |
r_hash | string | The hex-encoded payment hash for the swap. | |
amount_receiving | uint64 | The amount received denominated in satoshis. | |
amount_sending | uint64 | The amount sent denominated in satoshis. | |
currency_receiving | string | The ticker symbol of the currency received. | |
currency_sending | string | The ticker symbol of the currency sent. |
Field | Type | Label | Description |
---|---|---|---|
order_id | string | The global UUID for the order that failed the swap. | |
pair_id | string | The trading pair that the swap is for. | |
quantity | uint64 | The order quantity that was attempted to be swapped. | |
peer_pub_key | string | The node pub key of the peer that we attempted to swap with. | |
failure_reason | string | The reason why the swap failed. |
Field | Type | Label | Description |
---|---|---|---|
order_id | string | The global UUID for the order that was swapped. | |
local_id | string | The local id for the order that was swapped. | |
pair_id | string | The trading pair that the swap is for. | |
quantity | uint64 | The order quantity that was swapped. | |
r_hash | string | The hex-encoded payment hash for the swap. | |
amount_received | uint64 | The amount received denominated in satoshis. | |
amount_sent | uint64 | The amount sent denominated in satoshis. | |
peer_pub_key | string | The node pub key of the peer that executed this order. | |
role | Role | Our role in the swap, either MAKER or TAKER. | |
currency_received | string | The ticker symbol of the currency received. | |
currency_sent | string | The ticker symbol of the currency sent. | |
r_preimage | string | The hex-encoded preimage. | |
price | double | The price used for the swap. |
Field | Type | Label | Description |
---|---|---|---|
maker_order | Order | The maker order involved in this trade. | |
taker_order | Order | 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. | |
r_hash | string | The payment hash involved in this trade. | |
quantity | uint64 | The quantity transacted in this trade. | |
pair_id | string | The trading pair for this trade. | |
price | double | The price used for the trade. | |
role | Role | Our role in the trade. | |
executed_at | uint64 | The epoch time in milliseconds that this trade was executed | |
side | OrderSide | Whether this node was on the buy or sell side of the trade - or both in case of internal trades. | |
counterparty | NodeIdentifier | The counterparty to this trade, if applicable. |
Field | Type | Label | Description |
---|---|---|---|
limit | uint32 | The maximum number of trades to return |
Field | Type | Label | Description |
---|---|---|---|
trades | Trade | repeated |
Field | Type | Label | Description |
---|---|---|---|
max_sell | uint64 | Maximum outbound limit for a sell order denominated in satoshis. | |
max_buy | uint64 | Maximum inbound limit for a buy order denominated in satoshis. | |
reserved_sell | uint64 | The outbound amount reserved for open sell orders. | |
reserved_buy | uint64 | The inbound amount reserved for open buy orders. |
Field | Type | Label | Description |
---|---|---|---|
currency | string | The ticker symbol of the currency to query for, if unspecified then trading limits for all supported currencies are queried. |
Field | Type | Label | Description |
---|---|---|---|
limits | TradingLimitsResponse.LimitsEntry | repeated | A map between currency ticker symbols and their trading limits. |
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | TradingLimits |
Field | Type | Label | Description |
---|---|---|---|
node_identifier | string | The node pub key or alias of the peer to unban. | |
reconnect | bool | Whether to attempt to connect to the peer after it is unbanned. |
Field | Type | Label | Description |
---|---|---|---|
password | string | The password in utf-8 with which to unlock an existing xud node key as well as underlying client wallets such as lnd. |
Field | Type | Label | Description |
---|---|---|---|
unlocked_lnds | string | repeated | The list of lnd clients that were unlocked. |
locked_lnds | string | repeated | The list of lnd clients that could not be unlocked. |
Field | Type | Label | Description |
---|---|---|---|
currency | string | The ticker symbol of the currency to withdraw. | |
destination | string | The address to withdraw funds to. | |
amount | uint64 | The amount to withdraw denominated in satoshis | |
all | bool | Whether to withdraw all available funds for this currency. If true, the amount field is ignored. | |
fee | uint32 | The fee to use for the withdrawal transaction denominated in satoshis per byte. |
Field | Type | Label | Description |
---|---|---|---|
transaction_id | string | The id of the withdrawal transaction. |
Name | Number | Description |
---|---|---|
LND | 0 | |
CONNEXT | 2 |
Name | Number | Description |
---|---|---|
BOTH | 0 | |
OWN | 1 | |
PEER | 2 |
Name | Number | Description |
---|---|---|
ALERT | 0 | |
ERROR | 1 | |
WARN | 2 | |
INFO | 3 | |
VERBOSE | 4 | |
DEBUG | 5 | |
TRACE | 6 |
Name | Number | Description |
---|---|---|
BUY | 0 | |
SELL | 1 | |
BOTH | 2 |
Name | Number | Description |
---|---|---|
TAKER | 0 | |
MAKER | 1 | |
INTERNAL | 2 |
The primary service for interacting with a running xud node.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
AddCurrency | Currency | AddCurrencyResponse | 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] |
AddPair | AddPairRequest | AddPairResponse | 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> |
Ban | BanRequest | BanResponse | 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> |
ChangePassword | ChangePasswordRequest | ChangePasswordResponse | Changes the xud master password, including the wallet passwords for any underlying clients. shell: xucli changepass |
CloseChannel | CloseChannelRequest | CloseChannelResponse | Closes any existing payment channels with a peer for the specified currency. shell: xucli closechannel <currency> [node_identifier ] [--force] |
Connect | ConnectRequest | ConnectResponse | 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> |
WalletDeposit | DepositRequest | DepositResponse | Gets an address to deposit a given currency into the xud wallets. shell: xucli walletdeposit <currency> |
Deposit | DepositRequest | DepositResponse | Gets an address to deposit a given currency directly into a channel. shell: xucli deposit <currency> |
DiscoverNodes | DiscoverNodesRequest | DiscoverNodesResponse | Discover nodes from a specific peer and apply new connections |
GetBalance | GetBalanceRequest | GetBalanceResponse | Gets the total balance available across all payment channels and wallets for one or all currencies. shell: xucli getbalance [currency] |
GetInfo | GetInfoRequest | GetInfoResponse | Gets general information about this node. shell: xucli getinfo |
GetMnemonic | GetMnemonicRequest | GetMnemonicResponse | Gets the master seed mnemonic . shell: xucli getnemonic |
GetNodeInfo | GetNodeInfoRequest | GetNodeInfoResponse | Gets general information about a node. shell: xucli getnodeinfo <node_identifier> |
ListOrders | ListOrdersRequest | ListOrdersResponse | 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] |
ListCurrencies | ListCurrenciesRequest | ListCurrenciesResponse | Gets a list of this node's supported currencies. shell: xucli listcurrencies |
ListPairs | ListPairsRequest | ListPairsResponse | Gets a list of this nodes suported trading pairs. shell: xucli listpairs |
ListPeers | ListPeersRequest | ListPeersResponse | Gets a list of connected peers. shell: xucli listpeers |
OpenChannel | OpenChannelRequest | OpenChannelResponse | Opens a payment channel to a peer for the specified amount and currency. shell: xucli openchannel <currency> <amount> [node_identifier] [push_amount] |
OrderBook | OrderBookRequest | OrderBookResponse | 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] |
PlaceOrder | PlaceOrderRequest | PlaceOrderEvent stream | Adds an order to the order book. If price is zero or unspecified a market order will get added. |
PlaceOrderSync | PlaceOrderRequest | PlaceOrderResponse | 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] |
ExecuteSwap | ExecuteSwapRequest | SwapSuccess | Executes a swap on a maker peer order. |
RemoveCurrency | RemoveCurrencyRequest | RemoveCurrencyResponse | 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> |
RemoveOrder | RemoveOrderRequest | RemoveOrderResponse | 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] |
RemoveAllOrders | RemoveAllOrdersRequest | RemoveAllOrdersResponse | 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 |
RemovePair | RemovePairRequest | RemovePairResponse | 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> |
SetLogLevel | SetLogLevelRequest | SetLogLevelResponse | Set the logging level. shell: xucli loglevel <level> |
Shutdown | ShutdownRequest | ShutdownResponse | Begin gracefully shutting down xud. shell: xucli shutdown |
SubscribeOrders | SubscribeOrdersRequest | OrderUpdate stream | 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. |
SubscribeSwapFailures | SubscribeSwapsRequest | SwapFailure stream | 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. |
SubscribeSwaps | SubscribeSwapsRequest | SwapSuccess stream | 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. |
SubscribeSwapsAccepted | SubscribeSwapsAcceptedRequest | SwapAccepted stream | 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. |
TradeHistory | TradeHistoryRequest | TradeHistoryResponse | Gets a list of completed trades. shell: xucli tradehistory [limit] |
TradingLimits | TradingLimitsRequest | TradingLimitsResponse | Gets the trading limits for one or all currencies. shell: xucli tradinglimits [currency] |
Unban | UnbanRequest | UnbanResponse | Removes a ban from a node manually and, optionally, attempts to connect to it. shell: xucli unban <node_identifier> [reconnect] |
WalletWithdraw | WithdrawRequest | WithdrawResponse | Withdraws a given currency from the xud wallets to a specified address. shell: xucli withdraw [amount] [currency] <destination> [fee] |
A service for interacting with a locked or uninitalized xud node.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
CreateNode | CreateNodeRequest | CreateNodeResponse | 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 |
RestoreNode | RestoreNodeRequest | RestoreNodeResponse | Restores an xud instance and underlying wallets from a seed. shell: xucli restore [backup_directory] |
UnlockNode | UnlockNodeRequest | UnlockNodeResponse | Unlocks and decrypts the xud node key and any underlying wallets. shell: xucli unlock |
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
---|---|---|---|---|---|---|---|---|
double | double | double | float | float64 | double | float | Float | |
float | float | float | float | float32 | float | float | Float | |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |