Get Presale
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 the presale by its Id.
Your public API key can be found here.
Response attributes
- Name
id
- Type
- string
- Description
The id of the presale.
- Name
name
- Type
- string
- Description
The name of the presale.
- Name
description
- Type
- string
- Description
The description of the presale.
- Name
startTimestamp
- Type
- number
- Description
The UNIX timestamp when the presale starts.
- Name
endTimestamp
- Type
- number
- Description
The UNIX timestamp when the presale ends.
- Name
targetUsdcAmount
- Type
- number
- Description
The target amount of USDC to be raised in the presale.
- Name
purchasedUsdcAmount
- Type
- number
- Description
The amount of USDC already purchased in the presale.
- Name
purchasedUsdcAmount
- Type
- number
- Description
Current price of the token in USD.
- Name
status
- Type
- string
- Description
The status of the presale. Possible values are: pending, active, completed, ended.
- Name
tokenInfo
- Type
- object
- Description
- Name
name
- Type
- string
- Description
- The name of the token associated with the presale
- Name
symbol
- Type
- string
- Description
- The symbol of the token associated with the presale
- Name
imageUrl
- Type
- string
- Description
- The URL of the token image
- Name
metadata
- Type
- object
- Description
- Name
description
- Type
- string
- Description
- A description of the token
- Name
telegramLink
- Type
- string
- Description
- Telegram link for the token
- Name
websiteLink
- Type
- string
- Description
- Website link for the token
- Name
xLink
- Type
- string
- Description
- X (formerly Twitter) link for the token
- Name
farcasterLink
- Type
- string
- Description
- Farcaster link for the token
- Name
deploymentConfig
- Type
- object
- Description
- Name
vestingUnlockDate
- Type
- number
- Description
- The UNIX timestamp when vesting unlocks
- Name
lockupPercentage
- Type
- number
- Description
- The percentage of tokens locked up initially
- Name
creatorReward
- Type
- number
- Description
- The percentage of tokens allocated to the creator
- Name
pairedTokenPoolFee
- Type
- number
- Description
- The fee for paired token pools (10000 = 1%)
- Name
creatorAdmin
- Type
- string
- Description
- The address of the creator admin
- Name
creatorRewardRecipient
- Type
- string
- Description
- The address of the creator reward recipient
- Name
interfaceAdmin
- Type
- string
- Description
- The address of the interface admin
- Name
interfaceRewardRecipient
- Type
- string
- Description
- The address of the interface reward recipient
- Name
tokenDeploymentInfo
- Type
- object
- Description
- Name
tokenAddress
- Type
- string
- Description
- The address of the deployed token
- Name
hash
- Type
- string
- Description
- The transaction hash of the token deployment
This object will be present only if the token has been deployed.
- Name
presaleInfo
- Type
- object
- Description
- Name
distributed
- Type
- boolean
- Description
- Indicates if the presale tokens have been distributed
- Name
distributeTxHash
- Type
- string
- Description
- The transaction hash of the distribution, if applicable
- Name
refunded
- Type
- boolean
- Description
- Indicates if the presale has been refunded
- Name
refundTxHash
- Type
- string
- Description
- The transaction hash of the refund, if applicable
This object will be present only if the presale has been completed or ended.
- Name
createdAt
- Type
- string
- Description
The timestamp when the token was created.
Request
GET
api.metal.build/token/presales/:presaleId?publicKey=:publicKeyconst response = await fetch(
'https://api.metal.build/token/presales/81ce774a-ebaf-4d19-ba77-b1dbb41bc5d1?publicKey=YOUR_PUBLIC_API_KEY'
)
const presale = await response.json()
Response
{
"signerId": "6835bc6ee735049615435549",
"orgId": "6813d8b83531f78992d479f6",
"id": "81ce774a-ebaf-4d19-ba77-b1dbb41bc5d1",
"name": "Test Presale 1",
"description": "This is a test presale 1",
"startTimestamp": 1748352156,
"endTimestamp": 1748352456,
"presalePrice": 0.0005,
"targetUsdcAmount": 1.5,
"purchasedUsdcAmount": 1.5,
"chainId": 8453,
"status": "completed",
"participants": [
{
"userExternalId": "holder_1",
"userAddress": "0x98175c497fCDA822FbC99D27A1B51cbF97F4E298",
"usdcAmount": 1.5,
"tokenPercentage": 100,
"_id": "6835bd05e73504961543555b"
}
],
"tokenInfo": {
"name": "Test Presale Token 1",
"symbol": "TPT1",
"imageUrl": "https://ipfs.io/ipfs/QmP4Bm9VWhGoqc9DLb6Bu1y5XdFXoEnw48KCnKxePxAUcU",
"metadata": {
"description": "",
"telegramLink": "",
"websiteLink": "",
"xLink": "",
"farcasterLink": ""
},
"deploymentConfig": {
"vestingUnlockDate": 1756128062,
"lockupPercentage": 15,
"creatorReward": 40,
"pairedTokenPoolFee": 10000
},
},
"tokenDeploymentInfo": {
"tokenAddress": "0xae253ABd86Ed93980e2E3215c742F522A6C7740d",
"hash": "0x8608d3a5693163b76cf3b59117ba877531f52cf228f359dec2d14602f2b96146"
},
"presaleInfo": {
"distributed": true,
"distributeTxHash": "0x515590bf74038690e724526771d2df8964c201e797a92509b406b6f850c67bf3"
},
"createdAt": "2025-05-27T13:21:54.064Z",
"updatedAt": "2025-05-27T13:27:49.559Z",
}