跳转到主要内容
POST
/
v1
/
solana
/
moonshot
/
create
Moonshot - 创建代币
curl --request POST \
  --url https://api-dex.chainstream.io/v1/solana/moonshot/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dex": "moonshot",
  "userAddress": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
  "name": "My Token",
  "symbol": "MTK",
  "migrationDex": "RAYDIUM",
  "icon": "https://assets.mytoken.com/icon.png",
  "description": "A revolutionary new token for the Solana ecosystem",
  "links": [
    {
      "url": "https://twitter.com/tokenproject",
      "label": "Twitter"
    }
  ],
  "tokenAmount": "1000000000",
  "priorityFee": "1000",
  "banner": "https://assets.mytoken.com/banner.png"
}
'
{
  "serializedTx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
  "extra": {
    "tokenId": "token_123456",
    "token": {
      "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
      "decimals": 9
    }
  }
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json

Token creation parameters

dex
enum<string>
必填

交易的 DEX 标识符

可用选项:
moonshot
示例:

"moonshot"

userAddress
string
必填

发起交易的钱包公钥

Required string length: 8 - 64
示例:

"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7"

name
string
必填

代币名称

Required string length: 1 - 32
示例:

"My Token"

symbol
string
必填

代币符号/代号

Required string length: 1 - 10
示例:

"MTK"

migrationDex
enum<string>
必填

代币迁移目标 DEX

可用选项:
RAYDIUM,
METEORA,
UNISWAP
示例:

"RAYDIUM"

icon
string
必填

代币图标 URL (Base64 或 HTTPS)

示例:

"https://assets.mytoken.com/icon.png"

description
string
必填

代币描述

Maximum string length: 1000
示例:

"A revolutionary new token for the Solana ecosystem"

社交媒体和网站链接

tokenAmount
string
必填

代币总供应量(基本单位)

示例:

"1000000000"

priorityFee
string

优先费用,以 SOL 增加交易处理速度

示例:

"1000"

banner
string

横幅图片 URL (如未提供则使用图标)

示例:

"https://assets.mytoken.com/banner.png"

响应

200 - application/json
serializedTx
string
必填

用于Moonshot代币创建的Base64编码交易

示例:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="

extra
object
必填

关于创建的Moonshot代币的额外元数据

示例:
{
"tokenId": "token_123456",
"token": {
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"decimals": 9
}
}