DailyChain
  • Introduction
  • Getting Started
    • Network Information
    • Setting Up a Connection
  • DEVELOPER RESOURCES
    • Deploying Smart Contract
    • Local Daily Node
    • Token Creator
    • NFT & Token API
    • Resources
    • Node Ports
    • Auto Installation
  • Daily Wallet
    • Privacy Policy
Powered by GitBook
On this page
  1. DEVELOPER RESOURCES

NFT & Token API

API Documentation: Token Management API

Introduction

Welcome to the Token Management API provided by api.dailychain.org! This API allows you to access information related to tokens, token holders, and current token balances. Follow the guidelines below to integrate and utilize these endpoints successfully.

Base URL

The base URL for all endpoints is: https://api.dailychain.org

1. Get Tokens

Endpoint:

Copy

GET /getTokens

Description:

Retrieve a list of tokens.

Example:

Copy

curl -X GET https://api.dailychain.org/getTokens

2. Get Token Holders

Endpoint:

Copy

GET /getTokenHolders

Parameters:

  • token_contract (required): The address of the token contract (e.g., 0xabc...).

Description:

Retrieve the list of holders for a specific token.

Example:

Copy

curl -X GET https://api.dailychain.org/getTokenHolders?token_contract=0xabc...

3. Get Current Token Balance by Token Address

Endpoint:

Copy

GET /getCurrentTokenBalanceByTokenAddress

Parameters:

  • owner_address (required): The address of the token owner (e.g., 0xdef...).

  • token_contract (required): The address of the token contract (e.g., 0xabc...).

Description:

Retrieve the current token balance for a specific token and owner.

Example:

Copy

curl -X GET https://api.dailychain.org/getCurrentTokenBalanceByTokenAddress?owner_address=0xdef...&token_contract=0xabc...

4. Get Current Token Balance

Endpoint:

Copy

GET /getCurrentTokenBalance

Parameters:

  • owner_address (required): The address of the token owner (e.g., 0xdef...).

Description:

Retrieve the current token balance for a specific owner.

Example:

Copy

codecurl -X GET https://api.dailychain.org/getCurrentTokenBalance?owner_address=0xdef...


Error Handling

  • 400 Bad Request:

    • If a required parameter is missing or invalid.

    • Example response: { "error": "owner_address is required" }

  • 500 Internal Server Error:

    • If there is an issue with the server.

    • Example response: { "error": "Internal Server Error" }


Conclusion

Congratulations! You've successfully learned how to interact with the Token Management API. If you have any further questions or issues, please contact our support team at support@dailychain.org.


Note: Make sure to replace https://api.dailychain.org with the actual base URL of the API.

PreviousToken CreatorNextResources

Last updated 9 months ago