Komodo DeFi Framework API RPC (Legacy)#
This section of the documentation contains the Legacy Komodo DeFi Framework methods that are currently being ported to the 2.0 version
Note about rational number type The Komodo DeFi Framework API now offers the num-rational crate feature. This is used to represent order volumes and prices. batch_requests A batch request is a method for sending several unique requests to the network all at once. Komodo DeFi Framework Metrics The metrics method returns a snapshot of the current Komodo DeFi Framework API metrics used in Prometheus and Grafana. Activation Methods Learn about the two methods of coin activation, enable and electrum. coins_needed_for_kick_start Learn how to kick-start interrupted swaps on the Komodo DeFi Framework API by activating the necessary coins using the coins_needed_for_kick_start method. disable_coin The disable_coin method deactivates the previously enabled coin, and also cancels all active orders that use the selected coin. get_enabled_coins The get_enabled_coins method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node. set_required_confirmations The set_required_confirmations method sets the number of confirmations for which Komodo DeFi Framework API must wait for the selected coin. set_requires_notarization The set_requires_notarization method indicates whether Komodo DeFi Framework API must wait for a dPoW notarization of the given atomic swap transactions. get_gossip_mesh The get_gossip_mesh method returns an array of peerIDs added to a topics' mesh for each known gossipsub topic. get_gossip_peer_topics The get_gossip_peer_topics method returns a map of peerIDs to an array of the topics to which they are subscribed. get_gossip_topic_peers The get_gossip_topic_peers method returns a map of topics to an array of the PeerIDs which are subscribers. get_my_peer_id The get_my_peer_id method returns your unique identifying Peer ID on the network. get_directly_connected_peers The get_directly_connected_peers method returns an array of peers (with their multiaddresses) currently connected to the requesting node. get_relay_mesh The get_relay_mesh method returns a list of peerIDs included in our local relay mesh. best_orders The best_orders method returns the best price orders that can fill the volume for all existing pairs with selected coin. buy The buy method issues a buy request and attempts to match an order from the orderbook based on the provided arguments. cancel_all_orders The cancel_all_orders cancels the active orders created by the Komodo DeFi Framework API node by specified condition. cancel_order The cancel_order cancels the active order created by the Komodo DeFi Framework API node. my_orders The my_orders method returns the data of all active orders created by the Komodo DeFi Framework API node. orderbook The orderbook method requests from the network the currently available orders for the specified trading pair. orderbook_depth The orderbook_depth method returns the number of asks and bids for the specified trading pairs. orders_history_by_filter The orders_history_by_filter method returns all orders whether active or inactive that match the selected filters. order_status The order_status method returns the data of the order with the selected uuid created by the Komodo DeFi Framework API node. recover_funds_of_swap Learn how to recover funds from a swap-payment address in case of an error using the recover_funds_of_swap method in the Komodo DeFi Framework API. sell The sell method issues a sell request and attempts to match an order from the orderbook based on the provided arguments. setprice The setprice method places an order on the orderbook, and it relies on this node acting as a maker, also called a Bob node. update_maker_order The update_maker_order method modifies an active order on the orderbook created by the current node as a maker (or Bob). active_swaps The active_swaps method returns all the swaps that are currently running on the Komodo DeFi Framework API node. all_swaps_uuids_by_filter The all_swaps_uuids_by_filter method returns all uuids of swaps that match the selected filters. get_trade_fee The get_trade_fee method returns the approximate amount of the miner fee that is paid per swap transaction. import_swaps The import_swaps method imports to the local database the swaps data that was exported from another Komodo DeFi Framework API instance. min_trading_vol The min_trading_vol method returns the minimum required volume for buy/sell/setprice methods for the selected coin. max_taker_vol The max_taker_vol method returns the maximum available volume for buy/sell methods for selected coin. my_recent_swaps The my_recent_swaps method returns the data of the most recent atomic swaps executed by the Komodo DeFi Framework API node. my_swap_status The my_swap_status method returns the data of an atomic swap executed on an Komodo DeFi Framework API node. trade_preimag The trade_preimage method returns the approximate fee amounts that are paid per the whole swap. ban_pubkey The ban_pubkey method bans the selected pubkey ignoring its order matching messages and preventing its orders from displaying in the orderbook. help The help method returns the full API documentation in the terminal. list_banned_pubkeys The list_banned_pubkeys method returns a list of public keys of nodes that are banned from interacting with the node executing the method. stop The stop method stops the Komodo DeFi Framework API software. unban_pubkeys The unban_pubkeys method will remove all currently banned pubkeys from your ban list, or specific pubkeys from a user defined list. version The version method returns the Komodo DeFi Framework API version. convertaddress The convertaddress method converts an input address to a specified address format. consolidate_utxos The consolidate_utxos method consolidates unspent transaction outputs (UTXOs) for a specified UTXO-based coin to optimize transaction efficiency and reduce wallet fragmentation. convert_utxo_address The convert_utxo_address method takes a UTXO address as input, and returns the equivalent address for another UTXO coin. kmd_rewards_info The kmd_rewards_info method returns information about the active user rewards that can be claimed by an address's unspent outputs. my_balance The my_balance method returns the current balance of the specified coin. my_tx_history The my_tx_history method returns the blockchain transactions involving the Komodo DeFi Framework API node's coin address. send_raw_transaction The send_raw_transaction method broadcasts the transaction to the network of selected coin. show_priv_key The deprecated show_priv_key method returns the private key of a specified coin. validateaddress The validateaddress method checks if an input string is a valid address of the specified coin. withdraw The withdraw method generates, signs, and returns a transaction that transfers the amount of coin to the address indicated in the to argument.
Common Komodo DeFi SDK Request / Response Objects#
There are some common objects that are used in the Komodo DeFi SDK RPC protocol. These standard objects have been collected and grouped into the following sections: