diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-01-12 00:39:09 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-01-12 00:39:09 +0100 |
commit | 4c51aa716c2940b006430cad70739ddb965f5068 (patch) | |
tree | 27b8d26f2d1d50a1c558aa969a6f777fa796a31a | |
parent | 987bd3d3f72e11b8d2b18e5b8fbca44a5d561d05 (diff) | |
download | Trader-4c51aa716c2940b006430cad70739ddb965f5068.tar.gz Trader-4c51aa716c2940b006430cad70739ddb965f5068.tar.zst Trader-4c51aa716c2940b006430cad70739ddb965f5068.zip |
Add log-in api key to market
-rw-r--r-- | market.py | 6 | ||||
-rw-r--r-- | script.py | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/market.py b/market.py new file mode 100644 index 0000000..a34636e --- /dev/null +++ b/market.py | |||
@@ -0,0 +1,6 @@ | |||
1 | import ccxt | ||
2 | |||
3 | market = ccxt.poloniex({ | ||
4 | "apiKey": "XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX", | ||
5 | "secret": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", | ||
6 | }) | ||
@@ -1,4 +1,6 @@ | |||
1 | import ccxt | 1 | import ccxt |
2 | # Put your poloniex api key in market.py | ||
3 | from market import market | ||
2 | 4 | ||
3 | def static_var(varname, value): | 5 | def static_var(varname, value): |
4 | def decorate(func): | 6 | def decorate(func): |
@@ -22,7 +24,6 @@ repartition_pertenthousand = { | |||
22 | "SC": 623, | 24 | "SC": 623, |
23 | } | 25 | } |
24 | 26 | ||
25 | market = ccxt.poloniex() | ||
26 | 27 | ||
27 | def formatted_price(value): | 28 | def formatted_price(value): |
28 | return round(value / 10**max_digits, 8) | 29 | return round(value / 10**max_digits, 8) |