-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
40 lines (29 loc) · 1.26 KB
/
settings.py
File metadata and controls
40 lines (29 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import configparser
from utils.utils import bool_from_str
conf = configparser.ConfigParser()
conf.read('settings.ini')
client = "bitflyer"
oanda_account_id = conf['oanda']['account_id']
oanda_access_token = conf['oanda']['access_token']
oanda_product_code = conf['oanda']['product_code']
bitflyer_access_key = conf['bitflyer']['api_key']
bitflyer_secret_key = conf['bitflyer']['api_secret']
bitflyer_product_code = conf['bitflyer']['product_code']
if client.lower() == "oanda":
product_code = oanda_product_code
product_codes = 'USD_JPY,EUR_JPY,EUR_USD,GBP_USD,GBP_JPY,AUD_JPY'
elif client.lower() == "bitflyer":
product_code = bitflyer_product_code
product_codes = bitflyer_product_code
db_name = conf['db']['name']
db_driver = conf['db']['driver']
web_port = int(conf['web']['port'])
trade_duration = conf['pytrading']['trade_duration'].lower()
back_test = bool_from_str(conf['pytrading']['back_test'])
live_practice = conf['pytrading']['live_practice']
use_percent = float(conf['pytrading']['use_percent'])
past_period = int(conf['pytrading']['past_period'])
stop_limit_percent = float(conf['pytrading']['stop_limit_percent'])
num_ranking = int(conf['pytrading']['num_ranking'])
WEB_HOOK_URL = conf['slack']['WEB_HOOK_URL']
password = conf['slack']['pass']