Python Client to interact with the Namebase Exchange API
Project description
Namebase Exchange Api for Python
Python 3.6+ client for interacting with Namebase Exchange API.
Usage
All requests require an API key. You can generate a key from https://www.namebase.io/pro.
At the time of writing, all documented API keys are supported. This may change at any time. See the raw API documentation calls: https://github.com/namebasehq/exchange-api-documentation/
On top of the raw APIs, we also provide the convenience functions:
- market_buy: Market Buy
- market_sell: Market Sell
- limit_buy: Limit Buy
- limit_sell: Limit Sell
- get_dns_settings: Get DNS Settings
- update_dns_settings: Change DNS Settings
We've also provided a Websocket Client for the WSS API.
Installation
Requirements
- Python 3.6 or greater
Install
pip install namebase_exchange
Usage
Core REST API for Namebase Exchange
from namebase_exchange.exchange import *
exchange = Exchange("YOUR_API_KEY", "YOUR_SECRET_KEY")
exchange.get_depth(Symbol.HNSBTC)
exchange.market_sell(Symbol.HNSBTC, '500')
exchange.update_dns_settings(domain='YOUR_DOMAIN',
record_type='TXT', host='@', value='skylink=YOUR_SKYLINK', ttl=0)
WebSocket API for Namebase Exchange This doesn't need any authorization
from namebase_exchange.websocket_data import *
exchange = ExchangeWS(Endpoint.DEPTH)
You can also pass functions in to do more sophisticated things with the message stream. By default, it just prints out the messages.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for namebase_exchange-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da6cbfef02bb5811746a858bc4971cfefeabd947b4045ef33b8382b1a910e2b7 |
|
MD5 | 8b2f5a19c59888829ff0340f1e585db7 |
|
BLAKE2b-256 | e137277be5e247c7a3ea91e743c179968c3acccd8c8397b66e3837deabbfba24 |