Astralane
  • Welcome to Astralane
  • 🚅Low Latency
    • Quickstart
    • Endpoints and Configs
    • Submit Transactions
  • 🔍Data Pipelines
    • Overview
    • Our Products
      • Authentication
      • Dex Pools API
        • Latest Dex Pools API
      • OHLCV API
      • Websocket - Token price and Volume
      • Trade Data - Dex trades
      • PnL Indexer
      • Historical Token Portfolio
      • Top 100 Token Holders
      • Token Price API
      • Historical Token Price API
      • Profitable Wallets
      • Wallet PnL API
      • Trasaction Indexer
  • Japanese Docs
    • 🌌 Astralane ドキュメント
      • 低遅延 -クイックスタート
      • 🚅 エンドポイントと設定
      • トランザクションの送信
  • Mandarin Docs
    • 🌌 欢迎来到 Astralane
      • 低延迟快速入门
      • 🚅 端点和配置
      • 提交交易
Powered by GitBook
On this page
  1. Data Pipelines
  2. Our Products

Wallet PnL API

The API provides key metrics to evaluate the trading performance of wallets

The Wallet PnL API delivers detailed Profit and Loss (PnL) insights for a specific wallet over a user-defined time period. It aggregates essential trading metrics, including:

  • Trade Volume

  • Trade Count

  • Win Rate

  • Overall PnL

Use Case: Ideal for tracking and analyzing the trading performance of individual wallets—whether for personal portfolio monitoring, research, or competitive benchmarking.

Endpoint: GET /api/v1/dataset/wallet-pnl

Description: Returns detailed Profit and Loss (PnL) metrics for a specified wallet over a selected time window. The response includes trade volume, trade count, win rate, and overall PnL, providing a comprehensive view of the wallet's trading performance.


Query Parameters

  • time (required): The time window for calculating PnL metrics. Supported values:

    • 2h – 2 hours

    • 3h – 3 hours

    • 5h – 5 hours

    • 10h – 10 hours

    • 24h – 24 hours

    • 3d – 3 days

    • 1W – 1 week

  • wallet (required): The wallet address (public key) for which to retrieve PnL data.


Example Request

GET /api/v1/dataset/wallet-pnl?time=24h&wallet=F18ibDvGaj4Yjzk1UfWCk5jE9zoy1JYkXNTCBwPuZpyf HTTP/1.1
Authorization: Bearer YOUR_API_KEY

This request fetches the wallet’s PnL metrics for the last 24 hours.

Response Format

The API returns a JSON object containing key performance metrics for the specified wallet.


Sample Response

{
  "wallet": "F18ibDvGaj4Yjzk1UfWCk5jE9zoy1JYkXNTCBwPuZpyf",
  "trade_volume": 12500.75,
  "trade_count": 98,
  "win_rate": 45,
  "pnl_overview": 650.32
}

Field Descriptions

  • wallet: The unique wallet address provided in the request.

  • trade_volume: Total trade volume (in USD) executed by the wallet during the specified time window.

  • trade_count: Number of trades performed by the wallet in the given timeframe.

  • win_rate: Percentage of trades that resulted in profit. Calculated as: (Number of Winning Trades / Total Trades with Non-Zero Sell Amount) × 100

  • pnl_overview: Net Profit and Loss (PnL) for the wallet during the selected period. Positive value = Profit, Negative value = Loss


Use Cases

  • Personal Performance Monitoring: Evaluate your wallet’s trading performance over time to identify strengths and areas for improvement.

  • Investor Due Diligence: Assess the historical profitability of a wallet before making investment decisions, forming partnerships, or mirroring trading activity.

  • Trading Strategy Analysis: Analyze wallet-level PnL data to refine or validate trading strategies based on actual performance.

PreviousProfitable WalletsNextTrasaction Indexer

Last updated 1 month ago

🔍