Content

Comments

Community comments on projects. Posting requires skin in the game — you need at least one valid trade (≥ $5) per comment on that project. Project developers can comment freely on their own projects.

GET
/api/comments?projectId={id}
Fetches paginated comments for a project, ordered newest first. Hidden comments are excluded.

Query Parameters

ParamTypeDescription
projectIdnumberProject ID (required)
pagenumberPage number (default: 1)
limitnumberItems per page (default: 50, max: 100)

Response

Response
{
  "data": [
    {
      "id": 1,
      "projectId": 42,
      "author": "0x...",
      "content": "Great project!",
      "tradeType": "buy",
      "txHash": "0x...",
      "createdAt": "2025-01-01T00:00:00.000Z",
      "project": { "dev": "0x..." }
    }
  ],
  "pagination": {
    "total": 15,
    "page": 1,
    "limit": 50,
    "hasMore": false
  }
}
POST
/api/comments
Posts a comment. Requires session and sufficient trade history on the project.
Auth: Session required + trade eligibility

Request Body

Response
{
  "projectId": 42,
  "content": "Great project!",          // max 2000 characters
  "authorAddress": "0xYourAddress"
}
200 Created400 Content exceeds 2000 characters401 Not signed in403 Not eligible or address not authenticated
DELETE
/api/comments?id={commentId}&authorAddress={address}
Soft-deletes a comment. Only the original author can delete their own comment.
Auth: Session required + must be author
Example Code
// Post a comment (requires session + trade history on the project)
await fetch("https://launchonbasis.com/api/comments", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Cookie": sessionCookie,
  },
  body: JSON.stringify({
    projectId: 42,
    content: "Great project!",
    authorAddress: "0xYourAddress",
  }),
});