Skip to content

Commit

Permalink
Merge pull request #8 from ondra-novak/2.0
Browse files Browse the repository at this point in the history
Version 2.0 releases
  • Loading branch information
ondra-novak authored Nov 5, 2019
2 parents f2e9e53 + c702032 commit 9abbbb7
Show file tree
Hide file tree
Showing 132 changed files with 10,734 additions and 4,295 deletions.
4 changes: 2 additions & 2 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@

<storageModule moduleId="cdtBuildSystem" version="4.0.0">

<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1250489660" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=" parent="org.eclipse.cdt.build.core.emptycfg">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1250489660" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">

<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1250489660.227526892" name="/" resourcePath="">

<toolChain id="cdt.managedbuild.toolchain.gnu.base.1983862507" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">

<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.950221752" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>

<builder id="cdt.managedbuild.target.gnu.builder.base.1563414442" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<builder arguments="" command="make" id="cdt.managedbuild.target.gnu.builder.base.1563414442" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="cdt.managedbuild.target.gnu.builder.base"/>

<tool id="cdt.managedbuild.tool.gnu.archiver.base.49466460" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>

Expand Down
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
bin
/bin
/log
/build/
data
www/report*
local.conf
/data
/www/report*
/local.conf
/secure_data
/run/
/prod/
37 changes: 12 additions & 25 deletions .settings/language.settings.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>

<configuration id="cdt.managedbuild.toolchain.gnu.base.1250489660" name="Default">

<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">

<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>

<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>

<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>

<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-483148077153666342" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">

<language-scope id="org.eclipse.cdt.core.gcc"/>

<language-scope id="org.eclipse.cdt.core.g++"/>

</provider>

<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>

</extension>

</configuration>

<configuration id="cdt.managedbuild.toolchain.gnu.base.1250489660" name="Default">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1124083638270912153" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
</project>
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/)

include_directories(BEFORE src/imtjson/src src/server/src src )
add_compile_options(-std=c++17)
add_compile_options(-Wall -Werror -Wno-noexcept-type)
add_compile_options(-Wall -Wno-noexcept-type)

add_subdirectory (src/imtjson/src/imtjson EXCLUDE_FROM_ALL)
add_subdirectory (src/server/src/simpleServer EXCLUDE_FROM_ALL)
add_subdirectory (src/main)
add_subdirectory (src/trainer)
add_subdirectory (src/coinmate)
add_subdirectory (src/poloniex)
add_subdirectory (src/binance)
add_subdirectory (src/deribit)
add_subdirectory (src/bitmex)


install(DIRECTORY conf DESTINATION ".")
Expand Down
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
**Developer note:**
```
A new major version is in the development. You
can expect a lot of changes. Because of this,
I have a little time to handle support for
the current version in the master.
Stay tuned, this will be massive!
```


# mmbot
Market Making trading bot for cryptomarkets

Expand All @@ -24,4 +14,4 @@ Sorry, english documentation is not complete
Česká dokumentace
* [Obecné seznámení](doc/cs.md)
* [Config](doc/config_cs.md)
* [Poznámka k obchodování na Deribit a Bitmex](doc/deribit_bitmex_cs.md)
* [Poznámka k obchodování na Deribit a Bitmex](doc/deribit_bitmex_cs.md)
8 changes: 8 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

mkdir -p ./data
mkdir -p ./secure_data
mkdir -p ./log
mkdir -p ./run
cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO .
make all -j `nproc`
25 changes: 12 additions & 13 deletions conf/brokers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
#
# <name>=<command line> <args>
#
# The broker obviously needs a path to a configuration file. The configuration
# file contains all required url and **public and private keys as well**.
#
# The broker used by 'traders' (traders.conf)
#
#
# The working director for the broker is directory of this config. You can
# use absolute or relative path to the broker. Path to the config file is
# mostly relative to this config file.
# The broker usually needs path to configuration file in secure_data. If the configuration file
# doesn't exists, it is created soon on later when the user sets the api keys. Without keys, the
# only public interface is available
#
# All directories are relative to this directory
#

[brokers]

coinmate=../bin/brokers/coinmate brokers/coinmate.conf
poloniex=../bin/brokers/poloniex brokers/poloniex.conf
binance=../bin/brokers/binance brokers/binance.conf
deribit=../bin/brokers/deribit brokers/deribit.conf
coinmate=../bin/brokers/coinmate ../secure_data/coinmate
poloniex=../bin/brokers/poloniex ../secure_data/poloniex
binance=../bin/brokers/binance ../secure_data/binance
deribit=../bin/brokers/deribit ../secure_data/deribit
bitmex=../bin/brokers/bitmex ../secure_data/bitmex
trainer1=../bin/brokers/trainer ../secure_data/trainer1
trainer2=../bin/brokers/trainer ../secure_data/trainer2

5 changes: 0 additions & 5 deletions conf/brokers/binance.conf

This file was deleted.

11 changes: 0 additions & 11 deletions conf/brokers/coinmate.conf

This file was deleted.

5 changes: 0 additions & 5 deletions conf/brokers/deribit.conf

This file was deleted.

9 changes: 0 additions & 9 deletions conf/brokers/poloniex.conf

This file was deleted.

1 change: 1 addition & 0 deletions conf/ident
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test_user
147 changes: 54 additions & 93 deletions conf/mmbot.conf
Original file line number Diff line number Diff line change
@@ -1,122 +1,83 @@
# General config rules
#
# The format of the configuration is similar to standard ini file
#
# [This is begin of section]
# key=value
# @directive <argumet>
[service]

# specifies an instance file
# the instance file is file created when service starts and it
# is used to communicate with the command-line interface.
#
# Duplicate sections are merged
# Duplicate keys in the same sections replaces each other
# If you need a multiline value, use backslash at the end \
# of line
#
#
# Directives can control how the configuration file is processed
# this file also used to detect, whether the bot is running, to
# support start/stop/restart and other features. You can run multiple
# instances where the each instance has different inst_file.
#
# @include <relative_path> - includes other file. Its content is merged with
# the current.
# if you delete instance file while the bot is running, you will
# unable to control the service. You need to kill it manually
# using killall (or pidof mmbot and kill)
#
# @template <name> - merges specified section to current section. The specified
# section acts as template, its keys are imported
# to current section. This reduces duplicated declarations
#
# [aaa]
# a=1
# b=2
# c=3
#
# [bbb]
# @template aaa - imports a,b,c into section [aaa]
# d=4

inst_file=../run/inst.pid

# Allows to change effective user. This is useful, when the bot
# is started under root account. However it is not recommended at all.
# it is better to start the bot directly through the "su".

# user=mmbot

###########################################
#
# Paths: All paths can be relative to the configuration file where they appear.
#
###########################################
#
# Service settinggs
#
# inst_file - specify path to an instance file (pid file)
# - this file identifies the service while it runs
# - the file is created on start
# - required
#
# name - name of the service (appears on various places)
# socket file used to communicate with webserver

socket=../run/mmbot.socket:666

# enable listening on specified port. It is disabled by default to enable multiple instalations
#
# user - switch to user after start
#listen=localhost:11223
#

[service]
inst_file=../data/inst.pid
# path to the directory, where traders data are stored

# user=mmbot
storage_path=../data

# data are stored in binary format. You can disable binary format
# then data are stored as json. This makes large files, but readable
# for humans. Use this if you need to edit the data files.
#
# Enables logging
#
# file - path to log file (it is created)
# level - minimal level: debug, info, progress, note, warning, error, fatal
#
# Note: option -d temporarily sets level to debug. Option -v redirects log to stdout
# Note that you can edit data files only if the bot is stopped

#storage_binary=yes

# specify admin login:password in base64 to log into webadmin in case that you lost access
#
#admin=YWRtaW46c2VjcmV0


[log]

# specify path and name for the log file

file=../log/logfile
level=info

#
# Trades common configuration
#
# storage_path - path to directory where data files are stored
#
#
# defines level of logging
# available levels are (from the most verbose to less)
# - debug - log everything
# - info - important informations, such subresults of calculations etc.
# - progress - used to log progress of various operations
# - note - important messages, that should not be harmfull
# - warning - important message, that may be harmfull or recoverable errors
# - error - errors mostly unrecoverable
# - fatal - fatal errors and crashes

[traders]
storage_path=../data
level=info

#
# Report configuration
#
# path - path where reports are placed
# interval - exports records not older than specified time in miliseconds
#
# http_bind - enables local webserver to see results. The value specifies
# address and port where the content is served
#
# (use http://<http_bind>)
# http_auth - enable basic autentification. Specify one or more login
# tokens separated by a space. To generate login token, use
# following command
#
# $echo -n "login:password" | base64
#
# a2np - counts accumulated assets as profit.
# This causes that overlall normalized profit
# will partially copy development of the asset's price, because
# accumulated assets are part of the profit.
# If this option is turned off while the options
# `acum_factor_buy` and `acum_factor_sell` are set to 1 results
# accumulated profit to zero
# because all of the profit is used to accumulation.
# Default is off


[report]

# specify path where the report is stored

path=../www

# specify defaul interval of reported data (configured from webadmin)

interval=864000000
# http_bind=127.0.0.1:11223
#
## echo -n "admin:secret" | base64
# http_auth=YWRtaW46c2VjcmV0
#

# daily_report_service=../../mmbot_couchdb_report/bin/mmbot_perf ../../mmbot_couchdb_report/conf/mmbot_perf.conf ident


@include brokers.conf
@include traders.conf

Loading

0 comments on commit 9abbbb7

Please sign in to comment.