Skip to main content

Python Client to interact with the Namebase Exchange API

Project description

Namebase Exchange Api for Python

Open Issues Open Issues PyPI MIT Licence Total alerts Total alerts

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

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')

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

namebase-exchange-0.0.7.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

namebase_exchange-0.0.7-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file namebase-exchange-0.0.7.tar.gz.

File metadata

  • Download URL: namebase-exchange-0.0.7.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0

File hashes

Hashes for namebase-exchange-0.0.7.tar.gz
Algorithm Hash digest
SHA256 a042ddb97f9e8d90349b3b1bda824f7685f52c260d15a0d838085ea13d850c8e
MD5 c70b543be1bf0901b9b649decf7f9ea4
BLAKE2b-256 72a01f13f792293573a138961259085bf1206abb8a943fa377a6f3a7bf5d9ebf

See more details on using hashes here.

File details

Details for the file namebase_exchange-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: namebase_exchange-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0

File hashes

Hashes for namebase_exchange-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 63136e03a0fe0cd3794db1a9ab5b53fa08299a225945a75fbc8aaa9700bc7d5d
MD5 0372c96b220f5bf53caf5e927b767262
BLAKE2b-256 6136b99cd69109af57fc679ccac446bd7ff04f0af6a77be0f9ed71b5c178c1e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page