Wex.nz REST API Python Client
Wex.nz provides REST APIs that you can use to interact with platform programmatically.
This API client will help you interact with Wex.nz by REST API.
License
MIT License
Wex.nz REST API Reference
Contributing
To create new endpoint - create issue or create pull request
How to use
Get ticker for each available pair (public api):
conn = wexapi.common.WexConnection()
info = wexapi.public.InfoApi(conn)
api = wexapi.public.PublicApi(conn)
for pair in info.pair_names:
ticker = api.get_ticker(pair, info)
Get account info (trade api - require api keys)
key_file = "/var/www/keys.txt"
with wexapi.keyhandler.KeyHandler(key_file) as handler:
if not handler.keys:
print("No keys in key file.")
else:
for key in handler.keys:
print("Printing info for key {}".format(key))
with wexapi.WexConnection() as conn:
t = wexapi.trade.TradeApi(key, handler, connection=conn)
r = t.get_info()
Running the tests
python -m unittest discover wexapi
Setup dev environment with docker
Install Docker and Docker Compose
cp /{proj_path}/Dockerfile.dist /{proj_path}/Dockerfile
cp /{proj_path}/docker-compose.yml.dist /{proj_path}/docker-compose.yml
In Dockerfile change {host_user} to your local user.
Build and run docker container
docker-compose build
docker-compose up -d
Login to docker container
docker exec -ti -e COLUMNS="`tput cols`" -e LINES="`tput lines`" wexapi_wexapi_1 bash
Donate
If you find the library useful and would like to donate, please send some coins here:
BTC: 19nhMniZJ4p771ZvFHL3s8zoBML46LqFRv
BCH: qpsx260laq6wj4s99052nuy063v7j0sxsqxluur84z
ETH: 0x387D91F008dB992c7DAd9be8493dfA68E565706E
XRP: rpoi4dWSbEyQP2xmpsNMxCk2g2n5QvVSmM
Waves: 3PPXpTagbQCSXYZ3Y5h6vuFPj6RxHbnapmE
BTS: madmis-1
Upgrade pip package (personal notes)
python setup.py sdist
twine upload dist/*
Metadata
Release files for wexapi 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wexapi-0.1.6.tar.gz | 17.9 kB | Without provenance | Details for wexapi-0.1.6.tar.gz |
Release files / wexapi-0.1.6.tar.gz
| Download URL | wexapi-0.1.6.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
208f5c3e3ef1cbc403cc5cf696f0018eee231c2dbfb515ddd3ad093b2edc5fe3
|
|
BLAKE2b-256 checksum How to use checksums |
012a7e6b0a34f35d179ebb6d44c65d490d44e62492a3dc03be2b9b7d31e04787
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wexapi 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.