def balance(self, exchange, pair): try: bmybit.get('/accounts/balance', params={ 'exchange': exchange, 'pair': pair }) except: print 'Could not get account balance'
def createOrder(self, exchange, pair, currency, amount): try: # should be a post request !! bmybit.get('/exchanges/order', params={ 'exchange': exchange, 'pair': pair, 'currency': currency, 'condition': amount }) except: print 'Could not create the order'
def startStrategy(self, exchange, pair, currency, amout, level, risk, lockin): try: bmybit.get('/strategies/start', params={ 'exchange': exchange, 'pair': pair, 'currency': currency, 'condition': amount, 'level': level, 'risk': risk, 'lockin': lockin }) except: print 'Could not start the strategy'
def getExchanges(): try: bmybit.get('/exchanges') except: print 'Could not get exchange list'
def getExchange(self, id): try: bmybit.get('/exchanges', params={'id': id}) except: print 'Could not get exchange'
def get(self, exchange=None, pair=None): try: bmybit.get('/alarms', params={'exchange': exchange, 'pair': pair}) except: print 'Could not get alarms'
def getStrategy(self, id): try: bmybit.get('/strategies', params={'id': id}) except: print 'Could not get strategy'
def terminateStrategy(): try: bmybit.get('/strategies/terminate', params={'id': id}) except: print 'Could not terminate the strategy'
def getStrategies(self): try: bmybit.get('/strategies') except: print 'Could not get strategies'
def info(self): try: bmybit.get('/accounts/info') except: print 'Could not get account info'