Python SDK for interacting with the Magiceden Official APIs - https://api.magiceden.dev/.
pip install magiceden_solana
-
Clone the repository: git clone https://github.com/vmpyre/magiceden_solana.git
-
Change into the project directory: cd magiceden_solana
-
Install the dependencies: pip install -r requirements.txt
First, import the SDK's classes:
from magiceden_solana import Tokens, Wallets, Collections, Launchpad, Instructions
Then, create instances of the classes to interact with the corresponding API endpoints (in this case the Tokens class):
tokens_api = Tokens()
For example, you can use the get_token_metadata() method of the Tokens class to retrieve metadata of a token by its mint address:
tokens_api.get_token_metadata("TOKEN ADDRESS HERE")
The SDK also provides additional functionality for interacting with the Wallets, Collections, Launchpad and Instructions endpoints of the Magiceden API. You can find details about the class methods below
See the Official Magiceden documentation for function arguments here: https://api.magiceden.dev/
- get_token_metadata()
- get_token_listings()
- get_received_offers()
- get_token_activities()
- get_tokens_owned_by_wallet()
- get_wallet_activities()
- get_offers_made_by_wallet()
- get_offers_received_by_wallet()
- get_escrow_balance_for_wallet()
- get_wallet_by_address()
- get_collections()
- get_collection_listings()
- get_collection_activities()
- get_collection_stats()
- get_collection_holder_stats()
- get_launchpad_collections()
- get_top_50_collections()
- buy()
- buy_now()
- buy_cancel()
- buy_change_price()
- sell()
- sell_now()
- sell_cancel()
- sell_change_price()
- deposit()
- withdraw()
Feel free to open issues, pull requests and submit feedback. We appreciate your help!
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the Magiceden team for providing the API Key.
This SDK is not affiliated with, endorsed, or sponsored by magiceden. It was created by vmpyre.xyz (Discord) for personal use and is now being made open-source for others to use and contribute to. The developer of this SDK is not responsible for any errors or issues that may occur when using this SDK. Use at your own risk.