Exemplo n.º 1
0
 def openOrders(self):
     URL = "/api2/1/private/openOrders"
     params = {}
     return httpPost(self.__url, URL, params, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 2
0
 def account(self):
     URL = "/v1/account"
     param = {}
     return httpPost(self.__url, URL, param, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 3
0
 def depositsWithdrawals(self, start,end):
     URL = "/api2/1/private/depositsWithdrawals"
     params = {'start': start,'end':end}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 4
0
 def cancelAllOrders(self, type, currencyPair):
     URL = "/api2/1/private/cancelAllOrders"
     params = {'type': type, 'currencyPair': currencyPair}
     return httpPost(self.__url, URL, params, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 5
0
 def cancelOrder(self, orderNumber, currencyPair):
     URL = "/api2/1/private/cancelOrder"
     params = {'orderNumber': orderNumber, 'currencyPair': currencyPair}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 6
0
 def balances(self):
     URL = "/api2/1/private/balances"
     param = {}
     return httpPost(self.__url, URL, param, self.__apiKey, self.__secretKey)
Exemplo n.º 7
0
 def getOrder(self, orderNumber, currencyPair):
     URL = "/api2/1/private/getOrder"
     params = {'orderNumber': orderNumber, 'currencyPair': currencyPair}
     data = json.loads( httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey), object_pairs_hook=OrderedDict)
     return json.dumps(data, indent=2)        
Exemplo n.º 8
0
 def depositsWithdrawals(self, start,end):
     URL = "/api2/1/private/depositsWithdrawals"
     params = {'start': start,'end':end}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 9
0
 def sell(self, currencyPair, rate, amount):
     URL = "/api2/1/private/sell"
     params = {'currencyPair': currencyPair, 'rate': rate, 'amount': amount}
     data = json.loads( httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey), object_pairs_hook=OrderedDict)
     return json.dumps(data, indent=2)
Exemplo n.º 10
0
 def cancelAllOrders(self, type, currencyPair):
     URL = "/api2/1/private/cancelAllOrders"
     params = {'type': type, 'currencyPair': currencyPair}
     data = json.loads( httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey), object_pairs_hook=OrderedDict)
     return json.dumps(data, indent=2)
Exemplo n.º 11
0
 def orderHistory(self, symbol, page):
     URL = "/v1/orderHistory"
     params = {'symbol': symbol, 'page': page}
     return httpPost(self.__url, URL, params, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 12
0
 def openOrders(self, page):
     URL = "/v1/openOrders"
     params = {'page': page}
     return httpPost(self.__url, URL, params, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 13
0
 def cancelOrder(self, symbol, orderId):
     URL = "/v1/cancelOrder"
     params = {'symbol': symbol, 'order_id': orderId}
     return httpPost(self.__url, URL, params, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 14
0
 def balances(self):
     URL = "/api2/1/private/balances"
     param = {}
     return httpPost(self.__url, URL, param, self.__apiKey, self.__secretKey)
Exemplo n.º 15
0
 def getOrderFormatted(self, orderNumber, currencyPair):
     URL = "/api2/1/private/getOrder"
     params = {'orderNumber': orderNumber, 'currencyPair': currencyPair}
     data = json.loads(httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey), object_pairs_hook=OrderedDict)
     print ("%s order:%s status:%s type:%s rate:%s amount:%s" % (currencyPair.upper(), data['order']['orderNumber'], data['order']['status'], data['order']['type'], data['order']['rate'], data['order']['amount']))
     return 0
Exemplo n.º 16
0
 def depositAddres(self,param):
     URL = "/api2/1/private/depositAddress"
     params = {'currency':param}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 17
0
 def myTradeHistory(self, currencyPair, orderNumber):
     URL = "/api2/1/private/tradeHistory"
     params = {'currencyPair': currencyPair, 'orderNumber': orderNumber}
     data = json.loads(httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey), object_pairs_hook=OrderedDict)
     return json.dumps(data, indent=2)
Exemplo n.º 18
0
 def sell(self, currencyPair, rate, amount):
     URL = "/api2/1/private/sell"
     params = {'currencyPair': currencyPair, 'rate': rate, 'amount': amount}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 19
0
 def balances(self):
     URL = "/api2/1/private/balances"
     param = {}
     data = json.loads( httpPost(self.__url, URL, param, self.__apiKey, self.__secretKey), object_pairs_hook=OrderedDict)
     return json.dumps(data, indent=2)
Exemplo n.º 20
0
 def withdraw(self, currency, amount, address):
     URL = "/api2/1/private/withdraw"
     params = {'currency': currency, 'amount': amount,'address':address}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 21
0
 def cancelAllOrders(self, type, currencyPair):
     URL = "/api2/1/private/cancelAllOrders"
     params = {'type': type, 'currencyPair': currencyPair}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 22
0
 def depositAddres(self,param):
     URL = "/api2/1/private/depositAddress"
     params = {'currency':param}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 23
0
 def openOrders(self):
     URL = "/api2/1/private/openOrders"
     params = {}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 24
0
 def sell(self, currencyPair, rate, amount):
     URL = "/api2/1/private/sell"
     params = {'currencyPair': currencyPair, 'rate': rate, 'amount': amount}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 25
0
 def mytradeHistory(self, currencyPair, orderNumber):
     URL = "/api2/1/private/tradeHistory"
     params = {'currencyPair': currencyPair, 'orderNumber': orderNumber}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 26
0
 def getOrder(self, orderNumber, currencyPair):
     URL = "/api2/1/private/getOrder"
     params = {'orderNumber': orderNumber, 'currencyPair': currencyPair}
     return httpPost(self.__url, URL, params, self.__apikey,
                     self.__secretkey)
Exemplo n.º 27
0
 def withdraw(self, currency, amount, address):
     URL = "/api2/1/private/withdraw"
     params = {'currency': currency, 'amount': amount,'address':address}
     return httpPost(self.__url, URL, params, self.__apiKey, self.__secretKey)
Exemplo n.º 28
0
 def mytradeHistory(self, currencyPair, orderNumber):
     URL = "/api2/1/private/tradeHistory"
     params = {'currencyPair': currencyPair, 'orderNumber': orderNumber}
     return httpPost(self.__url, URL, params, self.__apiKey,
                     self.__secretKey)
Exemplo n.º 29
0
 def getOrder(self, orderNumber, currencyPair):
     URL = "/api2/1/private/getOrder"
     return httpPost(self.__url, URL, params, self.__apikey, self.__secretkey)