LogoLogo
  • SDX Whitepaper
    • SDX Overview
    • Challenges
    • Opportunity
    • Features
    • SDX 2024 Roadmap
    • SDX Protocol Architecture
      • Pricing Model And Fee Incentives
        • Mark Price
        • Dynamic Bid-Ask Spreads
        • Capital Utilization Fee
        • Trade Fee
        • Option Pricing Example
      • Protocol Safeguards
    • Risks
  • User Guide
    • Trading On SDX
      • Trading Account
      • Option Markets & Strategies
      • Trading
      • Fees
      • Portfolio View
      • Market Configurations
      • Trading FAQs
    • SDX VIP Taker Program
    • Liquidity Pools - Earn Yield Passively
      • Liquidity Mining
      • Depositing as an LP
      • Withdrawing as an LP
      • LP FAQs
  • Developers
    • API Endpoints
    • Logos and Brand
Powered by GitBook
On this page

Was this helpful?

  1. Developers

API Endpoints

Last updated 1 year ago

Was this helpful?

bidAskLive

The bidAskLive endpoint is designed to provide near real-time bid and ask price data for option markets on SDX.

URL ()

https://bidasklive-d2jplirhdq-as.a.run.app/?assets=...&network=...

Query Parameters

  • assets: A comma-separated list of asset names for which the bid and ask prices are requested. Possible values include MSOL.

  • network: The network type on which the assets are traded. Possible values include mainnet-beta and devnet.

Response Structure

{
  "underlyingAssets": [
    {
      "assetName": String,
      "vaultAddress": String,
      "retrievedAt": Number,
      "markets": [
        {
          "marketName": String,
          // Type of option, one of "PUT", "CALL", "LONG_CALL_SPREAD",
          // "LONG_PUT_SPREAD"
          "optionType": String;
          "seriesId": Number;
          // Price of underlying asset in USD at time of record.
          "underlyingPrice": number;
          "markPriceStable": Number,
          "markPriceUnderlying": Number,
          "bidStable": Number,
          "bidUnderlying": Number,
          "askStable": Number,
          "askUnderlying": Number,
          // IV corresponding to each leg of option (in ascending order
          // of strike price). May be an empty array if no valid IV
          // is found.
          "bidIV": Number[];
          "askIV": Number[];
          "markPriceIV": Number[];
        },
        ... // More option markets
      ]
    },
    ... // More objects representing different underlying assets
  ]
}

Error Handling

  • 400 Bad Request: Invalid assets or network provided.

  • 429 Too Many Requests: Rate limit exceeded.

  • 500 Internal Server Error: Unexpected server-side errors.

Caching

The API internally caches responses for 60 seconds.

Rate Limiting

Be aware of the rate limiting policy of 5 requests / min to avoid service interruptions. The API enforces rate limits to ensure equitable resource usage.

try it out