DEX - トークン作成
指定された DEX 上に新しいトークンを作成
curl --request POST \
--url https://api.chainstream.io/v2/dex/{chain}/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dex": "raydium",
"userAddress": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"name": "Candy Token",
"symbol": "CANDY",
"priorityFee": "1000",
"uri": "https://assets.candyproject.com/token/icon.png",
"image": "https://assets.candyproject.com/token/icon.png",
"extra": {
"decimals": 6,
"migrateType": "amm",
"slippage": 100,
"buyAmount": 0,
"supply": 1000000000000000,
"totalSellA": 793100000000000,
"totalFundRaisingB": 85000000000,
"totalLockedAmount": 0,
"cliffPeriod": 0,
"unlockPeriod": 0,
"shareFeeReceiver": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"shareFeeRate": 1000
}
}
'import requests
url = "https://api.chainstream.io/v2/dex/{chain}/create"
payload = {
"dex": "raydium",
"userAddress": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"name": "Candy Token",
"symbol": "CANDY",
"priorityFee": "1000",
"uri": "https://assets.candyproject.com/token/icon.png",
"image": "https://assets.candyproject.com/token/icon.png",
"extra": {
"decimals": 6,
"migrateType": "amm",
"slippage": 100,
"buyAmount": 0,
"supply": 1000000000000000,
"totalSellA": 793100000000000,
"totalFundRaisingB": 85000000000,
"totalLockedAmount": 0,
"cliffPeriod": 0,
"unlockPeriod": 0,
"shareFeeReceiver": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"shareFeeRate": 1000
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dex: 'raydium',
userAddress: 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
name: 'Candy Token',
symbol: 'CANDY',
priorityFee: '1000',
uri: 'https://assets.candyproject.com/token/icon.png',
image: 'https://assets.candyproject.com/token/icon.png',
extra: {
decimals: 6,
migrateType: 'amm',
slippage: 100,
buyAmount: 0,
supply: 1000000000000000,
totalSellA: 793100000000000,
totalFundRaisingB: 85000000000,
totalLockedAmount: 0,
cliffPeriod: 0,
unlockPeriod: 0,
shareFeeReceiver: 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
shareFeeRate: 1000
}
})
};
fetch('https://api.chainstream.io/v2/dex/{chain}/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chainstream.io/v2/dex/{chain}/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dex' => 'raydium',
'userAddress' => 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
'name' => 'Candy Token',
'symbol' => 'CANDY',
'priorityFee' => '1000',
'uri' => 'https://assets.candyproject.com/token/icon.png',
'image' => 'https://assets.candyproject.com/token/icon.png',
'extra' => [
'decimals' => 6,
'migrateType' => 'amm',
'slippage' => 100,
'buyAmount' => 0,
'supply' => 1000000000000000,
'totalSellA' => 793100000000000,
'totalFundRaisingB' => 85000000000,
'totalLockedAmount' => 0,
'cliffPeriod' => 0,
'unlockPeriod' => 0,
'shareFeeReceiver' => 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
'shareFeeRate' => 1000
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.chainstream.io/v2/dex/{chain}/create"
payload := strings.NewReader("{\n \"dex\": \"raydium\",\n \"userAddress\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"name\": \"Candy Token\",\n \"symbol\": \"CANDY\",\n \"priorityFee\": \"1000\",\n \"uri\": \"https://assets.candyproject.com/token/icon.png\",\n \"image\": \"https://assets.candyproject.com/token/icon.png\",\n \"extra\": {\n \"decimals\": 6,\n \"migrateType\": \"amm\",\n \"slippage\": 100,\n \"buyAmount\": 0,\n \"supply\": 1000000000000000,\n \"totalSellA\": 793100000000000,\n \"totalFundRaisingB\": 85000000000,\n \"totalLockedAmount\": 0,\n \"cliffPeriod\": 0,\n \"unlockPeriod\": 0,\n \"shareFeeReceiver\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"shareFeeRate\": 1000\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.chainstream.io/v2/dex/{chain}/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dex\": \"raydium\",\n \"userAddress\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"name\": \"Candy Token\",\n \"symbol\": \"CANDY\",\n \"priorityFee\": \"1000\",\n \"uri\": \"https://assets.candyproject.com/token/icon.png\",\n \"image\": \"https://assets.candyproject.com/token/icon.png\",\n \"extra\": {\n \"decimals\": 6,\n \"migrateType\": \"amm\",\n \"slippage\": 100,\n \"buyAmount\": 0,\n \"supply\": 1000000000000000,\n \"totalSellA\": 793100000000000,\n \"totalFundRaisingB\": 85000000000,\n \"totalLockedAmount\": 0,\n \"cliffPeriod\": 0,\n \"unlockPeriod\": 0,\n \"shareFeeReceiver\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"shareFeeRate\": 1000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainstream.io/v2/dex/{chain}/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dex\": \"raydium\",\n \"userAddress\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"name\": \"Candy Token\",\n \"symbol\": \"CANDY\",\n \"priorityFee\": \"1000\",\n \"uri\": \"https://assets.candyproject.com/token/icon.png\",\n \"image\": \"https://assets.candyproject.com/token/icon.png\",\n \"extra\": {\n \"decimals\": 6,\n \"migrateType\": \"amm\",\n \"slippage\": 100,\n \"buyAmount\": 0,\n \"supply\": 1000000000000000,\n \"totalSellA\": 793100000000000,\n \"totalFundRaisingB\": 85000000000,\n \"totalLockedAmount\": 0,\n \"cliffPeriod\": 0,\n \"unlockPeriod\": 0,\n \"shareFeeReceiver\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"shareFeeRate\": 1000\n }\n}"
response = http.request(request)
puts response.read_body{
"serializedTx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"mintAddress": "So11111111111111111111111111111111111111112"
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
サポートされているネットワークに記載されているチェーン名
sol, bsc, eth ボディ
Token creation parameters
取引用の DEX 識別子
raydium, pumpfun, moonshot, candy, launchpad "raydium"
トランザクションを開始するウォレットの公開鍵
8 - 64"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7"
作成するトークンの名前
1 - 32"Candy Token"
トークンシンボル/ティッカー
1 - 10"CANDY"
トランザクション処理速度を上げるための優先手数料(SOL 単位)
"1000"
トークンメタデータ URI(通常は画像または JSON を参照)
"https://assets.candyproject.com/token/icon.png"
トークン画像 URL(Base64 または HTTPS)
"https://assets.candyproject.com/token/icon.png"
作成されたトークンの追加メタデータ
{
"decimals": 6,
"migrateType": "amm",
"slippage": 100,
"buyAmount": 0,
"supply": 1000000000000000,
"totalSellA": 793100000000000,
"totalFundRaisingB": 85000000000,
"totalLockedAmount": 0,
"cliffPeriod": 0,
"unlockPeriod": 0,
"shareFeeReceiver": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"shareFeeRate": 1000
}レスポンス
トークン作成用の Base64 エンコードされたトランザクション
"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
トランザクション署名が必要なトークンミントアドレス
"So11111111111111111111111111111111111111112"
このページは役に立ちましたか?
curl --request POST \
--url https://api.chainstream.io/v2/dex/{chain}/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dex": "raydium",
"userAddress": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"name": "Candy Token",
"symbol": "CANDY",
"priorityFee": "1000",
"uri": "https://assets.candyproject.com/token/icon.png",
"image": "https://assets.candyproject.com/token/icon.png",
"extra": {
"decimals": 6,
"migrateType": "amm",
"slippage": 100,
"buyAmount": 0,
"supply": 1000000000000000,
"totalSellA": 793100000000000,
"totalFundRaisingB": 85000000000,
"totalLockedAmount": 0,
"cliffPeriod": 0,
"unlockPeriod": 0,
"shareFeeReceiver": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"shareFeeRate": 1000
}
}
'import requests
url = "https://api.chainstream.io/v2/dex/{chain}/create"
payload = {
"dex": "raydium",
"userAddress": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"name": "Candy Token",
"symbol": "CANDY",
"priorityFee": "1000",
"uri": "https://assets.candyproject.com/token/icon.png",
"image": "https://assets.candyproject.com/token/icon.png",
"extra": {
"decimals": 6,
"migrateType": "amm",
"slippage": 100,
"buyAmount": 0,
"supply": 1000000000000000,
"totalSellA": 793100000000000,
"totalFundRaisingB": 85000000000,
"totalLockedAmount": 0,
"cliffPeriod": 0,
"unlockPeriod": 0,
"shareFeeReceiver": "oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7",
"shareFeeRate": 1000
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dex: 'raydium',
userAddress: 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
name: 'Candy Token',
symbol: 'CANDY',
priorityFee: '1000',
uri: 'https://assets.candyproject.com/token/icon.png',
image: 'https://assets.candyproject.com/token/icon.png',
extra: {
decimals: 6,
migrateType: 'amm',
slippage: 100,
buyAmount: 0,
supply: 1000000000000000,
totalSellA: 793100000000000,
totalFundRaisingB: 85000000000,
totalLockedAmount: 0,
cliffPeriod: 0,
unlockPeriod: 0,
shareFeeReceiver: 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
shareFeeRate: 1000
}
})
};
fetch('https://api.chainstream.io/v2/dex/{chain}/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chainstream.io/v2/dex/{chain}/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dex' => 'raydium',
'userAddress' => 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
'name' => 'Candy Token',
'symbol' => 'CANDY',
'priorityFee' => '1000',
'uri' => 'https://assets.candyproject.com/token/icon.png',
'image' => 'https://assets.candyproject.com/token/icon.png',
'extra' => [
'decimals' => 6,
'migrateType' => 'amm',
'slippage' => 100,
'buyAmount' => 0,
'supply' => 1000000000000000,
'totalSellA' => 793100000000000,
'totalFundRaisingB' => 85000000000,
'totalLockedAmount' => 0,
'cliffPeriod' => 0,
'unlockPeriod' => 0,
'shareFeeReceiver' => 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
'shareFeeRate' => 1000
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.chainstream.io/v2/dex/{chain}/create"
payload := strings.NewReader("{\n \"dex\": \"raydium\",\n \"userAddress\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"name\": \"Candy Token\",\n \"symbol\": \"CANDY\",\n \"priorityFee\": \"1000\",\n \"uri\": \"https://assets.candyproject.com/token/icon.png\",\n \"image\": \"https://assets.candyproject.com/token/icon.png\",\n \"extra\": {\n \"decimals\": 6,\n \"migrateType\": \"amm\",\n \"slippage\": 100,\n \"buyAmount\": 0,\n \"supply\": 1000000000000000,\n \"totalSellA\": 793100000000000,\n \"totalFundRaisingB\": 85000000000,\n \"totalLockedAmount\": 0,\n \"cliffPeriod\": 0,\n \"unlockPeriod\": 0,\n \"shareFeeReceiver\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"shareFeeRate\": 1000\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.chainstream.io/v2/dex/{chain}/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dex\": \"raydium\",\n \"userAddress\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"name\": \"Candy Token\",\n \"symbol\": \"CANDY\",\n \"priorityFee\": \"1000\",\n \"uri\": \"https://assets.candyproject.com/token/icon.png\",\n \"image\": \"https://assets.candyproject.com/token/icon.png\",\n \"extra\": {\n \"decimals\": 6,\n \"migrateType\": \"amm\",\n \"slippage\": 100,\n \"buyAmount\": 0,\n \"supply\": 1000000000000000,\n \"totalSellA\": 793100000000000,\n \"totalFundRaisingB\": 85000000000,\n \"totalLockedAmount\": 0,\n \"cliffPeriod\": 0,\n \"unlockPeriod\": 0,\n \"shareFeeReceiver\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"shareFeeRate\": 1000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainstream.io/v2/dex/{chain}/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dex\": \"raydium\",\n \"userAddress\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"name\": \"Candy Token\",\n \"symbol\": \"CANDY\",\n \"priorityFee\": \"1000\",\n \"uri\": \"https://assets.candyproject.com/token/icon.png\",\n \"image\": \"https://assets.candyproject.com/token/icon.png\",\n \"extra\": {\n \"decimals\": 6,\n \"migrateType\": \"amm\",\n \"slippage\": 100,\n \"buyAmount\": 0,\n \"supply\": 1000000000000000,\n \"totalSellA\": 793100000000000,\n \"totalFundRaisingB\": 85000000000,\n \"totalLockedAmount\": 0,\n \"cliffPeriod\": 0,\n \"unlockPeriod\": 0,\n \"shareFeeReceiver\": \"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7\",\n \"shareFeeRate\": 1000\n }\n}"
response = http.request(request)
puts response.read_body{
"serializedTx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"mintAddress": "So11111111111111111111111111111111111111112"
}
