Begin implementing OANDA
This commit is contained in:
42
core/exchanges/__init__.py
Normal file
42
core/exchanges/__init__.py
Normal file
@@ -0,0 +1,42 @@
|
||||
from core.util import logs
|
||||
|
||||
|
||||
class BaseExchange(object):
|
||||
def __init__(self, account):
|
||||
name = self.__class__.__name__
|
||||
self.account = account
|
||||
self.log = logs.get_logger(name)
|
||||
self.client = None
|
||||
|
||||
self.connect()
|
||||
|
||||
def connect(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_supported_assets(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_balance(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_market_value(self, symbol):
|
||||
raise NotImplementedError
|
||||
|
||||
def post_trade(self, trade):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_trade(self, trade_id):
|
||||
raise NotImplementedError
|
||||
|
||||
def update_trade(self, trade):
|
||||
raise NotImplementedError
|
||||
|
||||
def cancel_trade(self, trade_id):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_position_info(self, asset_id):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_all_positions(self):
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user