Post
Share your knowledge.
How to use API endpoint for coin data on a website?
I'm working on a website and I need to display the current market cap and price of our coin. I've found an API related to our coin, but I'm unsure how to use it. Could someone guide me on how I can get this information through the API?
- Move CLI
- Move
Answers
2To display the current market cap and price, you need to use the API endpoint. As mentioned, the endpoint you should be looking at is below the getCoinByType
function. It seems like you might want to use the getCoinMetaData
endpoint to retrieve information about a single coin. Check the metadata returned from this endpoint to see if it includes the market cap and price.
The screenshot you provided shows the returned data when the endpoint is correctly hit. Ensure you are using the right endpoint and check if the market cap or price is included in the metadata. If it’s not present, you might need a different API function or further assistance to find the correct data.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.