示例#1
0
 def balance(self, exchange, pair):
     try:
         bmybit.get('/accounts/balance',
                    params={
                        'exchange': exchange,
                        'pair': pair
                    })
     except:
         print 'Could not get account balance'
示例#2
0
 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'
示例#3
0
 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'
示例#4
0
 def getExchanges():
     try:
         bmybit.get('/exchanges')
     except:
         print 'Could not get exchange list'
示例#5
0
 def getExchange(self, id):
     try:
         bmybit.get('/exchanges', params={'id': id})
     except:
         print 'Could not get exchange'
示例#6
0
 def get(self, exchange=None, pair=None):
     try:
         bmybit.get('/alarms', params={'exchange': exchange, 'pair': pair})
     except:
         print 'Could not get alarms'
示例#7
0
 def getStrategy(self, id):
     try:
         bmybit.get('/strategies', params={'id': id})
     except:
         print 'Could not get strategy'
示例#8
0
 def terminateStrategy():
     try:
         bmybit.get('/strategies/terminate', params={'id': id})
     except:
         print 'Could not terminate the strategy'
示例#9
0
 def getStrategies(self):
     try:
         bmybit.get('/strategies')
     except:
         print 'Could not get strategies'
示例#10
0
 def info(self):
     try:
         bmybit.get('/accounts/info')
     except:
         print 'Could not get account info'