mercadobitcoin

A Python wrapper for Mercado Bitcoin API


Keywords
bitcoin, litcoin, ethereum, ripple, mercadobitcoin, trade, orderbook
License
MIT
Install
pip install mercadobitcoin==0.6.0

Documentation

mercadobitcoin

Join the chat at https://gitter.im/python-mercadobitcoin/Lobby Build Status PyPI

A Python wrapper for Mercado Bitcoin API.

Installation

Directly from PyPI:

pip install mercadobitcoin

You can also install directly from the GitHub repository to have the newest features by running:

git clone https://github.com/alfakini/python-mercadobitcoin.git
cd python-mercadobitcoin
python setup.py install

Basic Usage

Below you can see the available Mercado Bitcoin API methods you can use:

import mercadobitcoin
mbtc = mercadobitcoin.Api()
mbtc.ticker()
mbtc.orderbook()
mbtc.trades()
mbtc.ticker_litecoin()
mbtc.orderbook_litecoin()
mbtc.trades_litecoin()

And the private Trade API:

from mercadobitcoin import TradeApi

mbtc = TradeApi(<API_ID>, <API_SECRET>)

mbtc.list_system_messages()
mbtc.get_account_info()
mbtc.get_order(coin_pair="BRLBTC", order_id=1)
mbtc.list_orders(coin_pair="BRLBTC")
mbtc.list_orderbook(coin_pair="BRLBTC")
mbtc.place_buy_order(coin_pair="BRLBTC", quantity="42.00", limit_price="5000")
mbtc.place_sell_order(coin_pair="BRLBTC", quantity="42.00", limit_price="5000")
mbtc.cancel_order(coin_pair="BRLBTC", order_id=1)
mbtc.get_withdrawal(coin="BRL", withdrawal_id=1)
mbtc.withdraw_coin(coin_pair="BRL", quantity="42", destiny="1", description="Trasfering Money.")

Development

Install development dependencies:

brew install libyaml
pip install -r requirements-development.txt

Run tests:

tox

References