From a0ca464a42eb6b5533dae036a6f4eee3b2a313e8 Mon Sep 17 00:00:00 2001
From: Eric Somdahl <ericsomdahl@gmail.com>
Date: Sun, 6 Aug 2017 16:52:53 -0400
Subject: [PATCH] remove market order support, per #27

---
 bittrex/bittrex.py | 41 +----------------------------------------
 requirements.txt   |  1 +
 2 files changed, 2 insertions(+), 40 deletions(-)
 create mode 100644 requirements.txt

diff --git a/bittrex/bittrex.py b/bittrex/bittrex.py
index c79df6e..1fe37b7 100644
--- a/bittrex/bittrex.py
+++ b/bittrex/bittrex.py
@@ -35,7 +35,7 @@ def encrypt(api_key, api_secret, export=True, export_fn='secrets.json'):
     cipher = AES.new(getpass.getpass('Input encryption password (string will not show)'))
     api_key_n = cipher.encrypt(api_key)
     api_secret_n = cipher.encrypt(api_secret)
-    api = {'key': str(api_key_n), 'secret':str(api_secret_n)}
+    api = {'key': str(api_key_n), 'secret': str(api_secret_n)}
     if export:
         with open(export_fn, 'w') as outfile:
             json.dump(api, outfile)
@@ -63,7 +63,6 @@ def decrypt(self):
         else:
             raise ImportError('"pycrypto" module has to be installed')
 
-
     def api_query(self, method, options=None):
         """
         Queries Bittrex with given method and options
@@ -173,24 +172,6 @@ def get_market_history(self, market, count):
         """
         return self.api_query('getmarkethistory', {'market': market, 'count': count})
 
-    def buy_market(self, market, quantity):
-        """
-        Used to place a buy order in a specific market. Use buymarket to
-        place market orders. Make sure you have the proper permissions
-        set on your API keys for this call to work
-        /market/buymarket
-        :param market: String literal for the market (ex: BTC-LTC)
-        :type market: str
-        :param quantity: The amount to purchase
-        :type quantity: float
-        :param rate: The rate at which to place the order.
-            This is not needed for market orders
-        :type rate: float
-        :return:
-        :rtype : dict
-        """
-        return self.api_query('buymarket', {'market': market, 'quantity': quantity})
-
     def buy_limit(self, market, quantity, rate):
         """
         Used to place a buy order in a specific market. Use buylimit to place
@@ -209,24 +190,6 @@ def buy_limit(self, market, quantity, rate):
         """
         return self.api_query('buylimit', {'market': market, 'quantity': quantity, 'rate': rate})
 
-    def sell_market(self, market, quantity):
-        """
-        Used to place a sell order in a specific market. Use sellmarket to place
-        market orders. Make sure you have the proper permissions set on your
-        API keys for this call to work
-        /market/sellmarket
-        :param market: String literal for the market (ex: BTC-LTC)
-        :type market: str
-        :param quantity: The amount to purchase
-        :type quantity: float
-        :param rate: The rate at which to place the order.
-            This is not needed for market orders
-        :type rate: float
-        :return:
-        :rtype : dict
-        """
-        return self.api_query('sellmarket', {'market': market, 'quantity': quantity})
-
     def sell_limit(self, market, quantity, rate):
         """
         Used to place a sell order in a specific market. Use selllimit to place
@@ -276,8 +239,6 @@ def get_balances(self):
         """
         return self.api_query('getbalances', {})
    
-   
-
     def get_balance(self, currency):
         """
         Used to retrieve the balance from your account for a specific currency
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..f229360
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+requests