Get Presale

Endpoint: GET /token/presales/:presaleId?publicKey=:publicKey | Auth: ๐Ÿ”“ Public Key | Purpose: Retrieve public presale information

๐Ÿค– AI Implementation Summary:

  • Returns: Basic presale information without sensitive merchant data
  • Auth: Public API key as query parameter
  • Use Case: Display presale details to end users
  • Data: Core presale info, participants, token info (no completion tracking)

Retrieve presale information, such as status, token info, and purchase amounts by presale ID.


GETapi.metal.build/token/presales/:presaleId?publicKey=:publicKey

Get Presale By Id

This endpoint returns basic presale information by its ID. Unlike the merchant endpoint, this provides only public data without detailed completion tracking.

Your public API key can be found here.


Response attributes

  • Name
    id
    Type
    string
    Description

    Unique presale identifier

  • Name
    name
    Type
    string
    Description

    Presale name

  • Name
    description
    Type
    string
    Description

    Presale description

  • Name
    startTimestamp
    Type
    number
    Description

    UNIX timestamp when presale starts

  • Name
    endTimestamp
    Type
    number
    Description

    UNIX timestamp when presale ends

  • Name
    targetUsdcAmount
    Type
    number
    Description

    Target USDC amount to raise

  • Name
    purchasedUsdcAmount
    Type
    number
    Description

    Current USDC amount raised

  • Name
    status
    Type
    string
    Description

    Presale status: pending, active, completed, ended

  • Name
    participants
    Type
    array
    Description

    Array of holders who contributed to the presale

    • Name
      id
      Type
      string
      Description
      Holder's unique identifier
    • Name
      address
      Type
      string
      Description
      Holder's wallet address
    • Name
      usdcAmount
      Type
      number
      Description
      USDC amount contributed by this holder
    • Name
      tokenPercentage
      Type
      number
      Description
      Percentage of tokens allocated to this holder
  • Name
    tokenInfo
    Type
    object
    Description
    • Name
      name
      Type
      string
      Description
      Token name
    • Name
      symbol
      Type
      string
      Description
      Token symbol
    • Name
      imageUrl
      Type
      string
      Description
      Token image URL

    Basic token information only (no metadata or deployment config)

Request

GET
api.metal.build/token/presales/:presaleId?publicKey=:publicKey
const response = await fetch(
  'https://api.metal.build/token/presales/PRESALE_ID?publicKey=YOUR_PUBLIC_API_KEY'
  )

const presale = await response.json()

Response

{
  "id": "PRESALE_ID",
  "name": "E2E Test Presale",
  "description": "End-to-end test presale for verification",
  "startTimestamp": 1750014810,
  "endTimestamp": 1750101270,
  "targetUsdcAmount": 2,
  "purchasedUsdcAmount": 2,
  "status": "completed",
  "participants": [
    {
      "id": "e2e-test-holder-1",
      "address": "0x75452Eccd39bc3fb22B64C0dA202858DbD43adc5",
      "usdcAmount": 1,
      "tokenPercentage": 50
    }
  ],
  "tokenInfo": {
    "name": "E2E Test Token",
    "symbol": "E2E",
    "imageUrl": "https://example.com/e2e-token.png"
  }
}

Was this page helpful?