-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
64 lines (48 loc) · 1.97 KB
/
constants.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from dydx3.constants import API_HOST_GOERLI, API_HOST_MAINNET
from decouple import config
# !!!! SELECT MODE !!!!
MODE = "DEVELOPMENT"
# Close all open positions and orders
ABORT_ALL_POSITIONS = True
# Find Cointegrated Pairs
FIND_COINTEGRATED = True
# Place Trades
MANAGE_EXITS = True
# Place Trades
PLACE_TRADERS = True
# Resolution
RESOLUTION = "1HOUR"
# Stats Window
WINDOW = 21
# Threshholds - Opening
MAX_HALF_LIFE = 24
ZSCORE_THRES = 1.5
USD_PER_TRADE = 50
USD_MIN_COLLATERAL = 1880
# Thresholds - Closing
CLOSE_AT_ZSOCRE_CROSS = True
# Ethereum Address
ETHEREUM_ADDRESS = "0x729585DE6B3312cc52db560c76948F3338cc9Bf3"
# KEYS - Production
#Must be on Mainnet on DYDX
STARK_PRIVATE_KEY_MAINNET = config("STARK_PRIVATE_KEY_MAINNET")
DYDX_API_KEY_MAINNET = config("DYDX_API_KEY_MAINNET")
DYDX_API_SECRET_MAINNET = config("DYDX_API_SECRET_MAINNET")
DYDX_API_PASSPHRASE_MAINNET = config("DYDX_API_PASSPHRASE_MAINNET")
# KEYS - Development
# Must to be on Testnet on DYDX
STARK_PRIVATE_KEY_TESTNET = config("STARK_PRIVATE_KEY_TESTNET")
DYDX_API_KEY_TESTNET = config("DYDX_API_KEY_TESTNET")
DYDX_API_SECRET_TESTNET = config("DYDX_API_SECRET_TESTNET")
DYDX_API_PASSPHRASE_TESTNET = config("DYDX_API_PASSPHRASE_TESTNET")
# Keys - Export
STARK_PRIVATE_KEY = STARK_PRIVATE_KEY_MAINNET if MODE == "PRODUCTION" else STARK_PRIVATE_KEY_TESTNET
DYDX_API_KEY = DYDX_API_KEY_MAINNET if MODE == "PRODUCTION" else DYDX_API_KEY_TESTNET
DYDX_API_SECRET = DYDX_API_SECRET_MAINNET if MODE == "PRODUCTION" else DYDX_API_SECRET_TESTNET
DYDX_API_PASSPHRASE = DYDX_API_PASSPHRASE_MAINNET if MODE == "PRODUCTION" else DYDX_API_PASSPHRASE_TESTNET
# HOST - Export
HOST = API_HOST_MAINNET if MODE == "PRODUCTION" else API_HOST_GOERLI
# HTTP PROVIDER
HTTP_PROVIDER_MAINNET = "https://eth-goerli.g.alchemy.com/v2/MPCIS7G4a5nmQQYs4hAj847hZ8WixMwv"
HTTP_PROVIDER_TESTNET = "https://eth-goerli.g.alchemy.com/v2/MPCIS7G4a5nmQQYs4hAj847hZ8WixMwv"
HTTP_PROVIDER = HTTP_PROVIDER_MAINNET if MODE == "PRODUCTION" else HTTP_PROVIDER_TESTNET