跳转到主要内容

端点

GET https://api.lasersell.io/v1/history

请求头

Header必需说明
x-api-key你的 LaserSell API 密钥

查询参数

参数类型默认值说明
limitnumber50返回的最大交易数量(上限 200)。
offsetnumber0分页时跳过的交易数量。
mintstring按特定代币地址筛选结果(base58)。
walletstring按特定钱包公钥筛选结果(base58)。

响应:TradeHistoryResponse

字段类型说明
tradesTradeHistoryItem[]交易记录数组,按最近时间排序。
totalnumber | null匹配交易的估计总数,用于分页。

TradeHistoryItem 对象

字段类型说明
idnumber唯一交易记录标识符。
session_idnumber产生此交易的流会话。
position_idnumber会话内的仓位标识符。
wallet_pubkeystring持有仓位的钱包公钥(base58)。
mintstring代币地址(base58)。
entry_quote_unitsnumber开仓花费的报价资产原子单位。
exit_quote_unitsnumber | null平仓收到的报价资产原子单位。
profit_quote_unitsnumber | null报价资产原子单位的净利润或亏损。
tokensnumber入场时获得的代币数量(原子单位)。
exit_reasonstring | null平仓原因(如 target_profitstop_losstrailing_stopmanual)。
market_kindstring | null交易代币所在的 DEX 或发射台(如 PumpFunRaydiumCpmm)。
strategy_target_profit_pctnumber | null开仓时配置的目标利润百分比。
strategy_stop_loss_pctnumber | null开仓时配置的止损百分比。
strategy_trailing_stop_pctnumber | null开仓时配置的追踪止损百分比。
opened_atstringISO 8601 格式的开仓时间戳。
closed_atstring | nullISO 8601 格式的平仓时间戳。

curl 示例

curl "https://api.lasersell.io/v1/history?limit=10" \
  -H "x-api-key: YOUR_API_KEY"
使用筛选:
curl "https://api.lasersell.io/v1/history?limit=20&wallet=YOUR_WALLET_PUBKEY&mint=TOKEN_MINT" \
  -H "x-api-key: YOUR_API_KEY"

示例响应

{
  "trades": [
    {
      "id": 42,
      "session_id": 1001,
      "position_id": 3,
      "wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
      "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "entry_quote_units": 500000000,
      "exit_quote_units": 650000000,
      "profit_quote_units": 150000000,
      "tokens": 1000000,
      "exit_reason": "target_profit",
      "market_kind": "PumpFun",
      "strategy_target_profit_pct": 30.0,
      "strategy_stop_loss_pct": 50.0,
      "strategy_trailing_stop_pct": 20.0,
      "opened_at": "2026-03-07T12:00:00Z",
      "closed_at": "2026-03-07T12:30:00Z"
    }
  ],
  "total": 1
}

错误响应

参见错误处理了解完整的错误信封规范和可重试错误逻辑。