{ "info": { "author": "Mario Romero", "author_email": "mario@bitso.com", "bugtrack_url": null, "classifiers": [], "description": "# bitso-py #\n\n\nA Python 2 and Python 3 wrapper for the [Bitso API](https://bitso.com/api_info/) \n\n[![Build Status](https://travis-ci.org/mariorz/python-bitso.svg?branch=master)](https://travis-ci.org/mariorz/python-bitso) [![Requirements Status](https://requires.io/github/mariorz/python-bitso/requirements.svg?branch=master)](https://requires.io/github/mariorz/python-bitso/requirements/?branch=master) \n\n# Public API Usage #\n\n```python\n >>> import bitso\n >>> api = bitso.Api()\n```\n\n\n# Private API Usage #\n\n```python\n >>> import bitso\n\n## Production account\n >>> api = bitso.Api(API_KEY, API_SECRET)\n\n## Developer account\n >>> api = bitso.Api(API_KEY, API_SECRET,\"dev\")\n\n```\n\n\n# Public calls #\n\n### Available Books ###\n\n```python\n## Order books available on Bitso\n >>> books = api.available_books()\n >>> books\nAvilableBooks(books=btc_mxn,eth_mxn)\n >>> books.btc_mxn\nBook(symbol=btc_mxn)\n >>> books.btc_mxn.minimum_amount\nDecimal('0.00500000')\n ```\n\n\n### Ticker ###\n\n```python\n## Ticker information\n## Parameters\n## [book] - Specifies which book to use\n## - string\n >>> tick = api.ticker('btc_mxn')\n >>> tick\n Ticker(ask=7866.27, bid=7795.00, high=7866.27, last=7866.27, low=7707.43, datetime=2016-04-22 16:46:25, vwaplow=7795.00)\n >>> tick.last\n Decimal('7866.27')\n >>> tick.created_at\n datetime.datetime(2016, 4, 22, 16, 46, 53)\n ```\n\n\n### Order Book ###\n\n```python\n## Public order book\n## Parameters\n## [book] - Specifies which book to use\n## - string\n## [aggregate = True] - Group orders with the same price\n## - boolean\n>>> ob = api.order_book('btc_mxn')\n>>> ob.updated_at\natetime.datetime(2016, 12, 13, 22, 54, 2, tzinfo=tzutc()) \n>>> ob.bids\n[PublicOrder(book=btc_mxn,price=3160.00, amount=0.63966069),\n PublicOrder(book=btc_mxn,price=2959.00, amount=0.72143122),\n PublicOrder(book=btc_mxn,price=2850.00, amount=3.00000000),\n PublicOrder(book=btc_mxn,price=2750.00, amount=1.00000000),\n PublicOrder(book=btc_mxn,price=2500.12, amount=45.00000000),\n ...\n]\n>>> ob.asks\n\n[PublicOrder(book=btc_mxn,price=8000.00, amount=48.37402966),\n PublicOrder(book=btc_mxn,price=8160.00, amount=0.12340000),\n PublicOrder(book=btc_mxn,price=9000.00, amount=40.00000000),\n PublicOrder(book=btc_mxn,price=9160.00, amount=0.76500000)\n ...\n ]\n\n```\n\n### Trades ###\n\n```python\n## Public trades\n## Parameters\n## [book = 'btc_mxn'] - Specifies which book to use\n## - str\n## [marker = None] - Returns objects that are older or newer (depending on 'sort\u2019) than the object with this ID\n## - str\n## [sort = 'desc'] - Specifies ordering direction of returned objects (asc, desc)\n## - str\n## [limit = '25'] - Specifies number of objects to return. (Max is 100)\n## - str\n\n>>> trades = api.trades('btc_mxn')\n>>> trades\n[Trade(tid=1602, price=3160.00, amount=0.00797922, maker_side=buy, created_at=2016-12-13 21:32:05+00:00),\n Trade(tid=1601, price=3160.00, amount=0.01000000, maker_side=buy, created_at=2016-12-13 21:32:05+00:00),\n Trade(tid=1600, price=8000.00, amount=0.00312500, maker_side=sell, created_at=2016-12-13 21:32:04+00:00),\n Trade(tid=1599, price=8000.00, amount=0.01008572, maker_side=sell, created_at=2016-12-13 21:32:04+00:00),\n ...\n ]\n\n>>> trades[0].price\nDecimal('3160.00')\n>>> trades[0].amount\nDecimal('0.00797922')\n>>> trades[0].created_at\ndatetime.datetime(2016, 12, 13, 21, 32, 5, tzinfo=tzutc())\n\n```\n\n\n# Private calls #\n\nPrivate endpoints are used to manage your account and your orders. These requests must be signed\nwith your [Bitso credentials](https://bitso.com/api_info#generating-api-keys) \n\n```python\n >>> import bitso\n >>> api = bitso.Api(API_KEY, API_SECRET)\n```\n\n### Account Status ###\n\n```python\n## Your account status\n>>> status = api.account_status()\n>>> status.daily_limit\nDecimal('5300')\n>>> status.daily_remaining\nDecimal('5300.00')\n\n```\n\n\n\n### Account Balances ###\n\n```python\n## Your account balances\n>>> balances = api.balances()\n>>> balances\nBalances(currencies=btc,etc,eth,mxn)\n>>> balances.currencies\n[u'btc', u'etc', u'eth', u'mxn']\n>>> balances.btc.name\nu'btc'\n>>> balances.btc.available\nDecimal('3.46888741')\n\n```\n\n### Fees ###\n\n```python\n## Your trade fees\n>>> fees = api.fees()\n>>> fees\nFees(books=btc_mxn,eth_mxn)\n>>> fees.books\n[u'btc_mxn', u'eth_mxn']\n>>> fees.btc_mxn\nFee(book=btc_mxn, fee_percent=0.0000)\n>>> fees.btc_mxn.fee_percent\nDecimal('0.8500')\n>>> fees.withdrawal_fees\nWithdawalFees(curencies=eth,btc)\n>>> fees.withdrawal_fees.btc\nDecimal('0.001')\n\n```\n\n### Ledger ###\n```python\n## A ledger of your historic operations.\n## Parameters\n## [marker] - Returns objects that are older or newer (depending on 'sort\u2019) than the object with this ID\n## - string\n## [limit = 25] - Limit result to that many transactions\n## - int\n## [sort = 'desc'] - Sorting by datetime\n## - string - 'asc' or\n## - 'desc'\n\n>>> ledger = api.ledger()\n>>> ledger\n[,\n ,\n ,\n ,\n ,\n ...\n ]\n>>> ledger[0].operation\nu'fee'\n>>> ledger[1].operation\nu'trade'\n>>> ledger[1].balance_updates\n[BalanceUpdate(currency=mxn, amount=25.21433520,\nBalanceUpdate(currency=btc, amount=-0.00797922]\n>>> ledger[1].balance_updates[0].amount\nDecimal('25.21433520')\n```\n\n### Withdrawals ###\n\n```python\n## Detailed info on your fund withdrawals.\n## Parameters\n## [wids] - Specifies which withdrawal objects to return by IDs\n## - list\n## [marker] - Returns objects that are older or newer (depending on 'sort\u2019) than the object with this ID\n## - string\n## [limit = 25] - Limit result to that many transactions\n## - int\n## [sort = 'desc'] - Sorting by datetime\n## - string - 'asc' or\n## - 'desc'\n\n>>> withdrawals = api.withdrawals()\n>>> withdrawals\n[Withdrawal(wid=019e8f42da7eb0e44bf5ce0013475058, amount=0.001, currency=btc),\n Withdrawal(wid=efa28b88e326619d91ba809a82e1282b, amount=0.001, currency=btc),\n Withdrawal(wid=9bbde562c7de3e0c5315993a944d3873, amount=0.001, currency=btc),\n Withdrawal(wid=e19b33a5ec2606e8a25963ceea9d2254, amount=0.001, currency=btc),\n Withdrawal(wid=b76af418eb94c61b72c6bb20d316e115, amount=0.001, currency=btc),\n ...\n ]\n>>> withdrawals[0].status\nu'pending'\n>>> withdrawals[0].method\nu'Bitcoin'\n>>> withdrawals[0].amount\nDecimal('0.001')\n```\n\n### Fundings ###\n\n```python\n## Detailed info on your fundings.\n## Parameters\n## [fids] - Specifies which funding objects to return by IDs\n## - list\n## [marker] - Returns objects that are older or newer (depending on 'sort\u2019) than the object with this ID\n## - string\n## [limit = 25] - Limit result to that many transactions\n## - int\n## [sort = 'desc'] - Sorting by datetime\n## - string - 'asc' or\n## - 'desc'\n\n>>> fundings = api.fundings()\n>>> fundings\n[Funding(fid=4e28aa988a74d8b9868f400a18d00910, amount=49596.65217865, currency=mxn),\n Funding(fid=3799c39ea8f1ccf6e6bbcaea1a0cbed1, amount=8.12500000, currency=btc)]\n>>> fundings[0].status\nu'complete'\n>>> fundings[0].amount\nDecimal('49596.65217865')\n```\n\n\n\n\n### User Trades ###\n\n```python\n## Your trades\n## Parameters\n## [book = all]- Specifies which book to use\n## - string\n## [marker] - Returns objects that are older or newer (depending on 'sort\u2019) than the object with this ID\n## - string\n## [limit = 25] - Limit result to that many transactions\n## - int\n## [sort = 'desc'] - Sorting by datetime\n## - string - 'asc' or\n## - 'desc'\n>>> utx = api.user_trades()\n>>> utx\n[UserTrade(tid=1610, book=btc_mxn, price=3160.00, major=-0.00797922, minor=25.21433520),\n UserTrade(tid=1609, book=btc_mxn, price=3160.00, major=-0.01000000, minor=31.60000000),\n UserTrade(tid=1608, book=btc_mxn, price=8000.00, major=0.00312500, minor=-25.00000000),\n UserTrade(tid=1607, book=btc_mxn, price=8000.00, major=0.01008572, minor=-80.68576000),\n ...,\n ]\n\n>>> utx[0].type\n'trade'\n>>> utx[0].btc\nDecimal('0.00981097')\n>>> txs[0].btc_mxn\nDecimal('7780.00')\n>>> txs[0].rate\nDecimal('7780.00')\n\n\n```\n\n### Open Orders ###\n\n```python\n## Returns a list of the user\u2019s open orders\n## Parameters\n## [book] - Specifies which book to use\n## - str\n## [marker] - Returns objects that are older or newer (depending on 'sort\u2019) than the object with this ID\n## - string\n## [limit = 25] - Limit result to that many transactions\n## - int\n## [sort = 'desc'] - Sorting by datetime\n## - string - 'asc' or\n## - 'desc'\n\n>>> oo = api.open_orders('btc_mxn')\n>>> oo\n[Order(oid=s5ntlud6oupippk8iigw5dazjdxwq5vibjcwdp32ksk9i4h0nyxsc8svlpscuov5, side=buy, price=7000.00, original_amount=0.01000000, created_datetime=2016-04-22 14:31:10)]\n>>> oo[0].price\nDecimal('7000.00')\n>>> oo[0].oid\ns5ntlud6oupippk8iigw5dazjdxwq5vibjcwdp32ksl9i4h0nyxsc8svlpscuov5\n\n```\n\n### Lookup Order ###\n\n```python\n## Returns a list of details for 1 or more orders\n## Parameters\n## order_ids - A list of Bitso Order IDs.\n## - string\n>>> orders = api.lookup_order([ORDER_ID1, ORDER_ID2])\n>>> orders\n[Order(oid=s0ntlud6oupippk8iigw5dazjdxwq5vibjcwdp12ksk9i4h0nyxsc8svlpscuov5, side=buy, price=7000.00, original_amount=0.01000000, created_datetime=2016-04-22 14:31:10),\n Order(oid=whtyptv0f348fajdydoswcf6cj20d0kahd77657l7ctnnd1lrpdn2suebwfpxz0f, side=buy, price=7200.00, original_amount=0.01200000, created_datetime=2016-04-22 14:32:10)]\n```\n\n### Cancel Order ###\n\n```python\n## Cancels an open order\n## Parameters\n## order_id - A Bitso Order ID.\n## - string\n>>> api.cancel_order(ORDER_ID)\nu'true' #on success\n```\n\n### Place Order ###\n\n```python\n## Places a buy limit order.\n## [book] - Specifies which book to use (btc_mxn, eth_mxn)\n## - str\n## [side] - the order side (buy, sell) \n## - str\n## [order_type] - the order type (limit, market) \n## - str\n## amount - Amount of major currency to buy.\n## - string\n## major - The amount of major currency for this order. An order must be specified in terms of major or minor, never both.\n## - string. Major denotes the cryptocurrency, in our case Bitcoin (BTC) or Ether (ETH).\n## minor - The amount of minor currency for this order. Minor denotes fiat currencies, in our case Mexican Peso (MXN)\n## - string\n## price - Price per unit of major. For use only with limit orders\n## - string\n\n>>> order = api.place_order(book='btc_mxn', side='buy', order_type='limit', major='.01', price='7000.00')\n>>> order\n{\"oid\":\"jli47Q3gQqXflk1n\"}\n```\n\n\n### Funding Destination Address ###\n\n```python\n## Gets a Funding destination address to fund your account\n## fund_currency - Specifies the currency you want to fund your account with (btc, eth, mxn)\n## - str\n>>> fd = api.funding_destination('btc')\n>>> fd\nFundingDestination(account_identifier_name=Bitcoin address)\n## Returns a FundingDestination object\n>>> fd.account_identifier\nu'3CEWgs1goBbafUoThjWff4oX4wQKfxqpeV'\n## account_identifier attribute is the address you can use to fund your account\n```\n\n\n### Bitcoin Withdrawal ###\n\n```python\n## Triggers a bitcoin withdrawal from your account\n## amount - The amount of BTC to withdraw from your account\n## - string\n## address - The Bitcoin address to send the amount to\n## - string\n>>> api.btc_withdrawal('0.000000001', '1TVXn5ajmMQEbkiYNobgHVutVtMWcNZGV')\nok # Returns 'ok' on success\n```\n\n### Ether Withdrawal ###\n\n```python\n## Triggers an ether withdrawal from your account\n## amount - The amount of ETH to withdraw from your account\n## - string\n## address - The Ethereum address to send the amount to\n## - string\n>>> api.eth_withdrawal('0.000000001', '0x55f03a62acc946dedcf8a0c47f16ec3892b29e6d')\nok # Returns 'ok' on success\n```\n\n\n\n### Ripple Withdrawal ###\n\n```python\n## Triggers a ripple withdrawal from your account\n## currency - The currency to withdraw\n## - string\n## amount - The amount of currency to withdraw from your account\n## - string\n## address - The ripple address to send the amount to\n## - string\n>>> api.ripple_withdrawal('xrp', '1.10', 'rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn')\nok # Returns 'ok' on success\n```\n\n\n\n### Bank Withdrawal (SPEI) ###\n\n```python\n## Triggers a SPEI withdrawal from your account. These withdrawals are\n## immediate during banking hours (M-F 9:00AM - 5:00PM Mexico City Time).\n##\n## amount - The amount of MXN to withdraw from your account\n## - string\n## recipient_given_names - The recipient\u2019s first and middle name(s)\n## - string\n## recipient_family_names - The recipient\u2019s last name)\n## - string\n## clabe - The CLABE number where the funds will be sent to\n## - string\n## notes_ref - The alpha-numeric reference number for this SPEI\n## - string\n## numeric_ref - The numeric reference for this SPEI\n## - string\n\n\n>>> api.spei_withdrawal(amount='3500.0', first_names='Satoshi', last_names='Nakamoto', clabe=CLABE, notes_ref=NOTES_REF, numeric_ref=NUMERIC_REF)\nok # Returns 'ok' on success\n```\n\n\n\n# Transfer API #\n\n**Access to this API is available on request, and not enabled by default. Users won\u2019t be able to use this API unless Bitso has enabled it on their account. [API Docs](https://bitso.com/api_info/?shell#transfer-api5)**\n\nBitso\u2019s powerful Transfer API allows for simple integration for routing Bitcoin payments directly through to a choice of Mexican Peso end-points.\n\nThe workflow is as follows:\n\n```python\n## Request quote\n>>> quote = api.transfer_quote(amount='25.0', currency='MXN')\n## Create transfer using quote\n>>> transfer = api.transfer_create(amount='25.0', currency='MXN', rate=quote.rate, payment_outlet='vo', email_address='mario@ret.io', recipient_given_name='mario romero')\n## Send bitcoins to address given\n>>> print(transfer.wallet_address)\n## Check Transfer status, after 1 confirmation, pesos are delivered\n>>> print(api.transfer_status(transfer.id).status)\nu'confirming'\n```\n\n### Get Transfer Quote ###\n\n```python\n## Get a quote for a transfer for various Bitso Outlets.\n##\n## btc_amount - Mutually exclusive with amount. Either this, or amount should\n## be present in the request. The total amount in Bitcoins, as\n## provided by the user. NOTE: The amount is in BTC format\n## (900mbtc = .9 BTC).\n## - string\n## amount - Mutually exclusive with btc_amount. Either this, or btc_amount\n## should be present in the request. The total amount in Fiat currency.\n## Use this if you prefer specifying amounts in fiat instead of BTC.\n## - string\n## currency - An ISO 4217 fiat currency symbol (ie, \"MXN\"). If btc_amount is\n## provided instead of amount, this is the currency to which the BTC\n## price will be converted into. Otherwise, if amount is specified\n## instead of btc_amount, this is the currency of the specified amount.\n## - string\n\n>>> quote = api.transfer_quote(amount='25.0', currency='MXN')\n>>> print(quote)\nTransactionQuote(btc_amount=0.00328834, currency=MXN, rate=7602.60, created_at=2016-05-03 00:33:06, expires_at=2016-05-03 00:34:06, gross=25.00)\n>>> quote.btc_amount\nDecimal('0.00328834')\n>>> quote.outlets.keys()\n[u'sp', u'rp', u'vo', u'bw', u'pm']\n>>> quote.outlets['vo']\n{u'available': True,\n u'daily_limit': Decimal('0.00'),\n u'fee': Decimal('0.00'),\n u'id': u'vo',\n u'maximum_transaction': Decimal('9999.00'),\n u'minimum_transaction': Decimal('25.00'),\n u'name': u'Voucher',\n u'net': Decimal('25.00'),\n u'optional_fields': [],\n u'required_fields': {u'email_address': {u'id': u'email_address',\n u'name': u'Email Address'},\n u'recipient_given_name': {u'id': u'recipient_given_name', u'name': u''}},\n u'verification_level_requirement': u'0'}\n\n```\n\n### Create Transfer ###\n\n```python\n## Get a quote for a transfer for various Bitso Outlets.\n##\n## btc_amount - Mutually exclusive with amount. Either this, or amount should\n## be present in the request. The total amount in Bitcoins, as\n## provided by the user. NOTE: The amount is in BTC format\n## (900mbtc = .9 BTC).\n## - string\n## amount - Mutually exclusive with btc_amount. Either this, or btc_amount\n## should be present in the request. The total amount in Fiat currency.\n## Use this if you prefer specifying amounts in fiat instead of BTC.\n## - string\n## currency - An ISO 4217 fiat currency symbol (ie, \"MXN\"). If btc_amount is\n## provided instead of amount, this is the currency to which the BTC\n## price will be converted into. Otherwise, if amount is specified\n## instead of btc_amount, this is the currency of the specified amount.\n## - string\n## rate - This is the rate (e.g. BTC/MXN), as acquired from the\n## transfer_quote method. You must request a quote in this way before\n## creating a transfer.\n## - string\n## payment_outlet - The outlet_id as provided by quote method.\n## - string\n## required fields parameters - Each of the other 'required_fields', \n## as stipulated in the TransferQuote for the chosen payment_outlet.\n## - string\n\n>>> transfer = api.transfer_create(amount='25.0', currency='MXN', rate=quote.rate, payment_outlet='vo', email_address='satoshin@gmx.com', recipient_given_name='satoshi nakamoto')\n>>> print(transfer)\nTransactionQuote(btc_amount=0.00328834, currency=MXN, rate=7602.60, created_at=2016-05-03 00:33:06, expires_at=2016-05-03 00:34:06, gross=25.00)\n>>> transfer.btc_amount\nDecimal('0.00328834')\n>>> quote.wallet_address\nu'3LiLpKyfXJmeDcD5ABGtmHGjkxnZTHnBxv'}\n\n```\n\n\n### Get Transfer Status ###\n\n```python\n## Request status for a transfer order \n##\n## transfer_id - Bitso Transfer Order ID (As returned by transfer_create\n## method.\n## - string\n\n>>> print(api.transfer_status(transfer.id).status)\nu'confirming'\n\n```\n# Websocket API #\n\nWebSocket is a protocol providing full-duplex communication channels over a single TCP connection. [Bitso's Websocket API](https://bitso.com/api_info/?shell#websocket-api) allows a continuous connection that will receive updates according to the client's subscribed channels.\n\n#### Available Channels: ####\n+ **'trades':** will send updates on each new registered trade.\n+ **'diff-orders':** will send across any modifications to the order book. Specifically, any state changes in existing orders (including orders not in the top 20), and any new orders.\n+ **'orders':** maintains an up-to-date list of the top 20 asks and the top 20 bids, new updates are sent across the channel whenever there is a change in either top 20.\n\n#### Basic Example ####\nPrints every trade.\n```python\nfrom bitso import websocket\n\n\nclass BasicBitsoListener(websocket.Listener):\n def on_connect(self):\n print(\"Connected\")\n\n def on_update(self, data):\n for obj in data.updates:\n print(obj)\n\nif __name__ == '__main__':\n listener = BasicBitsoListener()\n client = websocket.Client(listener)\n channels = ['trades']\n book = 'btc_mxn'\n client.connect(channels, book)\n\n```\n\n```shell\n> python examples/ws_trades.py\nConnected\nTradeUpdate(tid=96093, amount=0.00296048, rate=8444.56,value=25)\nTradeUpdate(tid=96094, amount=0.0568058, rate=8444.56,value=479.7)\nTradeUpdate(tid=96095, amount=0.45721742, rate=8444.56,value=3861)\nTradeUpdate(tid=96096, amount=1.25176796, rate=8335.88,value=10434.58)\nTradeUpdate(tid=96097, amount=0.75948406, rate=8335.83,value=6330.93)\nTradeUpdate(tid=96098, amount=0.38027314, rate=8334.31,value=3169.31)\nTradeUpdate(tid=96099, amount=0.54340182, rate=8329.95,value=4526.5)\nTradeUpdate(tid=96100, amount=0.44632784, rate=8323.59,value=3715.04)\nTradeUpdate(tid=96101, amount=0.03216174, rate=8322.31,value=267.65)\nTradeUpdate(tid=96102, amount=2.92387591, rate=8318.13,value=24321.17)\nTradeUpdate(tid=96103, amount=0.27482146, rate=8313.96,value=2284.85)\nTradeUpdate(tid=96104, amount=1.33065393, rate=8312,value=11060.39)\nTradeUpdate(tid=96105, amount=0.70166614, rate=8310.66,value=5831.3)\nTradeUpdate(tid=96106, amount=0.11416146, rate=8434.37,value=962.88)\n```\n\n#### Advanced Example ####\nGets a copy of the order book via the rest API once, and keeps it up to date using the **'diff-orders'** channel. Logs every order, spread update, or trade.\n\nSee [examples/livebookexample.py](https://github.com/bitsoex/bitso-py/blob/master/examples/livebookexample.py)\n\n```shell\n> python examples/livebookexample.py\n2016-05-09 20:17:32,232 - INFO - Starting new HTTPS connection (1): bitso.com\n2016-05-09 20:17:33,118 - INFO - Order Book Fetched. Best ask: 8434.3700, Best bid: 8351.3000, Spread: 83.0700\n2016-05-09 20:17:33,589 - INFO - Websocket Connection Established\n2016-05-09 20:17:33,711 - INFO - Best ask: 8434.3700, Best bid: 8351.3000, Spread: 83.0700\n2016-05-09 20:22:30,301 - INFO - New Order. ask: 0.0000 @ 8434.3700 = 0.0000\n2016-05-09 20:22:30,306 - INFO - Removed price level at: 8434.3700\n2016-05-09 20:22:30,306 - INFO - Best ask: 8440.0000, Best bid: 8351.3000, Spread: 88.7000\n2016-05-09 20:22:31,021 - INFO - New Order. ask: 0.1000 @ 8492.9700 = 849.2900\n2016-05-09 20:22:31,022 - INFO - Best ask: 8440.0000, Best bid: 8351.3000, Spread: 88.7000\n```\n\n\n# Models #\n\nThe wrapper uses models to represent data structures returned by the Bitso API. \n\n### bitso.Book\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nsymbol | String | Order book symbol | Major_Minor\nminimum_amount | Decimal | Minimum amount of major when placing orders | Major\nmaximum_amount | Decimal | Maximum amount of major when placing orders | Major\nminimum_price | Decimal | Minimum price when placing orders\t | Minor\nmaximum_price | Decimal | Maximum price when placing orders\t | Minor\nminimum_value | Decimal | Minimum value amount (amount*price) when placing orders\t\t | Minor\nmaximum_value | Decimal | Maximum value amount (amount*price) when placing orders\t | Minor\n\n\n### bitso.AvailableBooks\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbooks | list | symbols for each book available | -\nbtc_mxn | bitso.Book | btc_mxn bitso.Book Object| -\neth_mxn | bitso.Book | eth_mxn bitso.Book Object| -\n\n\n### bitso.AccountRequiredField\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nname | String | Field name that will be user for \u201caccount_creation\u201d endpoint | \ndescription | String | Describes each field | \n\n\n### bitso.Ticker\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbook | String | Order book symbol | Major_Minor\nask | Decimal | Lowest sell order | Minor/Major\nbid | Decimal | Highest buy order | Minor/Major\nlast | Decimal | Last traded price | Minor/Major\nhigh | Decimal | Last 24 hours price high | Minor/Major\nlow | Decimal | Last 24 hours price low | Minor/Major\nvwap | Decimal | Last 24 hours price high | Minor/Major\nvolume | Decimal | Last 24 hours volume | Major\ncreated_at | Datetime | Ticker current datetime | \n\n### bitso.PublicOrder\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbook | String | Order book symbol | Major_Minor\nprice | Decimal | Price per unit of major | Minor\namount | Decimal | Major amount in order | Major\ncreated_at | Datetime | The datetime at which the order was created |\nupdated_at | Datetime | The datetime at which the order was updated (Can be None) |\n\n\n### bitso.OrderBook\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nasks | List | List of open asks | Minor/Major\nbids | List | List of open bids | Minor/Major\ncreated_at | Datetime | OrderBook current datetime | \n\n\n### bitso.Balance\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nname | String | \tCurrency name | \ntotal | Decimal | Total balance for currency | Currency\nlocked | Decimal | Currency balance locked in open orders | Currency\navailable | Decimal | Currency balance available for use | Currency\n\n### bitso.Balances\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\ncurrencies | list | name for each currency | -\nmxn | bitso.Balance | mxn bitso.Balance Object | -\nbtc | bitso.Balance | btc bitso.Balance Object | -\neth | bitso.Balance | eth bitso.Balance Object | -\n\n\n### bitso.Fee\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbook | String | Order book symbol | Major_Minor\nfee_decimal | Decimal | Customer trading fee as a decimal |\nfee_percent | Decimal | Customer trading fee as a percentage |\n\n### bitso.Fees\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbooks | list | name for each book | -\nbtc_mxn | bitso.Fee | btc_mxn bitso.Fee Object | -\neth_mxn | bitso.Fee | eth_mxn bitso.Fee Object | -\n\n\n\n### bitso.Trade\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\ntid | Long | Trade ID | \nbook | String | Order book symbol | Major_Minor\namount | Decimal | Major amount transacted | Major\nprice | Decimal | Price per unit of major | Minor\nside | String | Indicates the maker order side (maker order is the order that was open on the order book) | \ncreated_at | Datetime | Datetime at which the trade was executed |\n\n\n### bitso.Withdrawal\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nwid | String | Withdrawal ID | \ncurrency | String | Currency withdrawn symbol | \nmethod | String | Method for this withdrawal (MXN, BTC, ETH) | \namount | Decimal | The withdrawn amount | currency\nstatus | String | \tThe status for this withdrawal (pending, complete, cancelled) | \ncreated_at | Datetime | Datetime at which the withdrawal as created |\ndetails | Dict | \tSpecific withdrawal details) | \n\n\n\n### bitso.Funding\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nfid | String | Funding ID | \ncurrency | String | Currency funding symbol | \nmethod | String | Method for this funding (MXN, BTC, ETH) | \namount | Decimal | The funding amount | currency\nstatus | String | \tThe status for this funding (pending, complete, cancelled) | \ncreated_at | Datetime | Datetime at which the funding as recieved |\ndetails | Dict | \tSpecific funding details | \n\n\n### bitso.UserTrade\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\ntid | Long | Trade ID | \noid | String | Users\u2019 Order ID | \nbook | String | Order book symbol | Major_Minor\nside | String | Indicates the user\u2019s side for this trade (buy, sell) | \ncreated_at | Datetime | Datetime at which the trade was executed | \nmajor | Decimal | Major amount traded | Major\nminor | Decimal | Minor amount traded | Minor\nprice | Decimal | Price per unit of major | Minor\nfees_currency | String | \tIndicates the currency in which the trade fee was charged | \nfees_amount | Decimal | Indicates the amount charged as trade fee | Major\n\n### bitso.LedgerEntry\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\neid | String | Entry ID\t| \noperation | String | Indicates type of operation (funding, withdrawal, trade, fee) | \ncreated_at | Datetime | Timestamp at which the operation was recorded | \nbalance_updates | List | Updates to user balances for this operation | \ndetails | Dict | Specific operation details | \n\n### bitso.BalanceUpdate\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\ncurrency | String | Currency for this balance update | \nbalance | Decimal | Amount added or subtracted to user balance | Currency\n\n### bitso.Order\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\noid | String | The Order ID | \nbook | String | Order book symbol | Major_Minor\ntype | String | The order type (market, limit) | \nside | String | The order side (buy, sell) | \nstatus | String | The order\u2019s status (open, partial-fill, closed)) | \ncreated_at | Datetime | The date the order was created | \nupdated_at | Datetime | Timestamp at which the order was updated (can be None) | \nprice | Decimal | The order\u2019s price | Minor\namount | Decimal | The order\u2019s major currency amount | Major\n\n### bitso.FundingDestination\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\naccount_identifier_name | String | Account identifier name to fund with the specified currency. | \naccount_identifier | String | Identifier to where the funds can be sent to | \n\n### bitso.TransactionQuote\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbtc_amount | Decimal | The total amount in Bitcoins | Major\ncurrency | String | An ISO 4217 fiat currency symbol (ie, \u201cMXN\u201d). | \ngross | Decimal | | \nrate | Decimal | This major/manor rate (e.g. BTC/MXN) | \noutlets | Dictionary | Dictionary of Bitso Outlet options | \ncreated_at | Datetime | The date the quote was created | \nexpires_at | Datetime | The date the quote will expire | \n\n\n\n### bitso.TransactionOrder\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nbtc_amount | Decimal | The total amount in BTC | BTC\nbtc_pending | Decimal | Unconfirmed BTC, seen by Bitso servers | BTC\nbtc_received | Decimal | Confirmed BTC seen by Bitso servers | BTC\nconfirmation_code | String | | \ncurrency | String | An ISO 4217 fiat currency symbol (ie, \u201cMXN\u201d). | \ncurrency_amount | Decimal | | \ncurrency_settled | Decimal | | \ncurrency_fees | Decimal | | \nfields | Dictionary | Required fields for Pyament Outlet | \ncreated_at | Datetime | The date the transfer was created | \nexpires_at | Datetime | The date the transfer order will expire | \nid | String | Transfer Order ID | \npayment_outlet_id | String | Payment Outlet ID | \nqr_img_uri | String | Bitcoin payment QR Code URI | \nuser_uri | String | Transfer Order URI | \nwallet_address | String | Bitcoin address you will send BTC to\n\n\n\n### bitso.models.OrderUpdate\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\ndatetime | Datetime | Order Date/Time | \nside | String | 'bid','ask' | Market side \nrate | Decimal | Order price | Minor\namount | Decimal | Major currency amount | Major\nvalue | Decimal | Total Order Value (amount*rate) | Minor \n\n### bitso.models.TradeUpdate\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\ntid | Int | Trade ID | \nrate | Decimal | Order price | Minor\namount | Decimal | Major currency amount | Major\nvalue | Decimal | Total Order Value (amount*rate) | Minor \n\n### bitso.models.StreamUpdate\n\nAtribute | Type | Description | Units\n------------ | ------------- | ------------- | -------------\nchannel | String | ('diff-orders', 'trades', 'orders') | \nupdates | List | List of (TradeUpdate or OrderUpdate) objects | \n\n\n# Notations #\n\n**Major** denotes the cryptocurrency, in our case Bitcoin (BTC).\n\n**Minor** denotes fiat currencies such as Mexican Peso (MXN), etc\n\nAn order book is always referred to in the API as \"Major_Minor\". For example: \"**btc_mxn**\"\n\n\n# Licence #\n\nThe MIT License (MIT)\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bitsoex/bitso-py", "keywords": "", "license": "LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "bitso-py", "package_url": "https://pypi.org/project/bitso-py/", "platform": "", "project_url": "https://pypi.org/project/bitso-py/", "project_urls": { "Homepage": "https://github.com/bitsoex/bitso-py" }, "release_url": "https://pypi.org/project/bitso-py/3.0.1/", "requires_dist": [ "requests (>=2.2.1)", "websocket-client (==0.40.0)", "python-dateutil (>=1.5)", "mock (>=2.0.0)", "future (>=0.16.0)" ], "requires_python": "", "summary": "A python wrapper for the Bitso API.", "version": "3.0.1" }, "last_serial": 3950998, "releases": { "3.0.0": [ { "comment_text": "", "digests": { "md5": "5db70dafad2baca17a44d185a450480d", "sha256": "24399d83d38c9c75e547865a310df0e42dc5a9645a391cb0b7d8f425f0892dfd" }, "downloads": -1, "filename": "bitso_py-3.0.0-py2.7.egg", "has_sig": false, "md5_digest": "5db70dafad2baca17a44d185a450480d", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 55313, "upload_time": "2018-06-11T16:37:33", "url": "https://files.pythonhosted.org/packages/c2/17/f3613b898974348707ea115c1335627ea59a806cc55ec859f9c830f05144/bitso_py-3.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "a4ced377a676552efef86a6993f96db4", "sha256": "4a5466e24d714346afb4a3e2cf8c17f4748c5b8dc663f5aae95f52b64190d10a" }, "downloads": -1, "filename": "bitso-py-3.0.0.tar.gz", "has_sig": false, "md5_digest": "a4ced377a676552efef86a6993f96db4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41289, "upload_time": "2017-02-10T05:25:53", "url": "https://files.pythonhosted.org/packages/4f/aa/8b50891def7acbab1f4ca7ab5fe083e43363f1a2e700052e38f57cb04692/bitso-py-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "07fec195679e235d9f744f5f50a53d8a", "sha256": "a2f1a0e4988c6a923df60468ec6897b554b96b6226be79eb20508604fbb18cdd" }, "downloads": -1, "filename": "bitso_py-3.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "07fec195679e235d9f744f5f50a53d8a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30127, "upload_time": "2018-06-11T16:37:28", "url": "https://files.pythonhosted.org/packages/34/cc/06c31ab14c742631decd3443cbc34b7a88e3563015dee2757706ff91c9a0/bitso_py-3.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "713dd61b57e3b2ff5b40d58a10aa48e8", "sha256": "430473269a117a48e3db898be45661f6e76ef6173009e64cc8c5ce77bb1fe7b3" }, "downloads": -1, "filename": "bitso_py-3.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "713dd61b57e3b2ff5b40d58a10aa48e8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39143, "upload_time": "2018-06-11T16:37:30", "url": "https://files.pythonhosted.org/packages/06/3c/6ebf90aa5138a645641f7cd317b9b5dc31a438ed10e24d797a893303c59b/bitso_py-3.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47535a809ad1020cafed1f2a258413f7", "sha256": "325a79633685cf10fef6dd20d9b17b990182055c150f791ecc0097cf948c9a00" }, "downloads": -1, "filename": "bitso-py-3.0.1.tar.gz", "has_sig": false, "md5_digest": "47535a809ad1020cafed1f2a258413f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42446, "upload_time": "2018-06-11T16:37:31", "url": "https://files.pythonhosted.org/packages/cd/c9/715eae5ae231f15a61fb018238ffee672c8f25defe02fdee45ec56a48d7c/bitso-py-3.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "07fec195679e235d9f744f5f50a53d8a", "sha256": "a2f1a0e4988c6a923df60468ec6897b554b96b6226be79eb20508604fbb18cdd" }, "downloads": -1, "filename": "bitso_py-3.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "07fec195679e235d9f744f5f50a53d8a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30127, "upload_time": "2018-06-11T16:37:28", "url": "https://files.pythonhosted.org/packages/34/cc/06c31ab14c742631decd3443cbc34b7a88e3563015dee2757706ff91c9a0/bitso_py-3.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "713dd61b57e3b2ff5b40d58a10aa48e8", "sha256": "430473269a117a48e3db898be45661f6e76ef6173009e64cc8c5ce77bb1fe7b3" }, "downloads": -1, "filename": "bitso_py-3.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "713dd61b57e3b2ff5b40d58a10aa48e8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39143, "upload_time": "2018-06-11T16:37:30", "url": "https://files.pythonhosted.org/packages/06/3c/6ebf90aa5138a645641f7cd317b9b5dc31a438ed10e24d797a893303c59b/bitso_py-3.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47535a809ad1020cafed1f2a258413f7", "sha256": "325a79633685cf10fef6dd20d9b17b990182055c150f791ecc0097cf948c9a00" }, "downloads": -1, "filename": "bitso-py-3.0.1.tar.gz", "has_sig": false, "md5_digest": "47535a809ad1020cafed1f2a258413f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42446, "upload_time": "2018-06-11T16:37:31", "url": "https://files.pythonhosted.org/packages/cd/c9/715eae5ae231f15a61fb018238ffee672c8f25defe02fdee45ec56a48d7c/bitso-py-3.0.1.tar.gz" } ] }