-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commands
So far we have a list of the following commands:
Shows your holdings on the exchange.
The list includes only non-empty balances, and estimates in USD and BTC.
Next /balances
requests will also show changes relative to previous data. The bot analyzes buys and sells on pair of the config-file, but it may be wrong, as it uses only balances, but not trades history.
The command uses the exchange you set in the exchange field of the config. It is necessary to set up API keys as well.
Format
/balances
Example
/balances
Resfinex balances:
9 201.27923727 ADM (3 700.36923727 available & 5 500.91 frozen)
0.05603766 RES
97.02754082 USDT (63.22883482 available & 33.798706 frozen)
Total holdings ~ 209.69 USD or 0.00784110 BTC
Changes:
ADM: +117.31
USDT: −1.45405745
Total holdings +4.04 USD or +0.00017664 BTC
I've bought 117.31 ADM at 0.012395 USDT price.
Show open orders on a trade pair.
The bot shows total open orders on exchange for a trade pair, and order number by type in internal storage. Total orders on a trade pair in storage may differ from real orders number on exchange: you’ve placed orders aside from the bot; API didn’t close an order, but reported as closed. It is a reference only. This difference the bot shows as Unknown orders.
Next /orders
requests will also show changes relative to previous data.
Order types:
- Market making—orders placed by market-making module. Amount is close to 0 usually, because they fit each other.
- Dynamic order book—orders placed in the order book. See
/enable ob
. - Tradebot—trading for profit orders. Not working, use Zenbot instead.
- Liquidity—support for liquidity and spread. See
/enable liq
. - Price watching—orders to control token price. See
/enable pw
. - Manual orders—orders you’ve placed with
/buy
,/sell
,/fill
,/make price
commands. - Total—total orders in the bot’s storage.
The bot will show Unknown orders additionally — orders, which are not in the bot’s storage. You may have placed these orders on the exchange website. But if the number of Unknown orders constantly increases, they appear due to API errors. This will freeze balances and the bot will
stop placing orders. To prevent API errors from interrupting, configure the
clearAllOrdersInterval
parameter in the config file.
The command uses the exchange you set in the exchange field of the config. It is necessary to set up API keys as well.
Format
/orders [trade pair]
If you omit a trading pair, a bot will use pair from the config-file.
Example
/orders adm/usdt
Atomars open orders for ADM/USDT
pair: 61 (−27).
Orders in my database:
Market making: 0,
Dynamic order book: 6 (+1),
Tradebot: 0,
Liquidity: 7 (+1),
Price watching: 0,
Manual orders: 48,
Total — 61 (+2).
Orders which are not in my database (Unknown orders): 0 (−29).
Shows stats on a trading pair.
Information includes general trading statistics for a day, and market-making stats for a day, a month, and for all the time.
/stats
command uses the exchange you set in the exchange field of the config. It might be necessary to set up API keys as well.
Format
/stats [trading pair]
If you omit trading pair, a bot will use pair from the config-file.
Example
/stats adm/usdt
Resfinex 24h stats for ADM/USDT pair:
Vol: 68 956.18 ADM & 690.848578 USDT.
Low: 0.009470, high: 0.010455, delta: 0.000985 USDT (9.89%).
Bid: 0.009557, ask: 0.009584, spread: 0.000027 USDT (0.28%).
Market making stats for ADM/USDT pair:
24h: 742 orders with 68 277.88 ADM and 685.511816 USDT,
30d: 18018 orders with 2 012 408.19 ADM and 20 670.789837 USDT,
all time: 139591 orders with 96 741 870.44 ADM and 995 097.123482 USDT.
Shows market price for a coin
The bot gets rates from infoService and from an exchange. Rates from an exchange also includes bid, ask and spread.
InfoService is an ADAMANT currency rates provider, which fetches and stores rates form MOEX, Coinmarketcap, CryptoCompare and Coingecko. Default is https://info.adamant.im. If it doesn't store a coin you need, run your own infoService and specify it in the infoservice field of the config file, or ask us to add it to a default one.
/rates
command uses exchange you set in the exchange field of the config. It might be necessary to set up API keys as well.
Format
/rates [coin or pair]
If you pass a pair, the bot shows rates from an exchange also.
Example
/rates adm/usdt
Global market rates for ADM:
ADM/USD: 0.01162218, ADM/RUB: 0.86203452, ADM/EUR: 0.00952751, ADM/CNY: 0.07569276, ADM/JPY: 1.18330227, ADM/BTC: 4.6e-7, ADM/ETH: 0.00001853.
Bit-Z rates for ADM/USDT pair:
Bid: 0.0102, ask: 0.0110, spread: 0.0008 USDT (7.27%).
Calculates value of one coin in another.
Uses market data from InfoService and from exchange.
InfoService is an ADAMANT currency rates provider, which fetches and stores rates form MOEX, Coinmarketcap, CryptoCompare and Coingecko. Default is https://info.adamant.im. If it doesn't store a coin you need, run your own infoService and specify it in the infoservice field of the config file, or ask us to add it to a default one.
The command uses an exchange you set in the exchange field of the config. It might be necessary to set up API keys as well.
Format
/calc [amount] [coin-1] in [coin-2]
Example
/calc 2.05 BTC in USDT
Global market value of 2.05 BTC equals 55 241.17488547 USDT.
Resfinex value of 2.05 BTC:
Bid: 55 403.62800000 USDT, ask: 55 434.05000000 USDT.
Starts the market-making.
Before you start the market-making, set trading intervals with /interval
and amounts with /amount
commands. See current parameters with /params
command.
On start, the bot will tell you which options are enabled, and which are not. You can enable and disable them with /enable
and /disable
commands.
Possible market-making strategies:
- Spread—trade in spread only. The bot places orders at prices between bid and ask, and fits them by itself. If a spread is below minimal, it notifies you, and stops market making until spread appers again. Using this strategy means lower risk of assets loss. A percent of buy-type orders set with
/buyPercent
. - Orderbook—trade from the order book only. The bot buys and sells from the order book. Trading looks realistic, but risk of assets loss is higher. If liquidity is enabled with
/enable
liq, the bot can trade with itself, reducing the risks. I don’t recommend using this strategy if liquidity is disabled—the bot will buy high, sell low, enhance spread and loose assets. - Optimal—default strategy. If liquidity is set, the bot will trade both in spread and from the order books. If liquidity is disabled, the bot uses Spread strategy. The command starts market-making for exchange and pair of the config. It is necessary to set up API keys as well.
Format
/start mm [strategy]
If you omit a strategy, the bot chooses Optimal.
/start mm optimal
Starting market making & order book building & liquidity and spread maintenance with optimal policy for ADM/USDT
pair. Price watching is disabled—type /enable
pw to enable.
Stops (pauses) market-making.
The bot leaves all active orders as is. To cancel them, use /clear
command.
Format
/stop mm
Example
/stop mm
Market making, order book building, liquidity and spread maintenance, price watching for ADM/USDT
pair are disabled now.
Sets token amounts for placing market-making orders.
Set a minimum and a maximum amounts the bot will place in one order of type mm and ob. See /start mm
and /enable ob
commands.
By increasing this value, you will increase the trading volume and the volume of orders in the order books. The higher this value, the more assets the bot needs on its balances. See also /interval
.
The command sets amounts for exchange and pair of the config.
Format
/amount [min-max]
Example
/amount 1-250
Set to make market with amounts from 1 to 250 ADM for ADM/USDT
pair.
Sets time range (a minimum and a maximum time) between market-making orders.
By decreasing this value, you will increase the trading volume—market-making orders will be placed more often. See also /amount
.
The command sets intervals for exchange and pair of the config.
Format
/interval [min-max] [unit]
Time unit can be sec (default), min, hour.
Example
/interval 3-210 sec
Set to make market in intervals from 3 to 210 sec for ADM/USDT
pair.
Sets a percent of buy and sell market-making orders.
By increasing this value, you will increase the number of token purchases and decrease the number of sales.
For ob-orders, a higher value means more of sell-orders in the order book, and a less of buy-orders. See /enable
ob.
The command sets value for exchange and pair of the config.
Format
/buyPercent [percent]
Example
/buyPercent 65
Set to make market with 65% of buy orders for ADM/USDT
pair. Order book building is set to 35% of buy orders.
Enables market-making options.
You can enable options while the bot is running, and while it is stopped. Options mean only if market-making is running with /start mm
command. If market-making isn’t running, options will be paused also.
Available options:
- ob — dynamic order book building. The bot places and cancels orders in the order books, simulating real traders activity. Set order amounts with
/amount
and percent of orders to sell and to buy with/buyPercent
commands. - liq — maintain spread and liquidity. The bot will place orders in the order books to maintain a spread with volume you need. Note: if you’ll place much to buy, someone can sell tokens to your bot. The bot will re-supply liquidity while it has enough balance.
- pw — control the token’s price in the low-high range. The bot will avoid buying high and selling low. It will check a price for orders of types mm, liq, ob. See
/orders
. If a price moves out of the range, the bot will set a price back if balances are enough—the bot will buy or sell tokens. The price range can be set in any currency, then the bot will convert it into the currency of the trading pair. The bot knows how to control arbitrage—and by launching bots on all token’s trading pairs, they will maintain the same price on all exchanges.
Format
/enable [option] [parameters]
ob:
/enable ob [amount of orders]
If you omit the amount of orders, the bot will use a previous value. The initial value depends on exchange. See mm_orderBookOrdersCount
parameter in the reply to /params
command.
Example
/enable ob 20
Order book building is enabled for ADM/USDT
pair with 20 maximum number of orders.
liq:
/enable liq [spread%] [amount-1] [coin-1] [amount-2] [coin-2] [trend]
Possible trend values are uptrend, downtrend, middle (default). Trend means where to place liquidity orders relative to current bid-sell. In case of uptrend, the token price will tend to grow, but at the same time the bot will spend more quote-coins, that is, purchase your tokens.
Example
/enable liq 1.5% 200 ADM 2 USDT middle
Liquidity and spread maintenance is enabled for ADM/USDT
pair with 200 ADM asks (sell) and 2 USDT bids (buy) within 1.5% spread & middle trend.
pw:
/enable pw [low-high] [coin]
/enable pw [price] [coin] [deviation%]
You can set a range from low to high, or set a price with a deviation in percent.
/enable pw [trading pair]@[exchange] [deviation%] [policy]
If you trade a token on several trading pairs or exchanges, I recommend setting the leading trading pair in a numerical range, and targeting the rest to the leading trading pair. When a bot receives a price range from another trading pair, it will use direct bid and ask under the strict policy, or guess the real prices under the smart policy.
For example, with such an order book strict gives the 0.0122–0.0128 range, and smart gives the 0.0114–0.0133 range:
The bot will show current price information and ask for a confirmation. If you agree, confirm with /y
command.
Example
/enable pw 0.0045-0.0145 USDT
/enable pw 0.0095 USDT 47%
Are you sure to enable Price watching for ADM/USDT pair from 0.005035 to 0.013965 USDT (global rate)—47.00% price deviation?
Confirm with /y command or ignore.
Global market rates for ADM:
ADM/USD: 0.01162428, ADM/RUB: 0.86012116, ADM/EUR: 0.00948753, ADM/CNY: 0.07504373, ADM/JPY: 1.20059821, ADM/BTC: 3.7e-7, ADM/ETH: 0.00001135.
Resfinex rates for ADM/USDT pair:
Bid: 0.011570, ask: 0.011708.
Example
/enable pw ADM/USDT@Bit-Z 0.5% smart
Are you sure to enable Price watching for ADM/USDT pair based on ADM/USDT@Bit-Z with smart policy and 0.50% deviation?
Confirm with /y command or ignore.
Global market rates for ADM:
ADM/USD: 0.01154775, ADM/RUB: 0.85445844, ADM/EUR: 0.00942507, ADM/CNY: 0.07454966, ADM/JPY: 1.19269391, ADM/BTC: 3.6e-7, ADM/ETH: 0.00001112.
Resfinex rates for ADM/USDT pair:
Bid: 0.011488, ask: 0.011573.