LogoLogo
Nekodex AppDiscord
Nekodex (Playground)
Nekodex (Playground)
  • Nekodex $(=ↀωↀ=)
    • Terms of Service
  • Introducing Perp v3
  • All About Perp
    • Project overview
      • Product info
      • About us
      • Governance
    • Roadmap
    • Official links
    • FAQs
    • PERP Token
    • Contact us
    • More
      • Security & Audits
      • Partnerships
      • Careers
      • Marketing
      • Legacy Docs
  • Docs for Users
    • Earn yield
    • Trade perpetual futures
      • Fees & system limits
      • Perp Smart Account
      • Perp contract specs
    • Provide liquidity (LP)
    • How Perp v3 works
      • Pyth Oracles
    • Security
  • Docs for Devs
    • Technical Overview
    • Contracts
      • Address Manager
      • Borrowing Fee
      • Circuit Breaker
      • ⭐Clearinghouse
      • Config
      • Funding Fee
      • ⭐Maker
        • Oracle Maker
        • Spot Hedge Maker
      • Maker Reporter
      • ⭐Order Gateway
      • Quoter
      • ⭐Vault
    • Dev FAQ
    • API
      • Subgraph
    • Error codes
Powered by GitBook
On this page
  • Overview
  • Examples
  • owedRealizedPnl

Was this helpful?

  1. Docs for Devs
  2. API

Subgraph

Overview

Trading and other data is stored via The Graph. Query the subgraph using GraphQL.

https://subgraph.satsuma-prod.com/perp/lugia-optimism/playground
https://github.com/perpetual-protocol/lugia-subgraph

Examples

owedRealizedPnl

Retrieve a trader's unrealized P&L

{
  traderProfiles(
    where: {
      trader:"0x6cf8aba4b2bc2cd9be2e78cf61ef617b02893502" // Lowercase only
      }
    )
  {
    owedRealizedPnl
    market {
      id
    }
  }
}
PreviousAPINextError codes

Last updated 11 months ago

Was this helpful?