💰
Sudo Gitbook
  • 👋Welcome to Sudo
  • Overview
    • 💡What is Sudo
    • ✨Sudo Features
  • Trade on Sudo
    • 💎Start trading
      • Supported Assets
      • Fees
      • Market Hours
    • 📚Educational Resources
      • What Are Perpetual Futures?
      • Using Leverage Wisely
      • Risk Management Fundamentals
      • What is Sharpe Ratio
      • Real Trading Scenarios
      • Avoiding Rookie Mistakes
  • Liquidity Providers
    • 💰How to provide liquidity
    • 🛰️SLP
    • 🏦SLP Staking
  • S Rewards
    • S Card
      • Getting S Card
      • S Points
      • Using Your S Card
  • Sudo API
    • Sudo API Reference
      • Trader Data
      • Market Info
  • Sudo SDK
    • Introduction to Sudo SDK
    • Core Concepts
    • Installation and Setup
    • Quick Start
    • 📚v0.0.6
      • API Reference
        • SudoAPI
          • Open Position
          • Decrease Position
          • Pledge In Position
          • Redeem From Position
          • Cancel Order
          • getPositionCapInfoList
          • getPositionInfoList
          • getPositionConfig
        • OracleAPI
          • subOraclePrices
      • Changelog
    • Best Practices
    • Troubleshooting
  • Feature Details
    • Algorithm Balanced Funding Rate (ABFR)
    • Risk control
    • FAQ
    • Roadmap
    • On-chain program
Powered by GitBook
On this page
  • GET /traderSummary
  • GET /traderEvents
  • GET /traderSlpEntryPrice
  • GET /traderPoints
  1. Sudo API
  2. Sudo API Reference

Trader Data

GET /traderSummary

Returns trading summary statistics for a specific trader.

Parameters:

Name
Type
Required
Description

trader

string

Yes

The trader's address

Response:

{
  "totalVolume": 1000,
  "totalPnl": 100,
  "totalLiquidationVolume": 0,
  "totalTrades": 10
}

GET /traderEvents

Returns a list of trading events for a specific trader.

Parameters:

Name
Type
Required
Description

trader

string

Yes

The trader's address

Response:

[
  {
    "eventName": "OpenPositionSuccessEvent",
    "owner": "0x123...",
    "txid": "transaction-hash",
    "volume": 100,
    "fee": 1,
    "pnl": 5,
    "network": "mainnet",
    "created": 1642348800000,
    "indexPrice": 50000,
    "indexToken": "BTC",
    "direction": "long",
    "collateralAmount": 10,
    "collateralPrice": 1,
    "positionId": "position-id"
  }
]

GET /traderSlpEntryPrice

Returns the average entry price for SLP tokens for a specific trader.

Parameters:

Name
Type
Required
Description

trader

string

Yes

The trader's address

Response:

{
  "entryPrice": 1.05
}

GET /traderPoints

Returns the points accumulated by a trader.

Parameters:

Name
Type
Required
Description

address

string

Yes

The trader's address

Response:

{
  "distinctUserId": "0x123...",
  "offChainPoints": 1500,
  "suiNsName": "@trader"
}
PreviousSudo API ReferenceNextMarket Info

Last updated 1 month ago