Fetch a Presale by ID

Retrieve presale details for a specific presale.

GET https://www.clanker.world/api/tokens/presale/by-address?id=[presale_id]

Headers:

x-api-key: your_api_key

Query Parameters

address: string (required) - The contract address of the presale token

Response

{
  "presaleConfig": {
    "presale_id": 123,
    "bps_available": "1000000",
    "eth_per_bps": "0.0001",
    "bps_sold": "0",
    "end_time": "2024-03-21T00:00:00Z",
    "token_address": "0x...",
    "bpsAvailable": "1000000",
    "ethPerBps": "0.0001",
    "bpsSold": "0",
    "endTime": "2024-03-21T00:00:00Z",
    "tokenAddress": "0x..."
  },
  "deployedToken": {
    "tx_hash": "0x...",
    "cast_hash": "0x...",
    "contract_address": "0x...",
    "requestor_fid": 1234,
    "name": "Token Name",
    "symbol": "TKN",
    "img_url": "https://...",
    "pool_address": "0x...",
    "type": "clanker_v3",
    "pair": "WETH",
    "presale_id": 123
  }
}

Example Request

curl -X GET 'https://www.clanker.world/api/tokens/presale/by-address?address=0x1234567890123456789012345678901234567890' \
-H 'Authorization: Bearer YOUR_CLANKER_API_KEY'

Error Responses

Invalid Address Format

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid address format"
  }
}

Presale Not Found

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Presale token not found for the given address"
  }
}

Last updated