💰
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
  • Market Data
  • GET /openInterests
  • GET /marketInfo
  • GET /totalVolume
  • GET /volume
  • Fee Data
  • GET /fee
  • GET /totalFee
  • APR Data
  • GET /cumulativeApr
  • GET /apr
  1. Sudo API
  2. Sudo API Reference

Market Info

Market Data

GET /openInterests

Returns the total open interest positions for long and short positions.

Response:

{
  "long": 1000000,
  "short": 800000
}

GET /marketInfo

Returns general market information.

Response:

{
  "marketCap": 10000000,
  "slpPrice": 2,
  "slpSupply": 5000000,
  "apr": 100%
}

GET /totalVolume

Returns the total trading volume across the platform since launch.

Response:

{
  "totalVolume": 50000000
}

GET /volume

Returns daily and total trading volume.

Parameters:

Name
Type
Required
Description

timestamp

number

No

Unix timestamp to get volume for a specific day ending at timestamp (defaults to current time)

Response:

{
  "dailyVolume": 1000000,
  "totalVolume": 50000000
}

Fee Data

GET /fee

Returns fee information for a specific day.

Parameters:

Name
Type
Required
Description

timestamp

number

No

Unix timestamp to get fees for a specific day ending at timestamp (defaults to current time)

Response:

{
  "fee": 10000,
  "tradingFee": 8000,
  "fundingFee": 1000,
  "poolFee": 1000,
  "timestamp": "2023-01-01T00:00:00.000Z"
}

GET /totalFee

Returns total fee information across the platform since launch.

Response:

{
  "totalFee": 500000,
  "totalTradingFee": 400000,
  "totalFundingFee": 50000,
  "totalPoolFee": 50000
}

APR Data

GET /cumulativeApr

Returns the cumulative annual percentage rate since launch.

Response:

{
  "cumulativeApr": 0.15,
  "cumulativeFundingApr": 0.05,
  "netDepositVolume": 10000000
}

GET /apr

Returns the annual percentage rate for a specific time range with "1d" or "7d" only.

Parameters:

Name
Type
Required
Description

time_range

string

No

Time range for APR calculation (Only supported values: "7d" or "1d")

Response:

{
  "apr": 0.18,
  "fundingApr": 0.06
}
PreviousTrader DataNextIntroduction to Sudo SDK

Last updated 1 month ago