{ "info": { "author": "Buttercoin", "author_email": "api@buttercoin.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Internet" ], "description": "Buttercoin API Python Client\n============================\n\nOfficial Python Client of the `Buttercoin API `_.\n`Buttercoin `_ is a trading platform that makes\nbuying and selling `bitcoin `_ easy.\n\nInstallation\n------------\n\nInstall via `pip `_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: shell\n\n $ pip install buttercoin\n\nInstall from source\n^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: shell\n\n $ git clone git@github.com:buttercoin/buttercoin-python.git\n $ cd buttercoin-python\n $ python setup.py install\n\nUsage\n-----\n\nHMAC-SHA256 Authentication\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou need an `API key and secret `_ to use\n`HMAC `_.\n\n+--------------+------------------+----------------------------------------------------------------------------------------------------------------+\n| Setting | Property Name | Description |\n+==============+==================+================================================================================================================+\n| API Key | ``api_key`` | Your Buttercoin API Key |\n+--------------+------------------+----------------------------------------------------------------------------------------------------------------+\n| API Secret | ``api_secret`` | Your Buttercoin API Secret |\n+--------------+------------------+----------------------------------------------------------------------------------------------------------------+\n| Mode | ``mode`` | Your development environment (default: ``'production'``, set to ``'sandbox'`` to test with testnet bitcoins) |\n+--------------+------------------+----------------------------------------------------------------------------------------------------------------+\n\n.. code-block:: python\n\n from buttercoin.client import ButtercoinClient\n\n client = ButtercoinClient(\n api_key='',\n api_secret='',\n mode='' # production or sandbox\n )\n\nTips\n^^^^\n\nA note on the ``timestamp`` param sent to all client methods: This param\nmust always be increasing, and within 5 minutes of Buttercoin server\ntimes (GMT). This is to prevent replay attacks on your data.\n\nBecause of this, if you need your API calls to run in a certain order,\nyou must chain together callbacks to ensure synchronous responses to\nyour requests.\n\n*Additionally, for convenience, if you don't include the timestamp\nparameter, it will default to the current timestamp.*\n\n::\n\n timestamp = unicode(int(round(time.time() * 1000)))\n client.get_key(timestamp=timestamp)\n\n # or default to current timestamp\n\n client.get_key()\n\nGet Data\n^^^^^^^^\n\nKey Permissions\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nReturns ``array`` of permissions associated with this key.\n\n.. code-block:: python\n\n client.get_key()\n\nBalances\n^^^^^^^^\n\nReturns ``dict`` of balances for this account.\n\n.. code-block:: python\n\n client.get_balances()\n\nDeposit Address\n^^^^^^^^^^^^^^^\n\nReturns bitcoin address ``string`` to deposit your funds into the Buttercoin platform.\n\n.. code-block:: python\n\n client.get_deposit_address()\n\nGet Orders\n^^^^^^^^^^\n\nReturns ``array`` of ``dict`` objects containing information about buy and sell orders.\n\n+--------------+-----------------+----------------------------------------------------------------+\n| Name | Param | Description |\n+==============+=================+================================================================+\n| Status | ``status`` | enum: ``['opened', 'partial-filled', 'filled', 'canceled']`` |\n+--------------+-----------------+----------------------------------------------------------------+\n| Side | ``side`` | enum: ``['buy', 'sell']`` |\n+--------------+-----------------+----------------------------------------------------------------+\n| Order Type | ``orderType`` | enum: ``['market', 'limit']`` |\n+--------------+-----------------+----------------------------------------------------------------+\n| Date Min | ``dateMin`` | format: ISO-8601, e.g. ``'2014-05-06T13:15:30Z'`` |\n+--------------+-----------------+----------------------------------------------------------------+\n| Date Max | ``dateMax`` | format: ISO-8601, e.g. ``'2014-05-06T13:15:30Z'`` |\n+--------------+-----------------+----------------------------------------------------------------+\n\n.. code-block:: python\n\n # query for multiple orders\n body = {'status':'canceled'}\n client.get_orders(body=body)\n\n # single order by id\n client.get_order_by_id('');\n\n # single order by url\n client.get_order_by_url('http://api.buttercoin.com/v1/orders/b9fa58e6-a441-48ca-afbb-14827fca2f7a')\n\nGet Transactions\n^^^^^^^^^^^^^^^^\n\nReturns ``array`` of ``dict`` objects containing information about deposit and withdraw action.\n\n+--------------------+-----------------------+-----------------------------------------------------------------------+\n| Name | Param | Description |\n+====================+=======================+=======================================================================+\n| Status | ``status`` | enum: ``['pending', 'processing', 'funded', 'canceled', 'failed']`` |\n+--------------------+-----------------------+-----------------------------------------------------------------------+\n| Transaction Type | ``transactionType`` | enum: ``['deposit', 'withdrawal']`` |\n+--------------------+-----------------------+-----------------------------------------------------------------------+\n| Date Min | ``dateMin`` | format: ISO-8601, e.g. ``'2014-05-06T13:15:30Z'`` |\n+--------------------+-----------------------+-----------------------------------------------------------------------+\n| Date Max | ``dateMax`` | format: ISO-8601, e.g. ``'2014-05-06T13:15:30Z'`` |\n+--------------------+-----------------------+-----------------------------------------------------------------------+\n\n.. code-block:: python\n\n # query for multiple transactions\n body = {'status':'pending'}\n client.get_transactions(body=body)\n\n # single transaction by id\n client.get_transaction_by_id('');\n\n # single transaction by url\n client.get_transaction_by_url('http://api.buttercoin.com/v1/transactions/53db06ee7400007700f4c561')\n });\n\nUnauthenticated Requests\n------------------------\n\nGet Order Book\n^^^^^^^^^^^^^^\n\nReturn a ``dict`` object of current orders in the Buttercoin order book.\n\n.. code-block:: python\n\n client.get_order_book()\n\nGet Ticker\n^^^^^^^^^^\n\nReturn the current bid, ask, and last sell prices on the Buttercoin platform.\n\n.. code-block:: python\n\n client.get_ticker()\n\nGet Trade History\n^^^^^^^^^^^^^^^^^\n\nReturn the last 100 trades.\n\n.. code-block:: python\n\n client.get_trade_history()\n\nCreate New Actions\n~~~~~~~~~~~~~~~~~~\n\nCreate Order\n^^^^^^^^^^^^\n\nValid order params include:\n\n+--------------+------------------+----------------------------------------------------+\n| Name | Param | Description |\n+==============+==================+====================================================+\n| Instrument | ``instrument`` | enum: ``['BTC_USD, USD_BTC']`` |\n+--------------+------------------+----------------------------------------------------+\n| Side | ``side`` | enum: ``['buy', 'sell']``, required ``true`` |\n+--------------+------------------+----------------------------------------------------+\n| Order Type | ``orderType`` | enum: ``['limit', 'market']``, required ``true`` |\n+--------------+------------------+----------------------------------------------------+\n| Price | ``price`` | ``string``, required ``false`` |\n+--------------+------------------+----------------------------------------------------+\n| Quantity | ``quantity`` | ``string``, required ``false`` |\n+--------------+------------------+----------------------------------------------------+\n\n.. code-block:: python\n\n # create a JSON object with the following params\n order = {\"instrument\":\"BTC_USD\",\"side\": \"buy\",\"orderType\":\"limit\",\"price\":\"600\",\"quantity\":\"0.2346\"}\n\n client.create_order(body=order) # http://api.buttercoin.com/v1/orders/b9fa58e6-a441-48ca-afbb-14827fca2f7a\n\nCreate Transaction\n^^^^^^^^^^^^^^^^^^\n\nPlease contact Buttercoin support before creating a USD deposit using the API.\n\nDeposit transaction params include:\n\n+------------+----------------+-----------------------------------------+\n| Name | Param | Description |\n+============+================+=========================================+\n| Method | ``method`` | enum: ``['wire']``, required ``true`` |\n+------------+----------------+-----------------------------------------+\n| Currency | ``currency`` | enum: ``['USD']``, required ``true`` |\n+------------+----------------+-----------------------------------------+\n| Amount | ``amount`` | ``string``, required ``true`` |\n+------------+----------------+-----------------------------------------+\n\n.. code-block:: python\n\n # create deposit\n txn = { \"method\": \"wire\", \"currency\": \"USD\", \"amount\": \"500\" }\n client.create_deposit(body=txn) # https://api.buttercoin.com/v1/transactions/53db06ee7400007700f4c561\n\nWithdrawal transaction params include:\n\n+------------+----------------+------------------------------------------+\n| Name | Param | Description |\n+============+================+==========================================+\n| Method | ``method`` | enum: ``['check']``, required ``true`` |\n+------------+----------------+------------------------------------------+\n| Currency | ``currency`` | enum: ``['USD']``, required ``true`` |\n+------------+----------------+------------------------------------------+\n| Amount | ``amount`` | ``string``, required ``true`` |\n+------------+----------------+------------------------------------------+\n\nIf you have the security setting requiring confirmation of dollar withdrawals, you will see a 201 status.\n\n.. code-block:: python\n\n # create withdrawal\n txn = { \"currency\": \"USD\", \"amount\": \"3020.30\", \"method\": \"check\" }\n json = client.create_withdrawal(body=txn) # https://api.buttercoin.com/v1/transactions/53db06ee7400007700f4c561\n\nSend bitcoin transaction params include:\n\n+---------------+-------------------+-------------------------------------------------------------------+\n| Name | Param | Description |\n+===============+===================+===================================================================+\n| Currency | ``currency`` | ``['USD']``, required ``true`` |\n+---------------+-------------------+-------------------------------------------------------------------+\n| Amount | ``amount`` | ``string``, required ``true`` |\n+---------------+-------------------+-------------------------------------------------------------------+\n| Destination | ``destination`` | address to which to send currency ``string``, required ``true`` |\n+---------------+-------------------+-------------------------------------------------------------------+\n\n*If you have the security setting requiring confirmation of bitcoin\nwithdrawals, you will see a 201 status*\n\n.. code-block:: python\n\n # send bitcoins to an address\n txn = { \"currency\": \"BTC\", \"amount\": \"0.30\", \"destination\": \"msj42CCGruhRsFrGATiUuh25dtxYtnpbTx\" }\n json = client.send_bitcoin(body=txn) # https://api.buttercoin.com/v1/transactions/53db06ee7400007700f4c561\n\nCancel Actions\n^^^^^^^^^^^^^^\n\nAll successful cancel calls to the API return a response status of\n``204`` with a human readable success message\n\nCancel Order\n^^^^^^^^^^^^\n\nCancel a pending buy or sell order\n\n.. code-block:: python\n\n client.cancel_order('')\n\nCancel Transaction\n^^^^^^^^^^^^^^^^^^\n\nCancel a pending deposit or withdraw action\n\n.. code-block:: python\n\n client.cancel_transaction('')\n\nFurther Reading\n---------------\n\n- `Buttercoin - Website `_\n- `Buttercoin API Documentation `_\n\nLicense\n-------\n\nLicensed under the MIT license.\n\nCopyright 2015 `Buttercoin Inc `_. All Rights Reserved.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/buttercoin/buttercoin-python", "keywords": "bitcoin,buttercoin,trading platform,cryptocurrency,digital currency,btc", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "buttercoin", "package_url": "https://pypi.org/project/buttercoin/", "platform": "Posix; MacOS X; Windows", "project_url": "https://pypi.org/project/buttercoin/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/buttercoin/buttercoin-python" }, "release_url": "https://pypi.org/project/buttercoin/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Buttercoin API Python Client", "version": "1.0.2" }, "last_serial": 1427897, "releases": { "1.0.1": [], "1.0.2": [ { "comment_text": "", "digests": { "md5": "99ba00466a2c0c247e8d92de551c4667", "sha256": "0050bd77ad6031dd67cfa816eafb4acbd595bf2c53b80ea778df7fcf7eebd434" }, "downloads": -1, "filename": "buttercoin-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "99ba00466a2c0c247e8d92de551c4667", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15833, "upload_time": "2015-02-18T02:43:23", "url": "https://files.pythonhosted.org/packages/22/cc/feb428725e17eaa8bd7a6640df1d608de64f7365ab1a2ee02873ccadfa7c/buttercoin-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2c8000c9d2fd857355a5ac1cbd544164", "sha256": "0b3ae4f1eb9aaee32f0e3ef718b28054920a2879fd13e484aea308ad84e72fad" }, "downloads": -1, "filename": "buttercoin-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2c8000c9d2fd857355a5ac1cbd544164", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8044, "upload_time": "2015-02-18T02:43:02", "url": "https://files.pythonhosted.org/packages/e9/f9/e6b0c174488cc09d0464d1f449dfa68622a16a48b12d4c33c2a61154a6fc/buttercoin-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99ba00466a2c0c247e8d92de551c4667", "sha256": "0050bd77ad6031dd67cfa816eafb4acbd595bf2c53b80ea778df7fcf7eebd434" }, "downloads": -1, "filename": "buttercoin-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "99ba00466a2c0c247e8d92de551c4667", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15833, "upload_time": "2015-02-18T02:43:23", "url": "https://files.pythonhosted.org/packages/22/cc/feb428725e17eaa8bd7a6640df1d608de64f7365ab1a2ee02873ccadfa7c/buttercoin-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2c8000c9d2fd857355a5ac1cbd544164", "sha256": "0b3ae4f1eb9aaee32f0e3ef718b28054920a2879fd13e484aea308ad84e72fad" }, "downloads": -1, "filename": "buttercoin-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2c8000c9d2fd857355a5ac1cbd544164", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8044, "upload_time": "2015-02-18T02:43:02", "url": "https://files.pythonhosted.org/packages/e9/f9/e6b0c174488cc09d0464d1f449dfa68622a16a48b12d4c33c2a61154a6fc/buttercoin-1.0.2.tar.gz" } ] }