Documentation Index
Fetch the complete documentation index at: https://docs.lasersell.io/llms.txt
Use this file to discover all available pages before exploring further.
端点
请求头
| Header | 必需 | 说明 |
|---|---|---|
Content-Type | 是 | 必须为 application/json |
x-api-key | 是 | 你的 LaserSell API 密钥 |
请求体:BuildBuyTxRequest
| 字段 | 类型 | 必需 | 说明 |
|---|---|---|---|
mint | string | 是 | 要买入的代币地址(base58)。 |
user_pubkey | string | 是 | 你的钱包公钥(base58)。 |
amount | number | 否* | 人类可读的花费金额(例如 0.1 表示 0.1 SOL,10.0 表示 10 USD1)。与 amount_in_total 互斥。 |
amount_in_total | number | 否* | 以输入资产原子单位计的花费金额(例如 SOL 的 lamports)。与 amount 互斥。 |
slippage_bps | number | 是 | 最大滑点容忍度(基点,例如 2000 = 20%)。 |
input | string | 否 | 输入资产:"SOL"(默认)或 "USD1"。 |
mode | string | 否 | 路由模式提示。有效值:"fast"、"secure"。默认 "fast"。 |
send_mode | string | 否 | 交易发送模式:"helius_sender"、"astralane" 或 "rpc"。 |
tip_lamports | number | 否 | 可选的优先费小费(lamports)。 |
partner_fee_recipient | string | 否 | 合作伙伴费用接收钱包(base58 公钥)。 |
partner_fee_bps | number | 否 | 合作伙伴费用(基点,最大 50 = 0.5%)。与 partner_fee_lamports 互斥。 |
partner_fee_lamports | number | 否 | 合作伙伴费用(固定 SOL lamports,最大 50,000,000)。与 partner_fee_bps 互斥。 |
* 必须提供
amount 或 amount_in_total 中的一个。amount 根据 input 资产自动转换为原子单位(SOL: 10^9, USD1: 10^6)。响应:BuildTxResponse
| 字段 | 类型 | 说明 |
|---|---|---|
tx | string | Base64 编码的未签名 Solana VersionedTransaction。 |
route | object | 可选的路由元数据。 |
debug | object | 可选的调试信息。 |
curl 示例
使用人类可读的amount:
amount_in_total:

