> For the complete documentation index, see [llms.txt](https://docs.anoncoin.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anoncoin.it/apis/create-token.md).

# Create Coin

> 🚧 **Coming Soon** - This endpoint is not yet live.

> 🔑 **Authentication required.** See [API Key](/apis/api-key.md) for setup and rate limits.

## `POST` /services/v2/create-coin-tx

Creates a new token on the Solana blockchain and returns a signed transaction to broadcast.

```
POST https://api.anoncoin.it/services/v2/create-coin-tx
```

***

## Request Headers

| Header      | Value        | Description                    |
| ----------- | ------------ | ------------------------------ |
| `x-api-key` | Your API key | **Required.** Anoncoin API key |

***

## Request Body (`form-data`)

| Field                   | Type | Required | Description                                                             |
| ----------------------- | ---- | -------- | ----------------------------------------------------------------------- |
| `tickerName`            | text | ✅        | Name of the token (e.g., `Thanos`)                                      |
| `tickerSymbol`          | text | ✅        | Symbol / ticker (e.g., `THANOS`)                                        |
| `description`           | text | ✅        | Description / lore for the coin                                         |
| `tickerImage`           | file | ✅        | Image file for the coin logo                                            |
| `twitterLink`           | text | ❌        | X (Twitter) link for the coin                                           |
| `telegramLink`          | text | ❌        | Telegram link for the coin                                              |
| `validateOnly`          | text | ❌        | Pass `"true"` to validate without creating. Default: `"false"`          |
| `feePayerWalletAddress` | text | ❌        | **Whitelisted users only.** Wallet address to claim fee externally      |
| `externalLink`          | text | ❌        | **Whitelisted users only.** External link to store                      |
| `lockTicker`            | text | ❌        | **Whitelisted users only.** Pass `"true"` to lock the ticker for 1 hour |

***

## Examples

### 1. Validate Only (Success)

Pass `validateOnly="true"` to check if the token can be created without actually creating it.

**Request:**

```bash
curl --location 'https://api.anoncoin.it/services/v2/create-coin-tx' \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'tickerImage=@"/path/to/thanos-logo.png"' \
  --form 'tickerName="Thanos"' \
  --form 'tickerSymbol="THANOS"' \
  --form 'description="Destroyed half of the world"' \
  --form 'twitterLink="https://x.com/ThanosCoin"' \
  --form 'telegramLink="https://t.me/ThanosCoin"' \
  --form 'validateOnly="true"'
```

**Response:**

```json
{
    "status": true,
    "message": "Token validation successful",
    "data": null,
    "requestId": "88994de0-f310-11f0-9f26-1b1f1981f29e"
}
```

***

### 2. Create a Token (Success)

Creates the token and returns a signed transaction to broadcast to Solana.

**Request:**

```bash
curl --location 'https://api.anoncoin.it/services/v2/create-coin-tx' \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'tickerImage=@"/path/to/thanos-logo.png"' \
  --form 'tickerName="Thanos"' \
  --form 'tickerSymbol="THANOS"' \
  --form 'description="Destroyed half of the world"' \
  --form 'twitterLink="https://x.com/ThanosCoin"' \
  --form 'telegramLink="https://t.me/ThanosCoin"'
```

**Response:**

```json
{
    "status": true,
    "message": "Token transaction created successfully",
    "data": {
        "mintAddress": "DKTd8fN2cRyLTVKZPV4tDnSgTGGeMsqwFDAC2X82YDUB",
        "meteoraConfigKey": "3EP2jpbQv8Uf3Ri9HxUFaes7VcmLBK9hH2eiqmL5weTt",
        "signedTransaction": "4ayPq9i72YWMLAkz6hmk56kkikQ3of1m1tNW5aTpG2PfrafD95nTMTN47r4ZhazRWwfgPzvVWD5LHry2wENNeo99ULoAZuTZ5mtV4ejVRFXe1PXvDkaqmX7Tn8k32zBvKsvWGqQ5vb...",
        "blockhash": "AyCmKPVHfm2E1NhLChq2GgjRW48Qd2gJMq6MR1w5vTCo",
        "lastValidBlockHeight": 438351945,
        "blockhashExpiresInSeconds": 59
    },
    "requestId": "72f200a0-26b3-11f1-af11-012a5eb3689c"
}
```

> ⚠️ **Important:** You must **broadcast the `signedTransaction`** to the Solana network before the blockhash expires (\~59 seconds).

#### Response Fields

* `status` : `true` on success.
* `message` : Status message.
* `requestId` : Unique request identifier.
* `data` :
  * `mintAddress` : The Solana token mint address for the newly created token.
  * `meteoraConfigKey` : The Meteora config key used during token creation.
  * `signedTransaction` : The signed transaction in base58 encoded string format, ready to be broadcast.
  * `blockhash` : The blockhash used for the transaction.
  * `lastValidBlockHeight` : The block height until which the transaction remains valid.
  * `blockhashExpiresInSeconds` : Time in seconds until the blockhash expires.

***

### 3. Failure (Duplicate Ticker)

If the ticker symbol is already taken, the API returns an error.

**Request:**

```bash
curl --location 'https://api.anoncoin.it/services/v2/create-coin-tx' \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'tickerImage=@"/path/to/thanos-logo.png"' \
  --form 'tickerName="Thanos"' \
  --form 'tickerSymbol="THANOS"' \
  --form 'description="Destroyed half of the world"' \
  --form 'twitterLink="https://x.com/ThanosCoin"' \
  --form 'telegramLink="https://t.me/ThanosCoin"' \
  --form 'validateOnly="true"'
```

**Response:**

```json
{
    "status": false,
    "message": "tickerSymbol already exists",
    "data": null,
    "errorCode": null,
    "requestId": "0a06a7c0-f310-11f0-9f26-1b1f1981f29e"
}
```
