Skip to content

Commit

Permalink
Converted filenames to lowercase. Established convention for ABC file…
Browse files Browse the repository at this point in the history
…s & classnames. Fixed imports and renamed the component files inside exchanges to match.
  • Loading branch information
EmersonDove committed Jul 20, 2021
1 parent da62e25 commit 429a2cc
Show file tree
Hide file tree
Showing 70 changed files with 148 additions and 631 deletions.
File renamed without changes.
17 changes: 8 additions & 9 deletions Blankly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

from Blankly.exchanges.interfaces.Coinbase_Pro.Coinbase_Pro import Coinbase_Pro as Coinbase_Pro
from Blankly.exchanges.interfaces.Binance.Binance import Binance as Binance
from Blankly.exchanges.interfaces.Alpaca.Alpaca import Alpaca as Alpaca
from Blankly.exchanges.interfaces.Paper_Trade.Paper_Trade import PaperTrade as PaperTrade
from Blankly.exchanges.interfaces.coinbase_pro.coinbase_pro import CoinbasePro
from Blankly.exchanges.interfaces.Binance.Binance import Binance
from Blankly.exchanges.interfaces.Alpaca.alpaca import Alpaca
from Blankly.exchanges.interfaces.paper_trade.paper_trade import PaperTrade
from Blankly.strategy import Strategy as Strategy
from Blankly.strategy import StrategyState as StrategyState

from Blankly.exchanges.managers.ticker_manager import TickerManager as TickerManager
from Blankly.exchanges.managers.orderbook_manager import OrderbookManger as OrderbookManager
from Blankly.exchanges.managers.general_stream_manager import GeneralManager as GeneralManager
from Blankly.exchanges.interfaces.abc_currency_interface import ICurrencyInterface as Interface
from Blankly.exchanges.managers.ticker_manager import TickerManager
from Blankly.exchanges.managers.orderbook_manager import OrderbookManger
from Blankly.exchanges.managers.general_stream_manager import GeneralManager
from Blankly.exchanges.interfaces.abc_exchange_interface import ABCExchangeInterface as Interface
from Blankly.strategy.blankly_bot import BlanklyBot
import Blankly.utils.utils as utils
from Blankly.utils.scheduler import Scheduler
import Blankly.indicators as indicators
from Blankly.utils import time_builder

6 changes: 3 additions & 3 deletions Blankly/deployment/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def init(self, auth_path, preferences_path):

def create_portfolio(self, exchange_type, portfolio_name):
if exchange_type == "coinbase_pro":
self.__exchanges.append(Blankly.Coinbase_Pro(portfolio_name=portfolio_name,
auth_path=self.__auth_path,
preferences_path=self.__preferences_path))
self.__exchanges.append(Blankly.CoinbasePro(portfolio_name=portfolio_name,
auth_path=self.__auth_path,
preferences_path=self.__preferences_path))
elif exchange_type == "binance":
self.__exchanges.append(Blankly.Binance(portfolio_name=portfolio_name,
auth_path=self.__auth_path,
Expand Down
39 changes: 0 additions & 39 deletions Blankly/exchanges/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import abc


class IExchange(abc.ABC):
class ABCExchange(abc.ABC):
"""
Functions required for easy interaction with the GUI/main
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import abc


class IExchangeWebsocket(abc.ABC):
class ABCExchangeWebsocket(abc.ABC):
"""
Each of these functions are required to be implemented for interaction with the ticker manager class.
"""
Expand Down
2 changes: 1 addition & 1 deletion Blankly/exchanges/auth/abc_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from Blankly.utils.exceptions import AuthError


class AuthInterface(abc.ABC):
class ABCAuth(abc.ABC):
def __init__(self, keys_file: str, portfolio_name: str, exchange: str):
"""
Create a auth interface
Expand Down
8 changes: 4 additions & 4 deletions Blankly/exchanges/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import Blankly
from Blankly.exchanges.IExchange import IExchange
from Blankly.exchanges.abc_exchange import ABCExchange
from Blankly.exchanges.interfaces.Coinbase_Pro.Coinbase_Pro_Interface import CoinbaseProInterface
from Blankly.exchanges.interfaces.Binance.Binance_Interface import BinanceInterface
from Blankly.exchanges.auth.auth_factory import AuthFactory
from Blankly.exchanges.interfaces.direct_calls_factory import DirectCallsFactory

from Blankly.exchanges.interfaces.abc_currency_interface import ICurrencyInterface
from Blankly.exchanges.interfaces.abc_exchange_interface import ABCExchangeInterface
import time
import abc


class Exchange(IExchange, abc.ABC):
class Exchange(ABCExchange, abc.ABC):

def __init__(self, exchange_type, portfolio_name, keys_path, preferences_path):
self.__type = exchange_type # coinbase_pro, binance, alpaca
Expand Down Expand Up @@ -58,7 +58,7 @@ def construct_interface(self, calls):
elif self.__type == "binance":
self.Interface = BinanceInterface(self.__type, calls)

def get_interface(self) -> ICurrencyInterface:
def get_interface(self) -> ABCExchangeInterface:
"""
Get the the authenticated interface for the object. This will provide authenticated API calls.
"""
Expand Down
251 changes: 0 additions & 251 deletions Blankly/exchanges/interfaces/Coinbase_Pro/orderbook_cbpro.py

This file was deleted.

Loading

0 comments on commit 429a2cc

Please sign in to comment.