(unofficial) Python Client for Tensor Trade
This library is a simple Python client for the Tensor Trade API. It's aimed is to make your bot trading simpler.
Disclaimer
Be aware that this client directly communicates with Tensor. Be sure of your script before doing any financial operations. Moreover, there is no guarantee about the reliability of this client. I encourage you to tests your scripts with cheap cNFT collections first.
The developer of this client is not responsible for any errors or issues that may occur when using this SDK. Use at your own risk.
Tips
If you like this client, you can tip me at: thewisetrade.sol or buy the logo NFT.
Install
Install the library with:
pip install tensortradepy
Development version:
pip install git+https://github.com/defilogist/tensor-trade-py
Usage example
import os
from tensortradepy import TensorClient
client = TensorClient(
os.getenv("TENSOR_API_KEY"),
os.getenv("WALLET_PRIVATE_KEY"),
"mainnet-beta"
)
floor = client.get_collection_floor("theheist")
price = floor * 0.99
nft_mint = "nft-mint"
client.list_nft(nft_mint, price) # we assume your keypair owns the NFT.
Documenation
A full documentation is available.
Functions available
- get_collection_infos(slug)
- get_collection_floor(slug)
- list_nft(mint, price) // Price in $SOL
- list_cnft(mint, price) // Price in $SOL
- delist_cnft(mint)
- edit_cnft_listing(mint, price) // Price in $SOL
- set_cnft_collection_bid(slug, price, quantity)
- edit_cnft_collection_bid(slug, price, quantity)
- cancel_cnft_collection_bid(slug, price, quantity)
- buy_nft_(seller, mint_address, price)
- buy_cnft_(seller, mint_address, price)
Contributions
Any contribution is welcome, please open your PR for additions and report bug through Github issues.
About
This client is developed by thewise.trade.
Metadata
Release files for tensortradepy 0.2.3
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 |
|---|---|---|---|---|
| tensortradepy-0.2.3.tar.gz | 7.0 kB | Without provenance | Details for tensortradepy-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tensortradepy-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for tensortradepy-0.2.3-py3-none-any.whl |
Total release size: 14.3 kB
Release files / tensortradepy-0.2.3.tar.gz
| Download URL | tensortradepy-0.2.3.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c5d9f74ab98a6ae9a93b8dff3eabe1a3e5f80e6adf3f155c5d6d745dbff703d
|
|
BLAKE2b-256 checksum How to use checksums |
340b79f320a71493ad1b7a5a153b4e2ff30579e707d573142db09e0a7d52306e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / tensortradepy-0.2.3-py3-none-any.whl
| Download URL | tensortradepy-0.2.3-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
168c8fcce6559e6014b2e9a2404786690d047d074334251a525b25390d7d5d0d
|
|
BLAKE2b-256 checksum How to use checksums |
9bb3fbe2bb6fac9590480938393b3e565e7c48b406a0b6efea52d1d86bb1459e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for tensortradepy 0.2.3
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.