Skip to content

defilogist/tensor-trade-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(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.

About

Python Client for the Tensor Trade markeplace API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages