You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: data-for-gpts/all-content.txt
+161-1
Original file line number
Diff line number
Diff line change
@@ -48906,7 +48906,8 @@ For a walkthrough covering multiple tutorials in a targeted fashion, please see
48906
48906
48907
48907
The AtomicDEX API section contains all available API commands.
48908
48908
48909
-
These API commands can also be called Remote Procedure Calls, or RPCs.
48909
+
These API commands can also be called Remote Procedure Calls (or RPCs) and are used to interact with the AtomicDEX daemon using a variety of languages.
48910
+
Recently, a `komodefi-cli` binary has been introduced to simplify the process of [interacting with the AtomicDEX daemon from the command line](/atomicdex/tutorials/using-komodefi-cli-in-console/).
48910
48911
export const title = "Add and Activate Coins on AtomicDEX Mobile";
48911
48912
export const description =
48912
48913
"Activate coins on AtomicDEX Mobile by following simple steps and enjoy seamless trading.";
Edit the command above as necessary to exchange one curl command for another from [the AtomicDEX API.](/atomicdex/api/)
52453
+
export const title = "Using KomoDeFi CLI in Console";
52454
+
export const description = "This guide details the configuration and usage of the komodefi-cli binary.";
52455
+
52456
+
# Using KomoDeFi CLI in Console
52457
+
52458
+
For convenience, the standalone `komodefi-cli` binary is provided to be used for interacting with the KomoDeFi network from the command line.
52459
+
52460
+
## Building KomoDeFi CLI
52461
+
52462
+
Refer to [https://github.com/KomodoPlatform/komodo-defi-framework?tab=readme-ov-file#building-from-source](https://github.com/KomodoPlatform/komodo-defi-framework?tab=readme-ov-file#building-from-source) for instructions on installing dependencies and preparing your build environment.
52463
+
52464
+
Once it is ready, you can build the komodefi-cli binary by running the following command from the root folder of the project repository:
We also add the `bin` directory to the `PATH` environment variable so that the `komodefi-cli` binary can be executed from any location.
52471
+
52472
+
```bash
52473
+
export PATH=${PATH}:$(pwd)/bin
52474
+
```
52475
+
52476
+
## Configuration
52477
+
52478
+
#### Setting Default CLI Root Path
52479
+
52480
+
You can customize the default root directory for `komodefi-cli` by setting the `KOMODEFI_CLI_ROOT` environment variable. This allows you to specify a location for saving configuration files, binaries, and other related data.
52481
+
52482
+
```bash
52483
+
export KOMODEFI_CLI_ROOT=$HOME/komodefi-cli
52484
+
```
52485
+
52486
+
#### Downloading the Core API binary
52487
+
52488
+
Before using the `komodefi-cli` binary, you need to download the Core API binary. Running the following command to download the latest release:
52489
+
52490
+
```bash
52491
+
komodefi-cli mm2 download
52492
+
```
52493
+
52494
+
#### Configuring the Core API
52495
+
52496
+
For the `komodefi-cli` to work, you need to configure the Core API by setting the `coins` data and the information required for an [MM2.json](/atomicdex/tutorials/atomicdex-walkthrough/#launching-the-atomic-dex-api) file. For more information, run the following command:
52497
+
52498
+
```bash
52499
+
komodefi-cli init --help
52500
+
```
52501
+
52502
+
Which will return
52503
+
52504
+
```bash
52505
+
Config is not set
52506
+
Initialize a predefined coin set and configuration to start mm2 instance with
52507
+
52508
+
Usage: komodefi-cli init [OPTIONS]
52509
+
52510
+
Options:
52511
+
--mm-coins-path <MM_COINS_PATH> Coin set file path [default: coins] [aliases: coins]
If you have an existing coins file and/or MM2.json file, you can use the `--mm-coins-path` and `--mm-conf-path` options to specify the file paths, as below.
Alternatively, run `komodefi-cli init` without any options to create the `coins` and `MM2.json` files interactively. Pressing enter for each option will use the default values. In the case of the mnemonic phrase, you can enter your own mnemonic phrase or press enter to use a newly generated one.
After the configuration is set, you can start the Core API by running `komodefi-cli mm2 start`. You can also use the `--help` option to see the available options for this command:
--mm-coins-path <MM_COINS_PATH> Coin set file path [aliases: coins]
52563
+
--mm-log <MM_LOG> Log file path [aliases: log]
52564
+
-h, --help Print help
52565
+
```
52566
+
52567
+
For example, to start the Core API and save its runtime logs to \~/logs/mm2.log, you can run the following command:
52568
+
52569
+
```bash
52570
+
$ komodefi-cli mm2 start --mm-log ~/logs/mm2.log
52571
+
> Set env MM_LOG as: ~/logs/mm2.log
52572
+
> Started child process: "mm2", pid: 459264
52573
+
```
52574
+
52575
+
## Usage
52576
+
52577
+
From here, you are ready to use the `komodefi-cli` binary to interact with the KomoDeFi network. You can use the `--help` option to see the available commands and options.
52578
+
52579
+
```bash
52580
+
komodefi-cli --help
52581
+
Config is not set
52582
+
Provides a CLI interface and facilitates interoperating to komodo defi platform through the mm2 service
52583
+
52584
+
Usage: komodefi-cli <COMMAND>
52585
+
52586
+
Commands:
52587
+
init Initialize a predefined coin set and configuration to start mm2 instance with
52588
+
config Manage rpc_password and mm2 RPC URL
52589
+
mm2 Manage mm2 instance commands
52590
+
coin Coin commands: enable, disable etc.
52591
+
wallet Wallet commands: balance, withdraw etc.
52592
+
sell Put a selling request
52593
+
buy Put a buying request
52594
+
set-price Place an order on the orderbook. The setprice order is always considered a sell
52595
+
update-maker-order Update order on the orderbook [aliases: update]
52596
+
order Order listing commands: book, history, depth etc. [aliases: orders]
version-stat Version statistic commands [aliases: stat, vstat]
52603
+
task Tracking the status of long-running commands
52604
+
help Print this message or the help of the given subcommand(s)
52605
+
52606
+
Options:
52607
+
-h, --help Print help
52608
+
-V, --version Print version
52609
+
```
52610
+
52611
+
For more details and examples of commands available in `komodefi-cli`, refer to the [komodefi-cli documentation](https://github.com/KomodoPlatform/komodo-defi-framework/blob/1799-swap-commands/mm2src/komodefi_cli/src/doc/CLI_REFERENCE.md) within the [Komodo DeFi Framework](https://github.com/KomodoPlatform/komodo-defi-framework) repository.
52452
52612
export const title = "Chapter 00 - Bitcoin Protocol Basics";
52453
52613
export const description = "Learn the basics of the Bitcoin protocol, including unspent transaction outputs (UTXOs) and the concept of the mempool, in this introductory chapter.";
Copy file name to clipboardexpand all lines: data-for-gpts/atomicdex-content.txt
+161-1
Original file line number
Diff line number
Diff line change
@@ -22212,7 +22212,8 @@ For a walkthrough covering multiple tutorials in a targeted fashion, please see
22212
22212
22213
22213
The AtomicDEX API section contains all available API commands.
22214
22214
22215
-
These API commands can also be called Remote Procedure Calls, or RPCs.
22215
+
These API commands can also be called Remote Procedure Calls (or RPCs) and are used to interact with the AtomicDEX daemon using a variety of languages.
22216
+
Recently, a `komodefi-cli` binary has been introduced to simplify the process of [interacting with the AtomicDEX daemon from the command line](/atomicdex/tutorials/using-komodefi-cli-in-console/).
22216
22217
export const title = "Add and Activate Coins on AtomicDEX Mobile";
22217
22218
export const description =
22218
22219
"Activate coins on AtomicDEX Mobile by following simple steps and enjoy seamless trading.";
Edit the command above as necessary to exchange one curl command for another from [the AtomicDEX API.](/atomicdex/api/)
25759
+
export const title = "Using KomoDeFi CLI in Console";
25760
+
export const description = "This guide details the configuration and usage of the komodefi-cli binary.";
25761
+
25762
+
# Using KomoDeFi CLI in Console
25763
+
25764
+
For convenience, the standalone `komodefi-cli` binary is provided to be used for interacting with the KomoDeFi network from the command line.
25765
+
25766
+
## Building KomoDeFi CLI
25767
+
25768
+
Refer to [https://github.com/KomodoPlatform/komodo-defi-framework?tab=readme-ov-file#building-from-source](https://github.com/KomodoPlatform/komodo-defi-framework?tab=readme-ov-file#building-from-source) for instructions on installing dependencies and preparing your build environment.
25769
+
25770
+
Once it is ready, you can build the komodefi-cli binary by running the following command from the root folder of the project repository:
We also add the `bin` directory to the `PATH` environment variable so that the `komodefi-cli` binary can be executed from any location.
25777
+
25778
+
```bash
25779
+
export PATH=${PATH}:$(pwd)/bin
25780
+
```
25781
+
25782
+
## Configuration
25783
+
25784
+
#### Setting Default CLI Root Path
25785
+
25786
+
You can customize the default root directory for `komodefi-cli` by setting the `KOMODEFI_CLI_ROOT` environment variable. This allows you to specify a location for saving configuration files, binaries, and other related data.
25787
+
25788
+
```bash
25789
+
export KOMODEFI_CLI_ROOT=$HOME/komodefi-cli
25790
+
```
25791
+
25792
+
#### Downloading the Core API binary
25793
+
25794
+
Before using the `komodefi-cli` binary, you need to download the Core API binary. Running the following command to download the latest release:
25795
+
25796
+
```bash
25797
+
komodefi-cli mm2 download
25798
+
```
25799
+
25800
+
#### Configuring the Core API
25801
+
25802
+
For the `komodefi-cli` to work, you need to configure the Core API by setting the `coins` data and the information required for an [MM2.json](/atomicdex/tutorials/atomicdex-walkthrough/#launching-the-atomic-dex-api) file. For more information, run the following command:
25803
+
25804
+
```bash
25805
+
komodefi-cli init --help
25806
+
```
25807
+
25808
+
Which will return
25809
+
25810
+
```bash
25811
+
Config is not set
25812
+
Initialize a predefined coin set and configuration to start mm2 instance with
25813
+
25814
+
Usage: komodefi-cli init [OPTIONS]
25815
+
25816
+
Options:
25817
+
--mm-coins-path <MM_COINS_PATH> Coin set file path [default: coins] [aliases: coins]
If you have an existing coins file and/or MM2.json file, you can use the `--mm-coins-path` and `--mm-conf-path` options to specify the file paths, as below.
Alternatively, run `komodefi-cli init` without any options to create the `coins` and `MM2.json` files interactively. Pressing enter for each option will use the default values. In the case of the mnemonic phrase, you can enter your own mnemonic phrase or press enter to use a newly generated one.
After the configuration is set, you can start the Core API by running `komodefi-cli mm2 start`. You can also use the `--help` option to see the available options for this command:
--mm-coins-path <MM_COINS_PATH> Coin set file path [aliases: coins]
25869
+
--mm-log <MM_LOG> Log file path [aliases: log]
25870
+
-h, --help Print help
25871
+
```
25872
+
25873
+
For example, to start the Core API and save its runtime logs to \~/logs/mm2.log, you can run the following command:
25874
+
25875
+
```bash
25876
+
$ komodefi-cli mm2 start --mm-log ~/logs/mm2.log
25877
+
> Set env MM_LOG as: ~/logs/mm2.log
25878
+
> Started child process: "mm2", pid: 459264
25879
+
```
25880
+
25881
+
## Usage
25882
+
25883
+
From here, you are ready to use the `komodefi-cli` binary to interact with the KomoDeFi network. You can use the `--help` option to see the available commands and options.
25884
+
25885
+
```bash
25886
+
komodefi-cli --help
25887
+
Config is not set
25888
+
Provides a CLI interface and facilitates interoperating to komodo defi platform through the mm2 service
25889
+
25890
+
Usage: komodefi-cli <COMMAND>
25891
+
25892
+
Commands:
25893
+
init Initialize a predefined coin set and configuration to start mm2 instance with
25894
+
config Manage rpc_password and mm2 RPC URL
25895
+
mm2 Manage mm2 instance commands
25896
+
coin Coin commands: enable, disable etc.
25897
+
wallet Wallet commands: balance, withdraw etc.
25898
+
sell Put a selling request
25899
+
buy Put a buying request
25900
+
set-price Place an order on the orderbook. The setprice order is always considered a sell
25901
+
update-maker-order Update order on the orderbook [aliases: update]
25902
+
order Order listing commands: book, history, depth etc. [aliases: orders]
version-stat Version statistic commands [aliases: stat, vstat]
25909
+
task Tracking the status of long-running commands
25910
+
help Print this message or the help of the given subcommand(s)
25911
+
25912
+
Options:
25913
+
-h, --help Print help
25914
+
-V, --version Print version
25915
+
```
25916
+
25917
+
For more details and examples of commands available in `komodefi-cli`, refer to the [komodefi-cli documentation](https://github.com/KomodoPlatform/komodo-defi-framework/blob/1799-swap-commands/mm2src/komodefi_cli/src/doc/CLI_REFERENCE.md) within the [Komodo DeFi Framework](https://github.com/KomodoPlatform/komodo-defi-framework) repository.
Copy file name to clipboardexpand all lines: src/pages/atomicdex/index.mdx
+2-1
Original file line number
Diff line number
Diff line change
@@ -34,4 +34,5 @@ For a walkthrough covering multiple tutorials in a targeted fashion, please see
34
34
35
35
The AtomicDEX API section contains all available API commands.
36
36
37
-
These API commands can also be called Remote Procedure Calls, or RPCs.
37
+
These API commands can also be called Remote Procedure Calls (or RPCs) and are used to interact with the AtomicDEX daemon using a variety of languages.
38
+
Recently, a `komodefi-cli` binary has been introduced to simplify the process of [interacting with the AtomicDEX daemon from the command line](/atomicdex/tutorials/using-komodefi-cli-in-console/).
0 commit comments