Skip to content

Commit

Permalink
updated examples/py/basic-chart.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Sep 28, 2017
1 parent 6106de1 commit eda77df
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
20 changes: 10 additions & 10 deletions ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# -----------------------------------------------------------------------------

from ccxt.version import __version__
# from ccxt.version import __version__

# -----------------------------------------------------------------------------

Expand All @@ -35,15 +35,15 @@

# -----------------------------------------------------------------------------

from ccxt.errors import CCXTError
from ccxt.errors import ExchangeError
from ccxt.errors import NotSupported
from ccxt.errors import AuthenticationError
from ccxt.errors import InsufficientFunds
from ccxt.errors import NetworkError
from ccxt.errors import DDoSProtection
from ccxt.errors import RequestTimeout
from ccxt.errors import ExchangeNotAvailable
# from ccxt.errors import CCXTError
# from ccxt.errors import ExchangeError
# from ccxt.errors import NotSupported
# from ccxt.errors import AuthenticationError
# from ccxt.errors import InsufficientFunds
# from ccxt.errors import NetworkError
# from ccxt.errors import DDoSProtection
# from ccxt.errors import RequestTimeout
# from ccxt.errors import ExchangeNotAvailable

# -----------------------------------------------------------------------------

Expand Down
10 changes: 4 additions & 6 deletions examples/py/basic-chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# -----------------------------------------------------------------------------

kraken = ccxt.kraken()
yunbi = ccxt.yunbi()
gdax = ccxt.gdax()

symbol = 'BTC/USD'

Expand All @@ -43,10 +43,8 @@ def print_chart(exchange, symbol, timeframe):
return last


print_chart(kraken, 'BTC/USD', '1m')

last = print_chart(kraken, 'BTC/USD', '5m')
last = print_chart(kraken, 'BTC/USD', '1h')
print("\n" + kraken.name + " ₿ = $" + str(last) + "\n") # print last closing price

last = print_chart(yunbi, 'BTC/CNY', '1h')
print("\n" + yunbi.name + " ₿ = CN¥ " + str(last) + "\n") # print last closing price
last = print_chart(gdax, 'BTC/USD', '1h')
print("\n" + gdax.name + " ₿ = $" + str(last) + "\n") # print last closing price
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
universal=1

[flake8]
ignore = E501, F401, F405
ignore = E501, F405
exclude =
.ropeproject,
.tox,
Expand Down

0 comments on commit eda77df

Please sign in to comment.