Is it feasible to achieve this using Python in conjunction with Blockfrost? Is there a way to obtain the mint price through this approach? ty
First, it depends what you mean by “mint”. It is used rather loosely in the NFT community, sometimes also for situations, where the NFTs were pre-minted to an address of the project and are just sold in the “mint” event. Such transactions are not really distinguishable from any other transfer of tokens.
If the transaction to the wallet is the actual minting transaction, it can be found, but I haven’t found the fitting end point in Blockfrost.
In Koios, it would be:
- Find all addresses for the stake with: https://api.koios.rest/#post-/account_addresses
- Find all transactions for those addresses with: https://api.koios.rest/#post-/address_txs
- Get the transaction details with: https://api.koios.rest/#post-/tx_info
- Examine
assets_minted
in the result and maybe cross-check that the minted asset is really on an output to that address and not minted for someone else.
Blockfrost has:
- https://docs.blockfrost.io/#tag/Cardano-Accounts/paths/~1accounts~1%7Bstake_address%7D~1addresses/get
- https://docs.blockfrost.io/#tag/Cardano-Addresses/paths/~1addresses~1%7Baddress%7D~1transactions/get
- https://docs.blockfrost.io/#tag/Cardano-Transactions/paths/~1txs~1%7Bhash%7D/get
- But I don’t see a way to get information about the mints through this or another of the transaction end points.
You can use Python libraries such as requests
or an SDK (if available) to interact with the Blockfrost API. You might need to install these libraries if you haven’t already:
pip install requests
Use Python to send HTTP requests to Blockfrost’s API endpoints. To obtain the mint price, you would need to query the appropriate endpoint. The exact endpoint and request parameters might change over time, so I recommend checking Blockfrost’s official documentation for the most up-to-date information on how to retrieve mint prices.
Thank you,
I have managed to fetch all data I need. Next step is to filter out the right input and output when it is more than one.
man. 23. okt. 2023, 13:45 skrev antonio.casoria via Cardano Forum <notifications@cardano.discoursemail.com>: