Create custom quote DBC launch plan
curl --request POST \
--url https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tokenMint": "<string>",
"wallet": "<string>",
"feeShareConfig": "<string>",
"quoteMint": "<string>",
"ipfs": "<string>",
"configKey": "<string>",
"feeLimits": [
{
"asset": {
"mint": "<string>",
"tokenProgram": "<string>"
},
"basisPoints": 5000,
"maximumFeeRaw": "<string>"
}
],
"additionalLookupTables": [
"<string>"
],
"quoteTokenProgram": "<string>",
"initialBuyQuoteRaw": "<string>",
"tipWallet": "<string>",
"tipLamports": 123
}
'import requests
url = "https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2"
payload = {
"tokenMint": "<string>",
"wallet": "<string>",
"feeShareConfig": "<string>",
"quoteMint": "<string>",
"ipfs": "<string>",
"configKey": "<string>",
"feeLimits": [
{
"asset": {
"mint": "<string>",
"tokenProgram": "<string>"
},
"basisPoints": 5000,
"maximumFeeRaw": "<string>"
}
],
"additionalLookupTables": ["<string>"],
"quoteTokenProgram": "<string>",
"initialBuyQuoteRaw": "<string>",
"tipWallet": "<string>",
"tipLamports": 123
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokenMint: '<string>',
wallet: '<string>',
feeShareConfig: '<string>',
quoteMint: '<string>',
ipfs: '<string>',
configKey: '<string>',
feeLimits: [
{
asset: {mint: '<string>', tokenProgram: '<string>'},
basisPoints: 5000,
maximumFeeRaw: '<string>'
}
],
additionalLookupTables: ['<string>'],
quoteTokenProgram: '<string>',
initialBuyQuoteRaw: '<string>',
tipWallet: '<string>',
tipLamports: 123
})
};
fetch('https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2', 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://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2",
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([
'tokenMint' => '<string>',
'wallet' => '<string>',
'feeShareConfig' => '<string>',
'quoteMint' => '<string>',
'ipfs' => '<string>',
'configKey' => '<string>',
'feeLimits' => [
[
'asset' => [
'mint' => '<string>',
'tokenProgram' => '<string>'
],
'basisPoints' => 5000,
'maximumFeeRaw' => '<string>'
]
],
'additionalLookupTables' => [
'<string>'
],
'quoteTokenProgram' => '<string>',
'initialBuyQuoteRaw' => '<string>',
'tipWallet' => '<string>',
'tipLamports' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2"
payload := strings.NewReader("{\n \"tokenMint\": \"<string>\",\n \"wallet\": \"<string>\",\n \"feeShareConfig\": \"<string>\",\n \"quoteMint\": \"<string>\",\n \"ipfs\": \"<string>\",\n \"configKey\": \"<string>\",\n \"feeLimits\": [\n {\n \"asset\": {\n \"mint\": \"<string>\",\n \"tokenProgram\": \"<string>\"\n },\n \"basisPoints\": 5000,\n \"maximumFeeRaw\": \"<string>\"\n }\n ],\n \"additionalLookupTables\": [\n \"<string>\"\n ],\n \"quoteTokenProgram\": \"<string>\",\n \"initialBuyQuoteRaw\": \"<string>\",\n \"tipWallet\": \"<string>\",\n \"tipLamports\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokenMint\": \"<string>\",\n \"wallet\": \"<string>\",\n \"feeShareConfig\": \"<string>\",\n \"quoteMint\": \"<string>\",\n \"ipfs\": \"<string>\",\n \"configKey\": \"<string>\",\n \"feeLimits\": [\n {\n \"asset\": {\n \"mint\": \"<string>\",\n \"tokenProgram\": \"<string>\"\n },\n \"basisPoints\": 5000,\n \"maximumFeeRaw\": \"<string>\"\n }\n ],\n \"additionalLookupTables\": [\n \"<string>\"\n ],\n \"quoteTokenProgram\": \"<string>\",\n \"initialBuyQuoteRaw\": \"<string>\",\n \"tipWallet\": \"<string>\",\n \"tipLamports\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokenMint\": \"<string>\",\n \"wallet\": \"<string>\",\n \"feeShareConfig\": \"<string>\",\n \"quoteMint\": \"<string>\",\n \"ipfs\": \"<string>\",\n \"configKey\": \"<string>\",\n \"feeLimits\": [\n {\n \"asset\": {\n \"mint\": \"<string>\",\n \"tokenProgram\": \"<string>\"\n },\n \"basisPoints\": 5000,\n \"maximumFeeRaw\": \"<string>\"\n }\n ],\n \"additionalLookupTables\": [\n \"<string>\"\n ],\n \"quoteTokenProgram\": \"<string>\",\n \"initialBuyQuoteRaw\": \"<string>\",\n \"tipWallet\": \"<string>\",\n \"tipLamports\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"response": {
"contractVersion": 1,
"operation": {
"kind": "config",
"baseMint": "<string>",
"flow": "dbc"
},
"asset": {
"mint": "<string>",
"tokenProgram": "<string>",
"decimals": 123
},
"feeLimits": [
{
"asset": {
"mint": "<string>",
"tokenProgram": "<string>"
},
"basisPoints": 5000,
"maximumFeeRaw": "<string>"
}
],
"transactions": [
{
"id": "<string>",
"kind": "config",
"dependsOn": [
"<string>"
],
"format": "v0",
"encoding": "base64",
"transaction": "<string>",
"messageSha256": "<string>",
"requiredSigners": [
"<string>"
],
"lifetime": {
"blockhash": "<string>",
"lastValidBlockHeight": "<string>"
},
"budget": {
"computeUnitLimit": 123,
"loadedAccountsDataSizeLimit": 123,
"priorityFee": {
"unit": "total_lamports",
"amount": "<string>"
}
},
"size": {
"bytes": 123,
"accounts": 123,
"signatures": 123
}
}
],
"readiness": {
"status": "ready"
}
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Token Launch
Create custom quote DBC launch plan
Build a DBC launch transaction plan using the quote and launch parameters saved with the issued Fee Share config. Pass its meteoraConfigKey as configKey. Later admin configuration edits do not change this launch’s issued terms; current token-profile and execution checks still apply. Returns a staged transaction plan: sign and send the entries in response.transactions in order. If response.readiness.status is setup_required, confirm the setup transaction(s) first, then call this endpoint again to fetch the rebuilt plan.
POST
/
token-launch
/
create-transaction
/
v2
Create custom quote DBC launch plan
curl --request POST \
--url https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tokenMint": "<string>",
"wallet": "<string>",
"feeShareConfig": "<string>",
"quoteMint": "<string>",
"ipfs": "<string>",
"configKey": "<string>",
"feeLimits": [
{
"asset": {
"mint": "<string>",
"tokenProgram": "<string>"
},
"basisPoints": 5000,
"maximumFeeRaw": "<string>"
}
],
"additionalLookupTables": [
"<string>"
],
"quoteTokenProgram": "<string>",
"initialBuyQuoteRaw": "<string>",
"tipWallet": "<string>",
"tipLamports": 123
}
'import requests
url = "https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2"
payload = {
"tokenMint": "<string>",
"wallet": "<string>",
"feeShareConfig": "<string>",
"quoteMint": "<string>",
"ipfs": "<string>",
"configKey": "<string>",
"feeLimits": [
{
"asset": {
"mint": "<string>",
"tokenProgram": "<string>"
},
"basisPoints": 5000,
"maximumFeeRaw": "<string>"
}
],
"additionalLookupTables": ["<string>"],
"quoteTokenProgram": "<string>",
"initialBuyQuoteRaw": "<string>",
"tipWallet": "<string>",
"tipLamports": 123
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokenMint: '<string>',
wallet: '<string>',
feeShareConfig: '<string>',
quoteMint: '<string>',
ipfs: '<string>',
configKey: '<string>',
feeLimits: [
{
asset: {mint: '<string>', tokenProgram: '<string>'},
basisPoints: 5000,
maximumFeeRaw: '<string>'
}
],
additionalLookupTables: ['<string>'],
quoteTokenProgram: '<string>',
initialBuyQuoteRaw: '<string>',
tipWallet: '<string>',
tipLamports: 123
})
};
fetch('https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2', 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://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2",
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([
'tokenMint' => '<string>',
'wallet' => '<string>',
'feeShareConfig' => '<string>',
'quoteMint' => '<string>',
'ipfs' => '<string>',
'configKey' => '<string>',
'feeLimits' => [
[
'asset' => [
'mint' => '<string>',
'tokenProgram' => '<string>'
],
'basisPoints' => 5000,
'maximumFeeRaw' => '<string>'
]
],
'additionalLookupTables' => [
'<string>'
],
'quoteTokenProgram' => '<string>',
'initialBuyQuoteRaw' => '<string>',
'tipWallet' => '<string>',
'tipLamports' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2"
payload := strings.NewReader("{\n \"tokenMint\": \"<string>\",\n \"wallet\": \"<string>\",\n \"feeShareConfig\": \"<string>\",\n \"quoteMint\": \"<string>\",\n \"ipfs\": \"<string>\",\n \"configKey\": \"<string>\",\n \"feeLimits\": [\n {\n \"asset\": {\n \"mint\": \"<string>\",\n \"tokenProgram\": \"<string>\"\n },\n \"basisPoints\": 5000,\n \"maximumFeeRaw\": \"<string>\"\n }\n ],\n \"additionalLookupTables\": [\n \"<string>\"\n ],\n \"quoteTokenProgram\": \"<string>\",\n \"initialBuyQuoteRaw\": \"<string>\",\n \"tipWallet\": \"<string>\",\n \"tipLamports\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokenMint\": \"<string>\",\n \"wallet\": \"<string>\",\n \"feeShareConfig\": \"<string>\",\n \"quoteMint\": \"<string>\",\n \"ipfs\": \"<string>\",\n \"configKey\": \"<string>\",\n \"feeLimits\": [\n {\n \"asset\": {\n \"mint\": \"<string>\",\n \"tokenProgram\": \"<string>\"\n },\n \"basisPoints\": 5000,\n \"maximumFeeRaw\": \"<string>\"\n }\n ],\n \"additionalLookupTables\": [\n \"<string>\"\n ],\n \"quoteTokenProgram\": \"<string>\",\n \"initialBuyQuoteRaw\": \"<string>\",\n \"tipWallet\": \"<string>\",\n \"tipLamports\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api-v2.bags.fm/api/v1/token-launch/create-transaction/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokenMint\": \"<string>\",\n \"wallet\": \"<string>\",\n \"feeShareConfig\": \"<string>\",\n \"quoteMint\": \"<string>\",\n \"ipfs\": \"<string>\",\n \"configKey\": \"<string>\",\n \"feeLimits\": [\n {\n \"asset\": {\n \"mint\": \"<string>\",\n \"tokenProgram\": \"<string>\"\n },\n \"basisPoints\": 5000,\n \"maximumFeeRaw\": \"<string>\"\n }\n ],\n \"additionalLookupTables\": [\n \"<string>\"\n ],\n \"quoteTokenProgram\": \"<string>\",\n \"initialBuyQuoteRaw\": \"<string>\",\n \"tipWallet\": \"<string>\",\n \"tipLamports\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"response": {
"contractVersion": 1,
"operation": {
"kind": "config",
"baseMint": "<string>",
"flow": "dbc"
},
"asset": {
"mint": "<string>",
"tokenProgram": "<string>",
"decimals": 123
},
"feeLimits": [
{
"asset": {
"mint": "<string>",
"tokenProgram": "<string>"
},
"basisPoints": 5000,
"maximumFeeRaw": "<string>"
}
],
"transactions": [
{
"id": "<string>",
"kind": "config",
"dependsOn": [
"<string>"
],
"format": "v0",
"encoding": "base64",
"transaction": "<string>",
"messageSha256": "<string>",
"requiredSigners": [
"<string>"
],
"lifetime": {
"blockhash": "<string>",
"lastValidBlockHeight": "<string>"
},
"budget": {
"computeUnitLimit": 123,
"loadedAccountsDataSizeLimit": 123,
"priorityFee": {
"unit": "total_lamports",
"amount": "<string>"
}
},
"size": {
"bytes": 123,
"accounts": 123,
"signatures": 123
}
}
],
"readiness": {
"status": "ready"
}
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}See Launch a Token with a Custom Quote for the complete Fee Share workflow.
Authorizations
Body
application/json
Response
Successfully built the launch transaction plan