Skip to content

Commit

Permalink
Enable ETH (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
citec authored and Alan Fachini committed Mar 13, 2019
1 parent cde2fae commit 6a046b8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions mercadobitcoin/trade_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,56 +63,56 @@ def get_account_info(self):
def get_order(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#get_order"""

check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP"], "order_id": int })
check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP", "BRLETH"], "order_id": int })
return self.__check_response(self.__post_tapi("get_order", kwargs))


def list_orders(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#list_orders"""

check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP"] }, { "order_type": [1, 2], "status_list": str, "has_fills": [True, False], "from_id": int, "to_id": int, "from_timestamp": str, "to_timestamp": str })
check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP", "BRLETH"] }, { "order_type": [1, 2], "status_list": str, "has_fills": [True, False], "from_id": int, "to_id": int, "from_timestamp": str, "to_timestamp": str })
return self.__check_response(self.__post_tapi("list_orders", kwargs ))


def list_orderbook(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#list_orderbook"""

check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP"] }, { "full": [True, False] })
check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP", "BRLETH"] }, { "full": [True, False] })
return self.__check_response(self.__post_tapi("list_orderbook", kwargs ))


def place_buy_order(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#place_buy_order"""

check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP"], "quantity": str, "limit_price": str })
check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP", "BRLETH"], "quantity": str, "limit_price": str })
return self.__check_response(self.__post_tapi("place_buy_order", kwargs ))


def place_sell_order(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#place_sell_order"""

check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP"], "quantity": str, "limit_price": str })
check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP", "BRLETH"], "quantity": str, "limit_price": str })
return self.__check_response(self.__post_tapi("place_sell_order", kwargs ))


def cancel_order(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#cancel_order"""

check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP"], "order_id": int })
check_args(kwargs, { "coin_pair": ["BRLBTC", "BRLLTC", "BRLBCH", "BRLXRP", "BRLETH"], "order_id": int })
return self.__check_response(self.__post_tapi("cancel_order", kwargs ))


def get_withdrawal(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#get_withdrawal"""

check_args(kwargs, { "coin": ["BRL", "BTC", "LTC", "BCH", "XRP"], "withdrawal_id": int })
check_args(kwargs, { "coin": ["BRL", "BTC", "LTC", "BCH", "XRP", "ETH"], "withdrawal_id": int })
return self.__check_response(self.__post_tapi("get_withdrawal", kwargs ))


def withdraw_coin(self, **kwargs):
"""https://www.mercadobitcoin.com.br/trade-api/#withdraw_coin"""

check_args(kwargs, { "coin": ["BRL", "BTC", "LTC", "BCH", "XRP"], "quantity": str, "destiny": str }, { "description": str })
check_args(kwargs, { "coin": ["BRL", "BTC", "LTC", "BCH", "XRP", "ETH"], "quantity": str, "destiny": str }, { "description": str })
return self.__check_response(self.__post_tapi("withdraw_coin", kwargs ))


Expand Down

0 comments on commit 6a046b8

Please sign in to comment.