Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export const title = "Komodo DeFi Framework Method: Start Simple Market Maker Bot";
export const description = "The Komodo DeFi Framework API allows for simple bot trading via the start_simple_market_maker_bot method.";
export const title =
"Komodo DeFi Framework Method: Start Simple Market Maker Bot";
export const description =
"The Komodo DeFi Framework API allows for simple bot trading via the start_simple_market_maker_bot method.";

# start\_simple\_market\_maker\_bot

Expand All @@ -11,29 +13,29 @@ For convenience, an online [tool for generating configs](https://stats.kmd.io/at

## Arguments

| Structure | Type | Description |
| -------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| price\_url | string | Link to a price service API |
| bot\_refresh\_rate | float | Bot loop interval in seconds (optional, 30 sec default) |
| cfg.name | string | The name assigned to this configuration (e.g. the pair being configured) |
| cfg.name.base | string | Ticker of the coin you wish to sell |
| cfg.name.rel | string | Ticker of the coin you wish to buy |
| cfg.name.max | boolean | Set to `true` if you would like to trade your whole balance (optional) |
| cfg.name.max\_volume.percentage | string | Percentage of balance to trade (optional; can not use at same time as `max_volume.usd`; if greater than 1.0 `max=true` is implied) |
| cfg.name.max\_volume.usd | string | Maximum USD trade volume value to trade (optional; can not use at same time as `max_volume.percentage`; if greater than full balance `max=true` is implied) |
| cfg.name.min\_volume.percentage | string | Minimum percentage of balance to accept in trade (optional, can not use at same time as `min_volume.usd`) |
| cfg.name.min\_volume.usd | float | Minimum USD trade volume of trades accepted for order (optional, can not use at same time as `min_volume.percentage`) |
| cfg.name.min\_base\_price | float | Minimum USD price of base coin to accept in trade (optional) |
| cfg.name.min\_rel\_price | float | Minimum USD price of rel coin to accept in trade (optional) |
| cfg.name.min\_pair\_price | float | Minimum USD price of pair (base/rel) to accept in trade (optional) |
| cfg.name.spread\*\* | string | Target price in relation to prices API value |
| cfg.name.base\_confs | integer | number of required blockchain confirmations for base coin atomic swap transaction; default to base coin configuration if not set |
| cfg.name.base\_nota | boolean | whether dPoW notarization is required for base coin atomic swap transaction; default to base coin configuration if not set |
| cfg.name.rel\_confs | integer | number of required blockchain confirmations for rel coin atomic swap transaction; default to rel coin configuration if not set |
| cfg.name.rel\_nota | boolean | whether dPoW notarization is required for rel coin atomic swap transaction; default to base coin configuration if not set |
| cfg.name.enable | boolean | Bot will ignore this config entry if set to false |
| cfg.name.price\_elapsed\_validity | float | Will cancel current orders for this pair and not submit a new order if last price update time has been longer than this value in seconds (optional; defaults to 5 minutes) |
| cfg.name.check\_last\_bidirectional\_trade\_thresh\_hold | boolean | Will readjust the calculated cex price if a precedent trade exists for the pair (or reversed pair), applied via a [VWAP logic](https://www.investopedia.com/terms/v/vwap.asp) (optional; defaults to false) |
| Structure | Type | Description |
| -------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| price\_urls | list | Optional. A list of URLs serving price data in JSON format. During each update loop, price data will be sourced from the first working URL in the list. If not defined, a [default list](https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/mm2src/coins/lp_price.rs#L13) will be used. |
| bot\_refresh\_rate | float | Bot loop interval in seconds (optional, 30 sec default) |
| cfg.name | string | The name assigned to this configuration (e.g. the pair being configured) |
| cfg.name.base | string | Ticker of the coin you wish to sell |
| cfg.name.rel | string | Ticker of the coin you wish to buy |
| cfg.name.max | boolean | Set to `true` if you would like to trade your whole balance (optional) |
| cfg.name.max\_volume.percentage | string | Percentage of balance to trade (optional; can not use at same time as `max_volume.usd`; if greater than 1.0 `max=true` is implied) |
| cfg.name.max\_volume.usd | string | Maximum USD trade volume value to trade (optional; can not use at same time as `max_volume.percentage`; if greater than full balance `max=true` is implied) |
| cfg.name.min\_volume.percentage | string | Minimum percentage of balance to accept in trade (optional, can not use at same time as `min_volume.usd`) |
| cfg.name.min\_volume.usd | float | Minimum USD trade volume of trades accepted for order (optional, can not use at same time as `min_volume.percentage`) |
| cfg.name.min\_base\_price | float | Minimum USD price of base coin to accept in trade (optional) |
| cfg.name.min\_rel\_price | float | Minimum USD price of rel coin to accept in trade (optional) |
| cfg.name.min\_pair\_price | float | Minimum USD price of pair (base/rel) to accept in trade (optional) |
| cfg.name.spread\*\* | string | Target price in relation to prices API value |
| cfg.name.base\_confs | integer | number of required blockchain confirmations for base coin atomic swap transaction; default to base coin configuration if not set |
| cfg.name.base\_nota | boolean | whether dPoW notarization is required for base coin atomic swap transaction; default to base coin configuration if not set |
| cfg.name.rel\_confs | integer | number of required blockchain confirmations for rel coin atomic swap transaction; default to rel coin configuration if not set |
| cfg.name.rel\_nota | boolean | whether dPoW notarization is required for rel coin atomic swap transaction; default to base coin configuration if not set |
| cfg.name.enable | boolean | Bot will ignore this config entry if set to false |
| cfg.name.price\_elapsed\_validity | float | Will cancel current orders for this pair and not submit a new order if last price update time has been longer than this value in seconds (optional; defaults to 5 minutes) |
| cfg.name.check\_last\_bidirectional\_trade\_thresh\_hold | boolean | Will readjust the calculated cex price if a precedent trade exists for the pair (or reversed pair), applied via a [VWAP logic](https://www.investopedia.com/terms/v/vwap.asp) (optional; defaults to false) |

* Percentage values are within the range of 0-1, such that 0.25 = 25%
* For spread, a value of 1.05 equates to 5% over the value returned from the prices API url.
Expand Down Expand Up @@ -81,7 +83,11 @@ The third config tells the bot to:
"mmrpc": "2.0",
"method": "start_simple_market_maker_bot",
"params": {
"price_url": "https://prices.komodo.earth/api/v2/tickers?expire_at=600",
"price_urls": [
"https://prices.komodo.live:1313/api/v2/tickers?expire_at=600",
"https://prices.komodo.earth/api/v2/tickers?expire_at=600",
"https://prices.komodian.info/api/v2/tickers?expire_at=600"
],
"bot_refresh_rate": 60,
"cfg": {
"DASH/KMD": {
Expand Down