j7tracker
Trade Token

Buy Token

type buy_token — buy an existing coin from your wallet with a SOL amount.

Use POST {regionBase}/submit with "type": "buy_token". Buying is by SOL amount (sol_amount / lamports) and reuses the exact snipe instruction builders, so every quote-token quirk (USDC pump, USD1 launchlab, etc.) is handled on-chain with no extra pool fetch.

Required

FieldTypeDescription
typestringMust be buy_token
session_idstringJWT (or Authorization: Bearer)
api_keystringYour encrypted Solana API key (see How to get an API key). The signer/buyer is always the wallet decrypted from this key.
mint_addressstringToken mint (Solana pubkey)
sol_amountnumberAmount of SOL to spend (e.g. 0.1). See Buy amount below for alternatives.

Buy amount

Provide one of the following (checked in this order):

FieldTypeDescription
lamportsintegerExact lamports to spend. Takes priority if present.
sol_amountnumberSOL to spend (float).
buy_amountnumberAlias for sol_amount (used if sol_amount is absent).

A value that resolves to 0 (or a non-positive sol_amount) is rejected with buy_error.

Optional

FieldTypeDescription
modestringPlatform routing: pump (default), bonk, ray, usd1
quote_tokenstringSet to "usdc" for USDC-quoted pump coins — routes an inline Raydium CLMM SOL→USDC swap before the buy.
creator_walletstringCreator pubkey for the coin. Defaults to the buyer if omitted, but you should always pass it from coin-config / vamp data — a wrong creator derives the wrong creator-vault PDA and the buy fails on-chain.
bonkers_modebooleanLaunchLab bonkers pool selector (bonk / ray / usd1)
locked_modebooleanLaunchLab locked-pool selector (bonk / ray / usd1)
mayhem_modebooleanMayhem path for pump
slippage_bpsintegerSlippage for the SOL→USDC swap leg of a USDC-quoted pump buy. 0–10000, default 200 (2%).
bribe_fee_solnumberJito-style relay tip in SOL (clamped to the sell-path minimum)
request_idstringOpaque id echoed back on buy_success / buy_error so you can correlate responses

Modes

modeQuoteRouting
pumpSOLJ7 buy_pumpfun unified router (pre-migration BC, post-migration PumpSwap AMM, cashback pools)
pump + quote_token: "usdc"USDCInline Raydium CLMM SOL→USDC swap, then buy_exact_quote_in_v2
bonkSOLLaunchLab buy_exact_in
raySOLLaunchLab buy_exact_in against the Raydium-launchpad stats account
usd1USD1Inline J7 SOL→USD1 CLMM swap, then LaunchLab buy_exact_in priced in USD1

stroid and other EVM chains are not supported by buy_token (it's Solana-only). Any other mode returns buy_error.

Full examples

All examples use Content-Type: text/plain;charset=UTF-8 with a JSON string body to skip the CORS preflight OPTIONS request, saving one round-trip.

username in the body is overwritten from the JWT on /submit.

JavaScript (browser extension / fetch)

const BASE = "https://nyc.j7tracker.io/deploy"; // or regional: eu / lax / sgp

const body = JSON.stringify({
  type: "buy_token",
  session_id: "<jwt>",
  api_key: "<encrypted_solana_key>",
  mint_address: "MintAddressHere",
  sol_amount: 0.1,
  mode: "pump",
  creator_wallet: "CreatorPubkeyHere",
});

const res = await fetch(`${BASE}/submit`, {
  method: "POST",
  headers: { "Content-Type": "text/plain;charset=UTF-8" },
  body,
});
const data = await res.json();

if (data.type === "buy_success") {
  console.log("Bought:", data.signature);
} else {
  console.error("Error:", data.error);
}

USDC-quoted pump coin:

const body = JSON.stringify({
  type: "buy_token",
  session_id: "<jwt>",
  api_key: "<encrypted_solana_key>",
  mint_address: "MintAddressHere",
  sol_amount: 0.25,
  mode: "pump",
  quote_token: "usdc",
  creator_wallet: "CreatorPubkeyHere",
  slippage_bps: 200,
});

Python

import json
import requests

BASE = "https://nyc.j7tracker.io/deploy"

payload = {
    "type": "buy_token",
    "session_id": "<jwt>",
    "api_key": "<encrypted_solana_key>",
    "mint_address": "MintAddressHere",
    "sol_amount": 0.1,
    "mode": "pump",
    "creator_wallet": "CreatorPubkeyHere",
}

resp = requests.post(
    f"{BASE}/submit",
    headers={"Content-Type": "text/plain;charset=UTF-8"},
    data=json.dumps(payload),
    timeout=35,
)
data = resp.json()

if data.get("type") == "buy_success":
    print(f"Bought: {data['signature']}")
else:
    print(f"Error: {data.get('error')}")

Rust

use reqwest::Client;
use serde_json::{json, Value};

let base = "https://nyc.j7tracker.io/deploy";
let client = Client::new();

let body = json!({
    "type": "buy_token",
    "session_id": "<jwt>",
    "api_key": "<encrypted_solana_key>",
    "mint_address": "MintAddressHere",
    "sol_amount": 0.1,
    "mode": "pump",
    "creator_wallet": "CreatorPubkeyHere",
});

let resp = client
    .post(format!("{base}/submit"))
    .header("Content-Type", "text/plain;charset=UTF-8")
    .body(body.to_string())
    .timeout(std::time::Duration::from_secs(35))
    .send()
    .await?;

let data: Value = resp.json().await?;
match data.get("type").and_then(|t| t.as_str()) {
    Some("buy_success") => {
        println!("Bought: {}", data["signature"]);
    }
    _ => {
        eprintln!("Error: {}", data["error"]);
    }
}

Responses

Success

{
  "type": "buy_success",
  "signature": "transaction_signature",
  "mint_address": "...",
  "sol_amount": 0.1,
  "lamports": 100000000,
  "wallet_address": "...",
  "mode": "pump",
  "username": "..."
}

Error

{
  "type": "buy_error",
  "error": "description",
  "message": "description",
  "mint_address": "...",
  "wallet_address": "...",
  "mode": "...",
  "username": "..."
}

If you sent a request_id, it is echoed back on both shapes.

The request may take up to 30 seconds before buy_success or buy_error, otherwise 504 with optional last_status.

On this page