Airdrop API
This page describes the usage of the airdrop endpoints
Airdrop Endpoint Documentation
Endpoint Overview
The Airdrop Parsing Endpoint allows users to upload a CSV file containing airdrop data for parsing and analysis. This functionality is essential for effectively managing airdrops and ensuring accurate data processing within the TokenInfo.AI platform.
Endpoint
POST /airdrop/parse
Request Parameters
Body Parameters
file:
Type: File (CSV)
Description: The CSV file containing airdrop addresses and amounts. This file is mandatory for the request.
tokenAddress:
Type: String
Description: The smart contract address of the token being airdropped. This parameter is required.
chain:
Type: Number (optional)
Description: The blockchain network on which the token exists. Defaults to
1
(Ethereum) if not provided.
Request Example
Here is an example of how to structure the request:
Response
The response from the endpoint will vary depending on the success or failure of the request.
Success Response
Status Code:
200 OK
Response Body:
Error Responses
Missing File
Status Code:
400 Bad Request
Response Body:
Missing Parameters
Status Code:
400 Bad Request
Response Body:
Wrong File Type
Status Code:
400 Bad Request
Response Body:
Internal Server Error
Status Code:
500 Internal Server Error
Response Body:
Additional Information
The CSV file should contain two columns:
Address: The recipient's wallet address.
Amount: The amount of tokens to be airdropped.
The amount is automatically converted to the smallest unit based on the token's decimal places retrieved from the blockchain.
Airdrop Mint Address Endpoint Documentation
This endpoint is useful for creating Solana airdrop instructions by obtaining the associated token address for a specific user.
Endpoint
POST /airdrop/mint/address
Request Parameters
Body Parameters
tokenAddress:
Type: String
Description: The mint address of the token. This parameter is required.
userAddress:
Type: String
Description: The user address of the sender. This parameter is required.
type:
Type: String (optional)
Description: The type of token program to use. Defaults to "token". Use "token_22" for the TOKEN_2022_PROGRAM_ID.
Request Example
Here is an example of how to structure the request:
Response
The response from the endpoint will vary depending on the success or failure of the request.
Success Response
Status Code:
200 OK
Response Body:
Error Responses
Missing Parameters
Status Code:
400 Bad Request
Response Body:
Internal Server Error
Status Code:
500 Internal Server Error
Response Body:
Example
Here is an example of how to use the endpoint to get the mint address of a user:
Example Response
By utilizing the Airdrop Mint Address Endpoint, users can efficiently retrieve the mint address associated with a specific user on the Solana network, enabling smooth and effective creation of airdrop instructions within the TokenInfo.AI platform. By utilizing the Airdrop Parsing Endpoint, users can efficiently handle airdrop data and integrate it into their crypto projects with ease and accuracy.
Last updated