{"id":13734106,"url":"https://github.com/BTS-CM/Bitshares-HUG-REST-API","last_synced_at":"2025-05-08T10:30:55.906Z","repository":{"id":128613476,"uuid":"115162666","full_name":"BTS-CM/Bitshares-HUG-REST-API","owner":"BTS-CM","description":"A HUG REST API for the Bitshares network","archived":true,"fork":false,"pushed_at":"2019-10-19T13:34:46.000Z","size":204,"stargazers_count":8,"open_issues_count":5,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-15T02:34:33.936Z","etag":null,"topics":["api","bitshares","certbot","gunicorn","hug","letsencrypt","nginx","python-bitshares","rest","virtualenv"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BTS-CM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-12-23T01:38:22.000Z","updated_at":"2024-11-13T12:28:52.000Z","dependencies_parsed_at":"2023-08-23T07:19:41.768Z","dependency_job_id":null,"html_url":"https://github.com/BTS-CM/Bitshares-HUG-REST-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTS-CM%2FBitshares-HUG-REST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTS-CM%2FBitshares-HUG-REST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTS-CM%2FBitshares-HUG-REST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTS-CM%2FBitshares-HUG-REST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BTS-CM","download_url":"https://codeload.github.com/BTS-CM/Bitshares-HUG-REST-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045612,"owners_count":21845736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bitshares","certbot","gunicorn","hug","letsencrypt","nginx","python-bitshares","rest","virtualenv"],"created_at":"2024-08-03T03:00:52.639Z","updated_at":"2025-05-08T10:30:55.587Z","avatar_url":"https://github.com/BTS-CM.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Python Libraries"],"readme":"# Bitshares HUG API\n\n![BTS HUG API Banner](https://i.imgur.com/secsyPh.png \"BTS HUG API Banner\")\n\n## About\n\nThe intention of this Bitshares HUG REST API repo is to provide the Bitshares network an open-source high performance interface to the Bitshares network through simple GET requests.\n\nBy following the readme, you can easily recreate the API in your own control. Do remember to change the API key and the Bitshares FULL/API node you're connecting to. If you're creating a service which will produce a large amount of traffic, alert the node operator or consider running your own Bitshares node.\n\nThis HUG REST API makes heavy use of the [python-bitshares](https://github.com/xeroc/python-bitshares)\n\n## TODO\n\n    Improve the NGINX \u0026 Gunicorn configurations\n    Implement additional HUG functions using websockets to access data inaccessible via python-bitshares.\n    Work on date range input for iterable objects like market_history, trade_history and asset_holder data. (See: [Issue #30](https://github.com/xeroc/python-bitshares/issues/30)).\n\n## License\n\nThe contents of this entire repo should be considered MIT licenced.\n\n## How to contribute\n\nIt's difficult to debug development issues whilst running behind Gunicorn \u0026 NGINX, you're best running the HUG REST API directly with HUG during development \"hug -f bts_api.py\". Note that running HUG directly in this manner should only be performed during development, it is not suitable for exposing directly to the public as a production ready API.\n\n### About : Python-Bitshares\n\nhttps://github.com/xeroc/python-bitshares/tree/develop\n\nCreated by xeroc, it's a thorough Bitshares python library which will be extensively used throughout this API. We won't be using it for any serious wallet control, purely the read-only blockchain/account/asset monitoring functionality.\n\nWeb Docs: http://docs.pybitshares.com/en/latest/\n\nPDF Docs: https://media.readthedocs.org/pdf/python-bitshares/latest/python-bitshares.pdf\n\n### About: HUG\n\n\u003e ##### Embrace the APIs of the future\n\u003e Drastically simplify API development over multiple interfaces. With hug, design and develop your API once, then expose it however your clients need to consume it. Be it locally, over HTTP, or through the command line - hug is the fastest and most modern way to create APIs on Python3.\n\u003e ##### Unparalleled performance\n\u003e hug has been built from the ground up with performance in mind. It is built to consume resources only when necessary and is then compiled with Cython to achieve amazing performance. As a result, hug consistently benchmarks as one of the fastest Python frameworks and without question takes the crown as the fastest high-level framework for Python 3.\n\u003e\n\u003e Source: [Official website](http://www.hug.rest/).\n\n### About: Extensibility\n\nIf your HUG functions takes a long time to compute, then you must account for NGINX \u0026 Gunicorn worker timeouts (both the systemctl service file \u0026 the 'default' NGINX sites-available file). If you fail to account for this, the user will experience unhandled timeouts.\n\nSince HUG utilizes Python, any Python library can be used to process/manipulate Bitshares data.\n\nIdeally, rather than over-scraping data we should cache it or limit scraping functions to large batches (1000 instead of 500k etc).\n\n---\n\n## Install guide\n\nThis is an install guide for Ubuntu 17.10. The HUG REST API uses Python3, HUG, Gunicorn \u0026 NGINX. If you change the OS or server components then the following guide will be less applicable, if you succeed please do provide a separate readme for alternative implementation solutions.\n\n### Setup dependencies \u0026 Python environment\n\nWe create the 'btsapi' user, however you could rename this to whatever you want, just remember to change the NGINX \u0026 Gunicorn configuration files.\n\n#### Setup a dedicated user\n\n    adduser btsapi\n    \u003cENTER NEW PASSWORD\u003e\n    \u003cCONFIRM NEW PASSWORD\u003e\n    usermod -aG sudo btsapi\n    sudo usermod -a -G www-data btsapi\n    su - btsapi\n\n#### Install required applications\n\n    sudo apt-get install libffi-dev libssl-dev python3-pip python3-dev build-essential git nginx python3-setuptools virtualenv libcurl4-openssl-dev\n\n#### Create Python virtual environment\n\n    mkdir HUG\n    virtualenv -p python3 HUG\n    echo \"source ./HUG/bin/activate\" \u003e access_env.sh\n    chmod +x access_env.sh\n    source access_env.sh\n\n#### Install Python packages\n\n    pip3 install --upgrade pip\n    pip3 install --upgrade setuptools\n    pip3 install --upgrade wheel\n    pip3 install requests\n    pip3 install hug\n    pip3 install gunicorn\n    pip3 install bitshares\n\n### Configure NGINX\n\nNGINX serves as a reverse web proxy to Gunicorn \u0026 uses an UNIX socket instead of an IP address for referencing Gunicorn.\n\n    Copy the nginx.conf file to /etc/nginx/\n    Reset nginx (sudo service nginx restart)\n\n    sudo mv default /etc/nginx/sites-available/default\n\n### Implement SSL Cert\n\nYou aught to implement a free LetsEncrypt SSL certificate, this requires a domain name (they don't sign IP addresses) and it needs to be renewed every few months by running certbot again.\n\nhttps://certbot.eff.org/\n\n    sudo add-apt-repository ppa:certbot/certbot\n    sudo apt-get update\n    sudo apt-get install python-certbot-nginx\n    sudo certbot --nginx -d api.domain.tld\n\n### Configure Gunicorn\n\nOfficial website: http://gunicorn.org/\n\nDocumentation: http://docs.gunicorn.org/en/stable/\n\nGunicorn is used to provide scalable worker process management and task buffering for the HUG REST API. Gunicorn's documentation states that each CPU can provide roughly 2-3+ Gunicorn workers, however it may be able to achieve a higher quantity (worth testing).\n\n    cp gunicorn.service /etc/systemd/system/gunicorn.service\n    sudo systemctl start gunicorn\n    sudo systemctl enable gunicorn\n\n### MISC\n\nIf you make changes to the service or the hug script:\n\n    sudo systemctl daemon-reload\n    sudo systemctl restart gunicorn\n\nIf you want to monitor Gunicorn:\n\n    tail -f gunicorn_access_log\n    tail -f gunicorn_error_log\n    sudo systemctl status gunicorn\n\n---\n\n# Available HUG REST API functionality\n\nThis section will detail the functionality which will be available to the public through GET requests.\n\nThe functions are currently all read-only functions, enabling the public to request data from the network without the risk of exposing critical wallet controls.\n\n## Asset functions\n\nMore info: [python-bitshares docs](https://python-bitshares.readthedocs.io/en/latest/asset.html)\n\n### get_asset\n\nRetrieve basic information about an individual asset \u0026 return in JSON!\n\n##### Parameters\n\n* asset_name `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_asset?asset_name=USD\u0026api_key=123abc`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_asset?asset_name=USD\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_asset?asset_name=USD\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/get_asset.json)\n\n### get_hertz_value\n\nGet reference Hertz price feed information.\n\nCurrently unavailable in the Public testnet HUG REST API server. The reason is that the script references USD price via the BTS DEX, which isn't an active MPA in the public Bitshares testnet. To be fair, concerns of diverging from reference Hertz formula could be disregarded considering that this is for an unofficial reference.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_hertz_value?api_key=123abc`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_hertz_value?api_key=123abc)\n\n#### [Example JSON output](./example_json/get_hertz_value.json)\n\n## MISC functions\n\n### get_bts_object\n\nRequest any Bitshares object's high level overview. Does not provide in depth details (ie asset/account/witness/.. details).\n\n[List of possible objects](http://docs.bitshares.org/development/blockchain/objects.html)\n\n##### Parameters\n\n* object_id `2.0.0` (`string`)\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_bts_object?object_id=2.0.0\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_bts_object?object_id=2.13.1\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_bts_object?object_id=2.13.1\u0026api_key=123abc)\n\n## Blockchain functions\n\nMore info: [python-bitshares docs](http://docs.pybitshares.com/en/latest/blockchain.html)\n\n### chain_info\n\nA high level overview of the Bitshares chain information.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/chain_info?\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/chain_info?\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/chain_info?\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/chain_info.json)\n\n###  get_chain_properties\n\nGet chain properties, return in JSON.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_chain_properties?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_chain_properties?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_chain_properties?api_key=123abc)\n\n#### Example JSON output\n\n```\n{\n  \"chain_properties\": {\n    \"id\": \"2.11.0\",\n    \"chain_id\": \"4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8\",\n    \"immutable_parameters\": {\n      \"min_committee_member_count\": 11,\n      \"min_witness_count\": 11,\n      \"num_special_accounts\": 100,\n      \"num_special_assets\": 100\n    }\n  },\n  \"valid_key\": true,\n  \"took\": 0.01954\n}\n```\n\n###  get_network\n\nReturn BTS network information in JSON.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_network?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_network?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_network?api_key=123abc)\n\n#### Example JSON output\n\n```\n{\n  \"get_network\": {\n    \"chain_id\": \"4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8\",\n    \"core_symbol\": \"BTS\",\n    \"prefix\": \"BTS\"\n  },\n  \"valid_key\": true,\n  \"took\": 0.12271\n}\n```\n\n### get_info\n\nThis call returns the dynamic global properties in JSON.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_info?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_info?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_info?api_key=123abc)\n\n#### [Example JSON output](./example_json/get_info.json)\n\n### get_config\n\nReturns object 2.0.0 in JSON.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_config?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_config?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_config?api_key=123abc)\n\n#### [Example JSON output](./example_json/get_config.json)\n\n### get_block_details\n\nRetrieve the specified block's date/time details, return in JSON.\n\n##### Parameters\n\n* block_number `number`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_block_details?block_number=10\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_block_details?block_number=10\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_block_details?block_number=10\u0026api_key=123abc)\n\n#### Example JSON output\n\n```\n{\n  \"previous\": \"0000003157e4849fe0d04e1f60462764d2a1f3d1\",\n  \"timestamp\": \"2015-10-13T14:15:00\",\n  \"witness\": \"1.6.5\",\n  \"transaction_merkle_root\": \"0000000000000000000000000000000000000000\",\n  \"extensions\": [],\n  \"witness_signature\": \"1f0441febc1a8ce32287749ba5ec2797be8202eab82e6275340c508e16238cd7af21aba15a1c09bbeca03751fd4abb10580e1fea69a4f4dde17b9b54b4beeb654b\",\n  \"transactions\": [],\n  \"id\": \"50\",\n  \"date\": \"2015-10-13T14:15:00\",\n  \"block_number\": 50,\n  \"valid_block_number\": true,\n  \"valid_key\": true,\n  \"took\": 0.04568\n}\n```\n\n### get_latest_block\n\nRetrieve the details of the latest block, return in JSON.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_latest_block?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_latest_block?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_latest_block?api_key=123abc)\n\n#### [Example JSON output](./example_json/get_latest_block.json)\n\n### get_all_accounts\n\nRetrieve all Bitshares account names. Takes a while!\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_all_accounts?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_all_accounts?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_all_accounts?api_key=123abc)\n\n#### Example JSON output\n\n```\n{\n  'accounts': [{acc1, acc2, ...}],\n  'num_accounts': 500000,\n  'valid_key': True,\n  'took': 20.5\n}\n```\n\n## Account information functions\n\nMore info: [python-bitshares docs](http://docs.pybitshares.com/en/latest/account.html)\n\n### account_balances\n\nGiven a valid account name, output the user's balances in JSON.\n\n##### Parameters\n\n* account `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/account_balances?account=example_usera\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/account_balances?account_name=xeroc\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/account_balances?account_name=xeroc\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/account_balances.json)\n\n### account_open_orders\n\nGiven a valid account name, output the user's open orders in JSON.\n\n##### Parameters\n\n* account_name `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/account_open_orders?account_name=example_usera\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/account_open_orders?account_name=abit\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/account_open_orders?account_name=abit\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/account_open_orders.json)\n\n### account_callpositions\n\nGiven a valid account name, output the user's call positions in JSON.\n\nNote: Highly verbose! Example contains 26k lines of JSON!\n\n##### Parameters\n\n* account `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/account_callpositions?account=example_usera\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/account_callpositions?account_name=abit\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/account_callpositions?account_name=abit\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/account_callposition.json)\n\n### account_history\n\nGiven a valid account name and transaction history limit (int), output the user's transaction history in JSON.\n\n##### Parameters\n\n* account_name `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/account_history?account_name=example_user\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/account_history?account_name=xeroc\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/account_history?account_name=xeroc\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/account_history.json)\n\n### account_is_ltm\n\nGiven a valid account name, check if the user has LTM.\n\n##### Parameters\n\n* account_name `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/account_is_ltm?account_name=example_user\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/account_is_ltm?account_name=xeroc\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/account_is_ltm?account_name=xeroc\u0026api_key=123abc)\n\n#### Example JSON output\n\n```\n{\n  \"account_is_ltm\": true,\n  \"account\": \"xeroc\",\n  \"valid_account\": true,\n  \"valid_key\": true,\n  \"took\": 0.14034\n}\n```\n\n## DEX functions\n\nMore info: [python-bitshares docs](http://docs.pybitshares.com/en/latest/dex.html)\n\n### list_fees\n\nRetrieve the currently implemented fees in JSON format.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/list_fees?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/list_fees?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/list_fees?api_key=123abc)\n\n#### [Example JSON output](./example_json/list_fees.json)\n\n## Market information functions\n\nMore info: [python-bitshares docs](http://docs.pybitshares.com/en/latest/market.html)\n\n### market_ticker\n\nGiven a valid market pair (e.g. USD:BTS), output the market pair's ticker information in JSON.\n\n##### Parameters\n\n* market_pair `base:quote` (`string`)\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/market_ticker?market_pair=USD:BTS\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/market_ticker?market_pair=USD:BTS\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/market_ticker?market_pair=USD:BTS\u0026api_key=123abc)\n\n\n#### [Example JSON output](./example_json/market_ticker.json)\n\n### market_orderbook\n\nGiven a valid market pair (e.g. USD:BTS) and your desired orderbook size limit, output the market pair's orderbook (buy/sell order) information in JSON.\n\n##### Parameters\n\n* market_pair `base:quote` (`string`)\n* orderbook_limit `number`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/market_orderbook?market_pair=USD:BTS\u0026orderbook_limit=25\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/market_orderbook?market_pair=USD:BTS\u0026orderbook_limit=25\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/market_orderbook?market_pair=USD:BTS\u0026orderbook_limit=25\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/market_orderbook.json)\n\n### market_24hr_vol\n\nGiven a valid market_pair (e.g. USD:BTS), output their 24hr market volume in JSON.\n\n##### Parameters\n\n* market_pair `base:quote` (`string`)\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/market_24hr_vol?market_pair=USD:BTS\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/market_24hr_vol?market_pair=USD:BTS\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/market_24hr_vol?market_pair=USD:BTS\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/market_24hr_vol.json)\n\n### market_trade_history\n\nGiven a valid market_pair (e.g. USD:BTS) \u0026 a TX limit, output the market's trade history in JSON.\n\n##### Parameters\n\n* market_pair `base:quote` (`string`)\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/market_trade_history?market_pair=USD:BTS\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/market_trade_history?market_pair=USD:BTS\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/market_trade_history?market_pair=USD:BTS\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/market_trade_history.json)\n\n## Witness functions\n\nMore info: [python-bitshares docs](http://docs.pybitshares.com/en/latest/witness.html)\n\n### find_witness\n\nFind details about a specific witness.\n\n##### Parameters\n\n* witness_name `string`\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/find_witness?witness_name=sc-ol\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/find_witness?witness_name=sc-ol\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/find_witness?witness_name=sc-ol\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/find_witness.json)\n\n### list_of_witnesses\n\nRetrieve a list of available witnesses.\n\n##### Parameters\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/list_of_witnesses?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/list_of_witnesses?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/list_of_witnesses?api_key=123abc)\n\n#### [Example JSON output](./example_json/list_of_witnesses.json)\n\n## Committee functions\n\nTo implement this, we need to use the '[Requests](http://docs.python-requests.org/en/master/)' python library to access functionality currently not present in the python-bitshares library (AFAIK).\n\n### get_committee_member\n\nRetrieve a single committee member's full account (and role) information.\n\n##### Parameters\n\n* committee_id `1.5.0` (`string`)\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_committee_member?committee_id=1.5.10\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_committee_member?committee_id=1.5.10\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_committee_member?committee_id=1.5.10\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/get_committee_member.json)\n\n### get_committee_members\n\nGet a list of all committee members, and their Bitshares account details.\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_committee_members?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_committee_members?api_key=123abc)\n\n##### Usage\n`https://subdomain.domain.tld/get_committee_members?api_key=API_KEY`\n\n#### [Example JSON output](./example_json/get_committee_members.json)\n\n## Worker functions\n\nSimilar to the committee function, we need to use the '[Requests](http://docs.python-requests.org/en/master/)' python library to access functionality currently not present in the python-bitshares library (AFAIK).\n\n### get_worker\n\nRetrieve an individual worker proposal \u0026 its associated proposer account details.\n\n##### Parameters:\n\n* worker_id `1.14.x` (`string`)\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_worker?worker_id=1.14.x\u0026api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_worker?worker_id=1.14.50\u0026api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_worker?worker_id=1.14.50\u0026api_key=123abc)\n\n#### [Example JSON output](./example_json/get_worker.json)\n\n### get_worker_proposals\n\nRetrieve a list of all worker proposals (including past/inactive) and the worker account details.\n\n##### Parameters:\n\n* api_key `string`\n\n##### Usage\n`https://subdomain.domain.tld/get_worker_proposals?api_key=API_KEY`\n\n#### [Run: Production command](https://btsapi.grcnode.co.uk/get_worker_proposals?api_key=123abc)\n#### [Run: Testnet command](https://testnetbtsapi.grcnode.co.uk/get_worker_proposals?api_key=123abc)\n\n#### [Example JSON output](./example_json/get_worker_proposals.json)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBTS-CM%2FBitshares-HUG-REST-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBTS-CM%2FBitshares-HUG-REST-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBTS-CM%2FBitshares-HUG-REST-API/lists"}