

The limit price depends on limitMovePercent config.

Reverse: After canceling the unfilled order, R2 sends a limit order to the opposite side of the filled order.action: Action to be taken when only one leg is opened.R2 disables brokers which has smaller stability index than threshold value.īy default, a broker which has failed three API calls within 5 minutes would be disabled for trading for at most 5 minutes.The stability index is incremented every time recoveryInterval milliseconds has passed.The stability index is decremented each time a broker API call fails.Each broker has its stability index on a scale of one to ten.R2 automatically disables trading activities on unstable brokers. In non-GUI environment, this config needs to be false. openBrowser: If true, the application opens a browser window.host: Web server IP that accepts HTTP client connections.enabled: true for Web UI mode, false for console mode.Time lapse in milliseconds to check if arbitrage orders are filled or not. If the orders are not filled after the retries, Arbitrager tries to cancel the orders and continues. Maximum retry count to check if arbitrage orders are filled or not. If net exposure qty is larger than this value, Arbitrager stops. Time lapse in milliseconds after one arbitrage is done. Position data is used to check max exposure and long/short availability for each broker. Time lapse in milliseconds of position data refresh. When it's set to 3000, the quotes fetch and the spreads analysis for all the brokers are done every 3 seconds

Time lapse in milliseconds of an iteration. Allows execution with price that is disadvantageous by the set value(%) from target price. In order to execute orders as fast as possible and avoid slippage, R2 checks the volume of the quotes from the exchanges and makes sure the target volume consumes less than this percentage of the volume of the target quote before executing the order For example, when the open profit of an open pair is 200 JPY and exitNetProfitRatio is 20(%), R2 closes the pair once the closing cost has became 160. R2 attempts to close open pairs when the spread has decreased by this percentage. If the expected profit is larger than this, R2 won't attempt arbitrage. This is a safe-guard for abnormal quotes. Profit percentage against notional is calculated by 100 * expected profit / (MID price * volume). Minimum target profit in percent against notional (= inverted spread %). Merges small quotes into the specified price ladder before analyzing arbitrage opportunity. If it's true, the arbitrager analyzes spreads but doesn't send any real trade.
#Coincheck bot update#
️Dynamic configuration: User can dynamically update the configuration based on spread statistics by a simple js script, like setting minTargetProfitPercent to μ + σ every few seconds.Īll configurations are stored in config.json.

Concurrency: All API calls to exchanges are concurrently sent/handled.Pluggable architecture: User can add new exchanges/brokers as an npm package like bitflyer-fx plugin.The covering behavior is configurable in onSingleLeg config.Īfter the spread has became smaller than the configured value, exitNetProfitRatio, R2 tries to close the pair. If one of the legs are not fully filled, R2 tries to send a cover order in order to balance the position. If the both legs are filled, shows the profit.R2 checks whether the legs are filled or not for the configured period, say 30 seconds.R2 concurrently sends a buy leg and a sell leg to each broker that offered the best price.If there is no arbitrage opportunity, R2 waits for the next iteration. Calculates the best ask and the best bid from the filtered quotes and checks if the expected profit is larger than the configured minimum value, minTargetProfitPercent.For example, if maxShortPosition config is 0 and the current position is 0 for a broker, the ask quotes for the broker will be filtered out. Filters out quotes that are not usable for arbitrage.Every 3 seconds, R2 downloads quotes from exchanges.*bitFlyer margin trading (BTC-FX/JPY) is available as a broker plugin. Web UI works on the latest version of Google Chrome. R2 works on any OS that supports Node.js, such as:
