{
  "swagger": "2.0",
  "info": {
    "title": "xudrpc.proto",
    "version": "version not set"
  },
  "schemes": [
    "http",
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/addcurrency": {
      "post": {
        "summary": "Adds a currency to the list of supported currencies. Once added, the currency may be used for\nnew trading pairs.\nshell: xucli addcurrency \u003ccurrency\u003e \u003cswap_client\u003e [decimal_places] [token_address]",
        "operationId": "AddCurrency",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcAddCurrencyResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcCurrency"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/addpair": {
      "post": {
        "summary": "Adds a trading pair to the list of supported trading pairs. The newly supported pair is\nadvertised to peers so they may begin sending orders for it.\nshell: xucli addpair \u003cbase_currency\u003e \u003cquote_currency\u003e",
        "operationId": "AddPair",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcAddPairResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcAddPairRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/balance": {
      "get": {
        "summary": "Gets the total balance available across all payment channels and wallets for one or all currencies.\nshell: xucli getbalance [currency]",
        "operationId": "GetBalance",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcGetBalanceResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "currency",
            "description": "The ticker symbol of the currency to query for, if unspecified then balances for all supported\ncurrencies are queried.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/ban": {
      "post": {
        "summary": "Bans a node and immediately disconnects from it. This can be used to prevent any connections\nto a specific node.\nshell: xucli ban \u003cnode_identifier\u003e",
        "operationId": "Ban",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcBanResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcBanRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/changepass": {
      "post": {
        "summary": "Changes the xud master password, including the wallet passwords for any underlying clients.\nshell: xucli changepass",
        "operationId": "ChangePassword",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcChangePasswordResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/closechannel": {
      "post": {
        "summary": "Closes any existing payment channels with a peer for the specified currency.\nshell: xucli closechannel \u003ccurrency\u003e [node_identifier ] [--force]",
        "operationId": "CloseChannel",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcCloseChannelResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/connect": {
      "post": {
        "summary": "Attempts to connect to a node. Once connected, the node is added to the list of peers and\nbecomes available for swaps and trading. A handshake exchanges information about the peer's\nsupported trading and swap clients. Orders will be shared with the peer upon connection and\nupon new order placements.\nshell: xucli connect \u003cnode_uri\u003e",
        "operationId": "Connect",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcConnectResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcConnectRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/currencies": {
      "get": {
        "summary": "Gets a list of this node's supported currencies.\nshell: xucli listcurrencies",
        "operationId": "ListCurrencies",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcListCurrenciesResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/discovernodes": {
      "post": {
        "summary": "Discover nodes from a specific peer and apply new connections",
        "operationId": "DiscoverNodes",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcDiscoverNodesResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcDiscoverNodesRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/eth-mnemonic": {
      "get": {
        "summary": "Gets the ETH account mnemonic .\nshell: xucli getnemonic",
        "operationId": "GetETHMnemonic",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcGetEthMnemonicResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/executeswap": {
      "post": {
        "summary": "Executes a swap on a maker peer order.",
        "operationId": "ExecuteSwap",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcSwapSuccess"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcExecuteSwapRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/info": {
      "get": {
        "summary": "Gets general information about this node.\nshell: xucli getinfo",
        "operationId": "GetInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcGetInfoResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/mnemonic": {
      "get": {
        "summary": "Gets the master seed mnemonic .\nshell: xucli getnemonic",
        "operationId": "GetMnemonic",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcGetMnemonicResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/nodeinfo": {
      "get": {
        "summary": "Gets general information about a node.\nshell: xucli getnodeinfo \u003cnode_identifier\u003e",
        "operationId": "GetNodeInfo",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcGetNodeInfoResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "node_identifier",
            "description": "The node pub key or alias of the node for which to get information.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/openchannel": {
      "post": {
        "summary": "Opens a payment channel to a peer for the specified amount and currency.\nshell: xucli openchannel \u003ccurrency\u003e \u003camount\u003e [node_identifier] [push_amount]",
        "operationId": "OpenChannel",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcOpenChannelResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/orders": {
      "get": {
        "summary": "Gets orders from the order book. This call returns the state of the order book at a given point\nin time, although it is not guaranteed to still be vaild by the time a response is received\nand processed by a client. It accepts an optional trading pair id parameter. If specified, only\norders for that particular trading pair are returned. Otherwise, all orders are returned. Orders\nare separated into buys and sells for each trading pair, but unsorted.\nshell: xucli listorders [pair_id] [include_own_orders] [limit]",
        "operationId": "ListOrders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcListOrdersResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "pair_id",
            "description": "The trading pair for which to retrieve orders.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "owner",
            "description": "Whether only own, only peer or both orders should be included in result.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "BOTH",
              "OWN",
              "PEER"
            ],
            "default": "BOTH"
          },
          {
            "name": "limit",
            "description": "The maximum number of orders to return from each side of the order book.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "include_aliases",
            "description": "Whether to include the node aliases of owners of the orders.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/pairs": {
      "get": {
        "summary": "Gets a list of this nodes suported trading pairs.\nshell: xucli listpairs",
        "operationId": "ListPairs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcListPairsResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/peers": {
      "get": {
        "summary": "Gets a list of connected peers.\nshell: xucli listpeers",
        "operationId": "ListPeers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcListPeersResponse"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/placeorder": {
      "post": {
        "summary": "Adds an order to the order book.\nIf price is zero or unspecified a market order will get added.",
        "operationId": "PlaceOrder",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/xudrpcPlaceOrderEvent"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcPlaceOrderRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/placeordersync": {
      "post": {
        "summary": "The synchronous, non-streaming version of PlaceOrder.\nshell: xucli buy \u003cquantity\u003e \u003cpair_id\u003e \u003cprice\u003e [order_id] [stream]\nshell: xucli sell \u003cquantity\u003e \u003cpair_id\u003e \u003cprice\u003e [order_id] [stream]",
        "operationId": "PlaceOrderSync",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcPlaceOrderResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcPlaceOrderRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/removeallorders": {
      "post": {
        "summary": "Removes all orders from the order book. Removed orders become immediately unavailable for swaps,\nand peers are notified that the orders are no longer valid. Any portion of the orders that is\non hold due to ongoing swaps will not be removed until after the swap attempts complete.\nshell: xucli removeallorders",
        "operationId": "RemoveAllOrders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcRemoveAllOrdersResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcRemoveAllOrdersRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/removecurrency": {
      "post": {
        "summary": "Removes a currency from the list of supported currencies. Only currencies that are not in use\nfor any currently supported trading pairs may be removed. Once removed, the currency can no\nlonger be used for any supported trading pairs.\nshell: xucli removecurrency \u003ccurrency\u003e",
        "operationId": "RemoveCurrency",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcRemoveCurrencyResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcRemoveCurrencyRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/removeorder": {
      "post": {
        "summary": "Removes an order from the order book by its local id. This should be called when an order is\ncanceled or filled outside of xud. Removed orders become immediately unavailable for swaps,\nand peers are notified that the order is no longer valid. Any portion of the order that is\non hold due to ongoing swaps will not be removed until after the swap attempts complete.\nshell: xucli removeorder \u003corder_id\u003e [quantity]",
        "operationId": "RemoveOrder",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcRemoveOrderResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcRemoveOrderRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/removepair": {
      "post": {
        "summary": "Removes a trading pair from the list of currently supported trading pair. This call will\neffectively cancel any standing orders for that trading pair. Peers are informed when a pair\nis no longer supported so that they will know to stop sending orders for it.\nshell: xucli removepair \u003cpair_id\u003e",
        "operationId": "RemovePair",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcRemovePairResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcRemovePairRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/setloglevel": {
      "post": {
        "summary": "Set the logging level.\nshell: xucli loglevel \u003clevel\u003e",
        "operationId": "SetLogLevel",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcSetLogLevelResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcSetLogLevelRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/shutdown": {
      "post": {
        "summary": "Begin gracefully shutting down xud.\nshell: xucli shutdown",
        "operationId": "Shutdown",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcShutdownResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcShutdownRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/subscribeorders": {
      "get": {
        "summary": "Subscribes to orders being added to and removed from the order book. This call allows the client\nto maintain an up-to-date view of the order book. For example, an exchange that wants to show\nits users a real time view of the orders available to them would subscribe to this streaming\ncall to be alerted as new orders are added and expired orders are removed.",
        "operationId": "SubscribeOrders",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/xudrpcOrderUpdate"
            }
          }
        },
        "parameters": [
          {
            "name": "existing",
            "description": "Whether to transmit all existing active orders upon establishing the stream.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/subscribeswapfailures": {
      "get": {
        "summary": "Subscribes to failed swaps. By default, only swaps that are initiated by a remote peer are\ntransmitted unless a flag is set to include swaps initiated by the local node. This call allows\nthe client to get real-time notifications when swap attempts are failing. It can be used for\nstatus monitoring, debugging, and testing purposes.",
        "operationId": "SubscribeSwapFailures",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/xudrpcSwapFailure"
            }
          }
        },
        "parameters": [
          {
            "name": "include_taker",
            "description": "Whether to include the results for swaps initiated via the PlaceOrder or ExecuteSwap calls.\nThese swap results are also returned in the responses for the respective calls.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/subscribeswaps": {
      "get": {
        "summary": "Subscribes to completed swaps. By default, only swaps that are initiated by a remote peer are\ntransmitted unless a flag is set to include swaps initiated by the local node. This call allows\nthe client to get real-time notifications when its orders are filled by a peer. It can be used\nfor tracking order executions, updating balances, and informing a trader when one of their orders\nis settled through the Exchange Union network.",
        "operationId": "SubscribeSwaps",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/xudrpcSwapSuccess"
            }
          }
        },
        "parameters": [
          {
            "name": "include_taker",
            "description": "Whether to include the results for swaps initiated via the PlaceOrder or ExecuteSwap calls.\nThese swap results are also returned in the responses for the respective calls.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/subscribeswapsaccepted": {
      "get": {
        "summary": "Subscribes to accepted swaps. This stream emits a message when the local xud node \naccepts a swap request from a peer, but before the swap has actually succeeded.",
        "operationId": "SubscribeSwapsAccepted",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/xudrpcSwapAccepted"
            }
          }
        },
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/tradehistory": {
      "post": {
        "summary": "Gets a list of completed trades.\nshell: xucli tradehistory [limit]",
        "operationId": "TradeHistory",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcTradeHistoryResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcTradeHistoryRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/tradinglimits": {
      "get": {
        "summary": "Gets the trading limits for one or all currencies.\nshell: xucli tradinglimits [currency]",
        "operationId": "TradingLimits",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcTradingLimitsResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "currency",
            "description": "The ticker symbol of the currency to query for, if unspecified then trading limits for all supported\ncurrencies are queried.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/unban": {
      "post": {
        "summary": "Removes a ban from a node manually and, optionally, attempts to connect to it.\nshell: xucli unban \u003cnode_identifier\u003e [reconnect]",
        "operationId": "Unban",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcUnbanResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcUnbanRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/walletdeposit": {
      "post": {
        "summary": "Gets an address to deposit a given currency into the xud wallets.\nshell: xucli walletdeposit \u003ccurrency\u003e",
        "operationId": "WalletDeposit",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcDepositResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcDepositRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    },
    "/v1/walletwithdraw": {
      "post": {
        "summary": "Withdraws a given currency from the xud wallets to a specified address.\nshell: xucli withdraw [amount] [currency] \u003cdestination\u003e [fee]",
        "operationId": "WalletWithdraw",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/xudrpcWithdrawResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/xudrpcWithdrawRequest"
            }
          }
        ],
        "tags": [
          "Xud"
        ]
      }
    }
  },
  "definitions": {
    "CurrencySwapClient": {
      "type": "string",
      "enum": [
        "LND",
        "CONNEXT"
      ],
      "default": "LND"
    },
    "ListOrdersRequestOwner": {
      "type": "string",
      "enum": [
        "BOTH",
        "OWN",
        "PEER"
      ],
      "default": "BOTH"
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "type_url": {
          "type": "string"
        },
        "value": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "runtimeStreamError": {
      "type": "object",
      "properties": {
        "grpc_code": {
          "type": "integer",
          "format": "int32"
        },
        "http_code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "http_status": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "xudrpcAddCurrencyResponse": {
      "type": "object"
    },
    "xudrpcAddPairRequest": {
      "type": "object",
      "properties": {
        "base_currency": {
          "type": "string",
          "description": "The base currency that is bought and sold for this trading pair."
        },
        "quote_currency": {
          "type": "string",
          "description": "The currency used to quote a price for the base currency."
        }
      }
    },
    "xudrpcAddPairResponse": {
      "type": "object"
    },
    "xudrpcBalance": {
      "type": "object",
      "properties": {
        "total_balance": {
          "type": "string",
          "format": "uint64",
          "description": "Total balance denominated in satoshis."
        },
        "channel_balance": {
          "type": "string",
          "format": "uint64",
          "description": "Sum of confirmed channel balances denominated in satoshis."
        },
        "pending_channel_balance": {
          "type": "string",
          "format": "uint64",
          "description": "Sum of pending channel balances denominated in satoshis."
        },
        "inactive_channel_balance": {
          "type": "string",
          "format": "uint64",
          "description": "Sum of inactive channel balances denominated in satoshis."
        },
        "wallet_balance": {
          "type": "string",
          "format": "uint64",
          "description": "Confirmed wallet balance in satoshis."
        },
        "unconfirmed_wallet_balance": {
          "type": "string",
          "format": "uint64",
          "description": "Unconfirmed wallet balance in satoshis."
        }
      }
    },
    "xudrpcBanRequest": {
      "type": "object",
      "properties": {
        "node_identifier": {
          "type": "string",
          "description": "The node pub key or alias of the node to ban."
        }
      }
    },
    "xudrpcBanResponse": {
      "type": "object"
    },
    "xudrpcChain": {
      "type": "object",
      "properties": {
        "chain": {
          "type": "string",
          "title": "The blockchain the swap client is on (eg bitcoin, litecoin)"
        },
        "network": {
          "type": "string",
          "title": "The network the swap client is on (eg regtest, testnet, mainnet)"
        }
      }
    },
    "xudrpcChangePasswordResponse": {
      "type": "object"
    },
    "xudrpcChannels": {
      "type": "object",
      "properties": {
        "active": {
          "type": "integer",
          "format": "int64",
          "description": "The number of active/online channels for this lnd instance that can be used for swaps."
        },
        "inactive": {
          "type": "integer",
          "format": "int64",
          "description": "The number of inactive/offline channels for this lnd instance."
        },
        "pending": {
          "type": "integer",
          "format": "int64",
          "description": "The number of channels that are pending on-chain confirmation before they can be used."
        },
        "closed": {
          "type": "integer",
          "format": "int64",
          "description": "The number of channels that have been closed."
        }
      }
    },
    "xudrpcCloseChannelResponse": {
      "type": "object",
      "properties": {
        "transaction_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The id of the transaction per channel close."
        }
      }
    },
    "xudrpcConnectRequest": {
      "type": "object",
      "properties": {
        "node_uri": {
          "type": "string",
          "description": "The uri of the node to connect to in \"[nodePubKey]@[host]:[port]\" format."
        }
      }
    },
    "xudrpcConnectResponse": {
      "type": "object"
    },
    "xudrpcConnextInfo": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "chain": {
          "type": "string"
        }
      }
    },
    "xudrpcCreateNodeResponse": {
      "type": "object",
      "properties": {
        "seed_mnemonic": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "The 24 word mnemonic to recover the xud identity key and underlying wallets"
        },
        "initialized_lnds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of lnd clients that were initialized."
        },
        "initialized_connext": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether the connext wallet was initialized."
        }
      }
    },
    "xudrpcCurrency": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "description": "The ticker symbol for this currency such as BTC, LTC, ETH, etc..."
        },
        "swap_client": {
          "$ref": "#/definitions/CurrencySwapClient",
          "description": "The payment channel network client to use for executing swaps."
        },
        "token_address": {
          "type": "string",
          "description": "The contract address for layered tokens such as ERC20."
        },
        "decimal_places": {
          "type": "integer",
          "format": "int64",
          "description": "The number of places to the right of the decimal point of the smallest subunit of the currency.\nFor example, BTC, LTC, and others where the smallest subunits (satoshis) are 0.00000001 full\nunits (bitcoins) have 8 decimal places. ETH has 18. This can be thought of as the base 10\nexponent of the smallest subunit expressed as a positive integer. A default value of 8 is\nused if unspecified."
        }
      }
    },
    "xudrpcDepositRequest": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "description": "The ticker symbol of the currency to deposit."
        }
      }
    },
    "xudrpcDepositResponse": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "description": "The address to use to deposit funds."
        }
      }
    },
    "xudrpcDiscoverNodesRequest": {
      "type": "object",
      "properties": {
        "node_identifier": {
          "type": "string",
          "description": "The node pub key or alias of the peer to discover nodes from."
        }
      }
    },
    "xudrpcDiscoverNodesResponse": {
      "type": "object",
      "properties": {
        "num_nodes": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "xudrpcExecuteSwapRequest": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "description": "The order id of the maker order."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair of the swap orders."
        },
        "peer_pub_key": {
          "type": "string",
          "description": "The node pub key of the peer which owns the maker order. This is optional but helps locate the order more quickly."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity to swap denominated in satoshis. The whole order will be swapped if unspecified."
        }
      }
    },
    "xudrpcGetBalanceResponse": {
      "type": "object",
      "properties": {
        "balances": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/xudrpcBalance"
          },
          "description": "A map between currency ticker symbols and their balances."
        }
      }
    },
    "xudrpcGetEthMnemonicResponse": {
      "type": "object",
      "properties": {
        "seed_mnemonic": {
          "type": "string"
        }
      }
    },
    "xudrpcGetInfoResponse": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "The version of this instance of xud."
        },
        "node_pub_key": {
          "type": "string",
          "description": "The node pub key of this node."
        },
        "uris": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of uris that can be used to connect to this node. These are shared with peers."
        },
        "num_peers": {
          "type": "integer",
          "format": "int64",
          "description": "The number of currently connected peers."
        },
        "num_pairs": {
          "type": "integer",
          "format": "int64",
          "description": "The number of supported trading pairs."
        },
        "orders": {
          "$ref": "#/definitions/xudrpcOrdersCount",
          "description": "The number of active, standing orders in the order book."
        },
        "lnd": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/xudrpcLndInfo"
          }
        },
        "alias": {
          "type": "string",
          "description": "The alias of this instance of xud."
        },
        "network": {
          "type": "string",
          "description": "The network of this node."
        },
        "pending_swap_hashes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "connext": {
          "$ref": "#/definitions/xudrpcConnextInfo"
        }
      }
    },
    "xudrpcGetMnemonicResponse": {
      "type": "object",
      "properties": {
        "seed_mnemonic": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "xudrpcGetNodeInfoResponse": {
      "type": "object",
      "properties": {
        "reputationScore": {
          "type": "integer",
          "format": "int32",
          "description": "The node's reputation score. Points are subtracted for unexpected or potentially malicious\nbehavior. Points are added when swaps are successfully executed."
        },
        "banned": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether the node is currently banned."
        }
      }
    },
    "xudrpcListCurrenciesResponse": {
      "type": "object",
      "properties": {
        "currencies": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcCurrency"
          },
          "description": "The list of available currencies in the orderbook."
        }
      }
    },
    "xudrpcListOrdersResponse": {
      "type": "object",
      "properties": {
        "orders": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/xudrpcOrders"
          },
          "description": "A map between pair ids and their buy and sell orders."
        }
      }
    },
    "xudrpcListPairsResponse": {
      "type": "object",
      "properties": {
        "pairs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of supported trading pair tickers in formats like \"LTC/BTC\"."
        }
      }
    },
    "xudrpcListPeersResponse": {
      "type": "object",
      "properties": {
        "peers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcPeer"
          },
          "description": "The list of connected peers."
        }
      }
    },
    "xudrpcLndInfo": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "channels": {
          "$ref": "#/definitions/xudrpcChannels"
        },
        "chains": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcChain"
          }
        },
        "blockheight": {
          "type": "integer",
          "format": "int64"
        },
        "uris": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "version": {
          "type": "string"
        },
        "alias": {
          "type": "string"
        }
      }
    },
    "xudrpcLogLevel": {
      "type": "string",
      "enum": [
        "ALERT",
        "ERROR",
        "WARN",
        "INFO",
        "VERBOSE",
        "DEBUG",
        "TRACE"
      ],
      "default": "ALERT"
    },
    "xudrpcNodeIdentifier": {
      "type": "object",
      "properties": {
        "node_pub_key": {
          "type": "string",
          "title": "The pub key of this node"
        },
        "alias": {
          "type": "string",
          "title": "An alias for this node deterministically generated from the pub key"
        }
      }
    },
    "xudrpcOpenChannelResponse": {
      "type": "object",
      "properties": {
        "transaction_id": {
          "type": "string",
          "description": "The id of the transaction that opened the channel."
        }
      }
    },
    "xudrpcOrder": {
      "type": "object",
      "properties": {
        "price": {
          "type": "number",
          "format": "double",
          "description": "The price of the order."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity of the order in satoshis."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair that this order is for."
        },
        "id": {
          "type": "string",
          "description": "A UUID for this order."
        },
        "node_identifier": {
          "$ref": "#/definitions/xudrpcNodeIdentifier",
          "description": "The identifier of the node that created this order."
        },
        "local_id": {
          "type": "string",
          "description": "The local id for this order, if applicable."
        },
        "created_at": {
          "type": "string",
          "format": "uint64",
          "description": "The epoch time in milliseconds when this order was created."
        },
        "side": {
          "$ref": "#/definitions/xudrpcOrderSide",
          "title": "Whether this order is a buy or sell"
        },
        "is_own_order": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether this order is a local own order or a remote peer order."
        },
        "hold": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity on hold pending swap execution."
        }
      }
    },
    "xudrpcOrderRemoval": {
      "type": "object",
      "properties": {
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity removed from the order."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair that the order is for."
        },
        "order_id": {
          "type": "string",
          "description": "The global UUID for the order."
        },
        "local_id": {
          "type": "string",
          "description": "The local id for the order, if applicable."
        },
        "is_own_order": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether the order being removed is a local own order or a remote peer order."
        }
      }
    },
    "xudrpcOrderSide": {
      "type": "string",
      "enum": [
        "BUY",
        "SELL",
        "BOTH"
      ],
      "default": "BUY"
    },
    "xudrpcOrderUpdate": {
      "type": "object",
      "properties": {
        "order": {
          "$ref": "#/definitions/xudrpcOrder",
          "description": "An order that was added to the order book."
        },
        "order_removal": {
          "$ref": "#/definitions/xudrpcOrderRemoval",
          "description": "An order (or portion thereof) that was removed from the order book."
        }
      }
    },
    "xudrpcOrders": {
      "type": "object",
      "properties": {
        "buy_orders": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcOrder"
          },
          "description": "A list of buy orders sorted by descending price."
        },
        "sell_orders": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcOrder"
          },
          "description": "A list of sell orders sorted by ascending price."
        }
      }
    },
    "xudrpcOrdersCount": {
      "type": "object",
      "properties": {
        "peer": {
          "type": "integer",
          "format": "int64",
          "description": "The number of orders belonging to remote xud nodes."
        },
        "own": {
          "type": "integer",
          "format": "int64",
          "description": "The number of orders belonging to our local xud node."
        }
      }
    },
    "xudrpcPeer": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "description": "The socket address with host and port for this peer."
        },
        "node_pub_key": {
          "type": "string",
          "description": "The node pub key to uniquely identify this peer."
        },
        "lnd_pub_keys": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "A map of ticker symbols to lnd pub keys for this peer"
        },
        "inbound": {
          "type": "boolean",
          "format": "boolean",
          "description": "Indicates whether this peer was connected inbound."
        },
        "pairs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of trading pair tickers supported by this peer."
        },
        "xud_version": {
          "type": "string",
          "description": "The version of xud being used by the peer."
        },
        "seconds_connected": {
          "type": "integer",
          "format": "int64",
          "description": "The time in seconds that we have been connected to this peer."
        },
        "alias": {
          "type": "string",
          "title": "The alias for this peer's public key"
        }
      }
    },
    "xudrpcPlaceOrderEvent": {
      "type": "object",
      "properties": {
        "match": {
          "$ref": "#/definitions/xudrpcOrder",
          "description": "An order (or portion thereof) that matched the newly placed order."
        },
        "swap_success": {
          "$ref": "#/definitions/xudrpcSwapSuccess",
          "description": "A successful swap of a peer order that matched the newly placed order."
        },
        "remaining_order": {
          "$ref": "#/definitions/xudrpcOrder",
          "description": "The remaining portion of the order, after matches, that enters the order book."
        },
        "swap_failure": {
          "$ref": "#/definitions/xudrpcSwapFailure",
          "description": "A swap attempt that failed."
        }
      }
    },
    "xudrpcPlaceOrderRequest": {
      "type": "object",
      "properties": {
        "price": {
          "type": "number",
          "format": "double",
          "description": "The price of the order."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity of the order denominated in satoshis."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair that the order is for."
        },
        "order_id": {
          "type": "string",
          "description": "The local id to assign to the order."
        },
        "side": {
          "$ref": "#/definitions/xudrpcOrderSide",
          "description": "Whether the order is a buy or sell."
        },
        "replace_order_id": {
          "type": "string",
          "description": "The local id of an existing order to be replaced. If provided, the order must be successfully\nfound and removed before the new order is placed, otherwise an error is returned."
        },
        "immediate_or_cancel": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether the order must be filled immediately and not allowed to enter the order book."
        }
      }
    },
    "xudrpcPlaceOrderResponse": {
      "type": "object",
      "properties": {
        "internal_matches": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcOrder"
          },
          "description": "A list of own orders (or portions thereof) that matched the newly placed order."
        },
        "swap_successes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcSwapSuccess"
          },
          "description": "A list of successful swaps of peer orders that matched the newly placed order."
        },
        "remaining_order": {
          "$ref": "#/definitions/xudrpcOrder",
          "description": "The remaining portion of the order, after matches, that enters the order book."
        },
        "swap_failures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcSwapFailure"
          },
          "description": "A list of swap attempts that failed."
        }
      }
    },
    "xudrpcRemoveAllOrdersRequest": {
      "type": "object"
    },
    "xudrpcRemoveAllOrdersResponse": {
      "type": "object",
      "properties": {
        "removed_order_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The local order ids that were successfully removed."
        },
        "on_hold_order_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The local order ids that were on hold and failed to be removed."
        }
      }
    },
    "xudrpcRemoveCurrencyRequest": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "description": "The ticker symbol for this currency such as BTC, LTC, ETH, etc..."
        }
      }
    },
    "xudrpcRemoveCurrencyResponse": {
      "type": "object"
    },
    "xudrpcRemoveOrderRequest": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "description": "The local id of the order to remove."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity to remove from the order denominated in satoshis.\nIf zero or unspecified then the entire order is removed."
        }
      }
    },
    "xudrpcRemoveOrderResponse": {
      "type": "object",
      "properties": {
        "quantity_on_hold": {
          "type": "string",
          "format": "uint64",
          "description": "Any portion of the order that was on hold due to ongoing swaps at the time of the request\nand could not be removed until after the swaps finish."
        },
        "remaining_quantity": {
          "type": "string",
          "format": "uint64",
          "description": "Remaining portion of the order if it was a partial removal."
        },
        "removed_quantity": {
          "type": "string",
          "format": "uint64",
          "description": "Successfully removed portion of the order."
        },
        "pair_id": {
          "type": "string",
          "title": "Removed order's pairId. (e.g. ETH/BTC)"
        }
      }
    },
    "xudrpcRemovePairRequest": {
      "type": "object",
      "properties": {
        "pair_id": {
          "type": "string",
          "description": "The trading pair ticker to remove in a format such as \"LTC/BTC\"."
        }
      }
    },
    "xudrpcRemovePairResponse": {
      "type": "object"
    },
    "xudrpcRestoreNodeResponse": {
      "type": "object",
      "properties": {
        "restored_lnds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of lnd clients that were initialized."
        },
        "restored_connext": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether the connext wallet was initialized."
        }
      }
    },
    "xudrpcRole": {
      "type": "string",
      "enum": [
        "TAKER",
        "MAKER",
        "INTERNAL"
      ],
      "default": "TAKER"
    },
    "xudrpcSetLogLevelRequest": {
      "type": "object",
      "properties": {
        "log_level": {
          "$ref": "#/definitions/xudrpcLogLevel"
        }
      }
    },
    "xudrpcSetLogLevelResponse": {
      "type": "object"
    },
    "xudrpcShutdownRequest": {
      "type": "object"
    },
    "xudrpcShutdownResponse": {
      "type": "object"
    },
    "xudrpcSwapAccepted": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "description": "The global UUID for the order that was accepted to be swapped."
        },
        "local_id": {
          "type": "string",
          "description": "The local id for the order that was accepted to be swapped."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair that the swap is for."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The order quantity that was accepted to be swapped."
        },
        "price": {
          "type": "number",
          "format": "double",
          "description": "The price for the swap."
        },
        "peer_pub_key": {
          "type": "string",
          "description": "The node pub key of the peer that executed this order."
        },
        "r_hash": {
          "type": "string",
          "description": "The hex-encoded payment hash for the swap."
        },
        "amount_receiving": {
          "type": "string",
          "format": "uint64",
          "description": "The amount received denominated in satoshis."
        },
        "amount_sending": {
          "type": "string",
          "format": "uint64",
          "description": "The amount sent denominated in satoshis."
        },
        "currency_receiving": {
          "type": "string",
          "description": "The ticker symbol of the currency received."
        },
        "currency_sending": {
          "type": "string",
          "description": "The ticker symbol of the currency sent."
        }
      }
    },
    "xudrpcSwapFailure": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "description": "The global UUID for the order that failed the swap."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair that the swap is for."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The order quantity that was attempted to be swapped."
        },
        "peer_pub_key": {
          "type": "string",
          "description": "The node pub key of the peer that we attempted to swap with."
        },
        "failure_reason": {
          "type": "string",
          "description": "The reason why the swap failed."
        }
      }
    },
    "xudrpcSwapSuccess": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "description": "The global UUID for the order that was swapped."
        },
        "local_id": {
          "type": "string",
          "description": "The local id for the order that was swapped."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair that the swap is for."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The order quantity that was swapped."
        },
        "r_hash": {
          "type": "string",
          "description": "The hex-encoded payment hash for the swap."
        },
        "amount_received": {
          "type": "string",
          "format": "uint64",
          "description": "The amount received denominated in satoshis."
        },
        "amount_sent": {
          "type": "string",
          "format": "uint64",
          "description": "The amount sent denominated in satoshis."
        },
        "peer_pub_key": {
          "type": "string",
          "description": "The node pub key of the peer that executed this order."
        },
        "role": {
          "$ref": "#/definitions/xudrpcRole",
          "description": "Our role in the swap, either MAKER or TAKER."
        },
        "currency_received": {
          "type": "string",
          "description": "The ticker symbol of the currency received."
        },
        "currency_sent": {
          "type": "string",
          "description": "The ticker symbol of the currency sent."
        },
        "r_preimage": {
          "type": "string",
          "description": "The hex-encoded preimage."
        },
        "price": {
          "type": "number",
          "format": "double",
          "description": "The price used for the swap."
        }
      }
    },
    "xudrpcTrade": {
      "type": "object",
      "properties": {
        "maker_order": {
          "$ref": "#/definitions/xudrpcOrder",
          "description": "The maker order involved in this trade."
        },
        "taker_order": {
          "$ref": "#/definitions/xudrpcOrder",
          "description": "The taker order involved in this trade. Note that when a trade occurs from\na remote peer filling one of our orders, we do not receive the order (only a\nswap request) and this field will be empty."
        },
        "r_hash": {
          "type": "string",
          "description": "The payment hash involved in this trade."
        },
        "quantity": {
          "type": "string",
          "format": "uint64",
          "description": "The quantity transacted in this trade."
        },
        "pair_id": {
          "type": "string",
          "description": "The trading pair for this trade."
        },
        "price": {
          "type": "number",
          "format": "double",
          "description": "The price used for the trade."
        },
        "role": {
          "$ref": "#/definitions/xudrpcRole",
          "description": "Our role in the trade."
        },
        "executed_at": {
          "type": "string",
          "format": "uint64",
          "title": "The epoch time in milliseconds that this trade was executed"
        },
        "side": {
          "$ref": "#/definitions/xudrpcOrderSide",
          "description": "Whether this node was on the buy or sell side of the trade - or both in case of internal trades."
        },
        "counterparty": {
          "$ref": "#/definitions/xudrpcNodeIdentifier",
          "description": "The counterparty to this trade, if applicable."
        }
      }
    },
    "xudrpcTradeHistoryRequest": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "format": "int64",
          "title": "The maximum number of trades to return"
        }
      }
    },
    "xudrpcTradeHistoryResponse": {
      "type": "object",
      "properties": {
        "trades": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/xudrpcTrade"
          }
        }
      }
    },
    "xudrpcTradingLimits": {
      "type": "object",
      "properties": {
        "max_sell": {
          "type": "string",
          "format": "uint64",
          "description": "Maximum outbound limit for a sell order denominated in satoshis."
        },
        "max_buy": {
          "type": "string",
          "format": "uint64",
          "description": "Maximum inbound limit for a buy order denominated in satoshis."
        },
        "reserved_sell": {
          "type": "string",
          "format": "uint64",
          "description": "The outbound amount reserved for open sell orders."
        },
        "reserved_buy": {
          "type": "string",
          "format": "uint64",
          "description": "The inbound amount reserved for open buy orders."
        }
      }
    },
    "xudrpcTradingLimitsResponse": {
      "type": "object",
      "properties": {
        "limits": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/xudrpcTradingLimits"
          },
          "description": "A map between currency ticker symbols and their trading limits."
        }
      }
    },
    "xudrpcUnbanRequest": {
      "type": "object",
      "properties": {
        "node_identifier": {
          "type": "string",
          "description": "The node pub key or alias of the peer to unban."
        },
        "reconnect": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether to attempt to connect to the peer after it is unbanned."
        }
      }
    },
    "xudrpcUnbanResponse": {
      "type": "object"
    },
    "xudrpcUnlockNodeResponse": {
      "type": "object",
      "properties": {
        "unlocked_lnds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of lnd clients that were unlocked."
        },
        "locked_lnds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of lnd clients that could not be unlocked."
        }
      }
    },
    "xudrpcWithdrawRequest": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "description": "The ticker symbol of the currency to withdraw."
        },
        "destination": {
          "type": "string",
          "description": "The address to withdraw funds to."
        },
        "amount": {
          "type": "string",
          "format": "uint64",
          "title": "The amount to withdraw denominated in satoshis"
        },
        "all": {
          "type": "boolean",
          "format": "boolean",
          "description": "Whether to withdraw all available funds for this currency.\nIf true, the amount field is ignored."
        },
        "fee": {
          "type": "integer",
          "format": "int64",
          "description": "The fee to use for the withdrawal transaction denominated in satoshis per byte."
        }
      }
    },
    "xudrpcWithdrawResponse": {
      "type": "object",
      "properties": {
        "transaction_id": {
          "type": "string",
          "description": "The id of the withdrawal transaction."
        }
      }
    }
  },
  "x-stream-definitions": {
    "xudrpcOrderUpdate": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/xudrpcOrderUpdate"
        },
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        }
      },
      "title": "Stream result of xudrpcOrderUpdate"
    },
    "xudrpcPlaceOrderEvent": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/xudrpcPlaceOrderEvent"
        },
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        }
      },
      "title": "Stream result of xudrpcPlaceOrderEvent"
    },
    "xudrpcSwapAccepted": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/xudrpcSwapAccepted"
        },
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        }
      },
      "title": "Stream result of xudrpcSwapAccepted"
    },
    "xudrpcSwapFailure": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/xudrpcSwapFailure"
        },
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        }
      },
      "title": "Stream result of xudrpcSwapFailure"
    },
    "xudrpcSwapSuccess": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/xudrpcSwapSuccess"
        },
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        }
      },
      "title": "Stream result of xudrpcSwapSuccess"
    }
  }
}
