IVX
  • Welcome to IVX
  • 0dtes Market Dynamics
    • Positions Payoff
    • Portfolio creation and Collateral
  • Liquidity Provision
    • Reserve Logic
    • Open Interest Cap
    • IVLP Mint and Redeem
    • Tutorial: How to provide/redeem liquidity
    • Technical Parameters
  • Trading Portfolio
    • Margin Model
    • Account Value
    • Cross Margin
    • Tutorial: How to interact with your portfolio
  • APIs
Powered by GitBook
On this page

APIs

Base URL: https://api.ivx.fi/v1/api

1. Get Current Epoch Info

GET /options/current-epoch-info

Response

Copy

{
  "status": "success",
  "data": {
    "id": 56,
    "startTimestamp": 1744790400,
    "endTimestamp": 1744876800
  }
}

2. Get Tradable Tokens

GET /options/tradable-tokens

Response

Copy

{
  "status": "success",
  "data": [
    {
      "address": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
      "symbol": "WETH",
      "image": "https://ivx-fi.s3.eu-west-1.amazonaws.com/eth.png",
      "name": "WETH",
      "buyFactors": {
        "settlementFeeRate": 0.0003,
        "riskFreeRate": 0.05,
        "maintenanceMarginRate": 0.15,
        "minPremiumPriceRate": 0.0001,
        "initMaintenanceMarginRate": 0.1,
        "openOptionFactor": 0.16,
        "openPriceFactor": 0.002,
        "closeOptionFactor": 0.16,
        "closePriceFactor": 0.0003,
        "minOpenCloseFee": 30,
        "maxPnlRate": 7.2,
        "minNumberOfContracts": 0.1,
        "maxNumberOfContracts": 200
      },
      "sellFactors": {
        "settlementFeeRate": 0.0001,
        "riskFreeRate": 0.05,
        "maintenanceMarginRate": 0.15,
        "minPremiumPriceRate": 0.0001,
        "initMaintenanceMarginRate": 0.15,
        "openOptionFactor": 0.16,
        "openPriceFactor": 0.0005,
        "closeOptionFactor": 0.16,
        "closePriceFactor": 0.0001,
        "minOpenCloseFee": 3,
        "maxPnlRate": 7.2,
        "minNumberOfContracts": 0.1,
        "maxNumberOfContracts": 200
      },
      "price": 1589.02197012
    },
    {
      "address": "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",
      "symbol": "WBTC",
      "image": "https://ivx-fi.s3.eu-west-1.amazonaws.com/btc.png",
      "name": "Wrapped BTC",
      "buyFactors": {
        "settlementFeeRate": 0.0003,
        "riskFreeRate": 0.05,
        "maintenanceMarginRate": 0.15,
        "minPremiumPriceRate": 0.0001,
        "initMaintenanceMarginRate": 0.1,
        "openOptionFactor": 0.16,
        "openPriceFactor": 0.002,
        "closeOptionFactor": 0.16,
        "closePriceFactor": 0.0003,
        "minOpenCloseFee": 100,
        "maxPnlRate": 7.2,
        "minNumberOfContracts": 0.01,
        "maxNumberOfContracts": 7.5
      },
      "sellFactors": {
        "settlementFeeRate": 0.0001,
        "riskFreeRate": 0.05,
        "maintenanceMarginRate": 0.15,
        "minPremiumPriceRate": 0.0001,
        "initMaintenanceMarginRate": 0.15,
        "openOptionFactor": 0.16,
        "openPriceFactor": 0.0005,
        "closeOptionFactor": 0.16,
        "closePriceFactor": 0.0001,
        "minOpenCloseFee": 10,
        "maxPnlRate": 7.2,
        "minNumberOfContracts": 0.01,
        "maxNumberOfContracts": 7.5
      },
      "price": 85101.004
    },
    {
      "address": "0x6969696969696969696969696969696969696969",
      "symbol": "WBERA",
      "image": "https://ivx-fi.s3.eu-west-1.amazonaws.com/bera.png",
      "name": "Wrapped Bera",
      "buyFactors": {
        "settlementFeeRate": 0.0003,
        "riskFreeRate": 0.05,
        "maintenanceMarginRate": 0.25,
        "minPremiumPriceRate": 0.0001,
        "initMaintenanceMarginRate": 0.1,
        "openOptionFactor": 0.25,
        "openPriceFactor": 0.002,
        "closeOptionFactor": 0.25,
        "closePriceFactor": 0.0003,
        "minOpenCloseFee": 0.05,
        "maxPnlRate": 7.2,
        "minNumberOfContracts": 1,
        "maxNumberOfContracts": 300
      },
      "sellFactors": {
        "settlementFeeRate": 0.0001,
        "riskFreeRate": 0.05,
        "maintenanceMarginRate": 0.25,
        "minPremiumPriceRate": 0.0001,
        "initMaintenanceMarginRate": 0.15,
        "openOptionFactor": 0.25,
        "openPriceFactor": 0.0005,
        "closeOptionFactor": 0.25,
        "closePriceFactor": 0.0001,
        "minOpenCloseFee": 0.005,
        "maxPnlRate": 7.2,
        "minNumberOfContracts": 1,
        "maxNumberOfContracts": 300
      },
      "price": 3.67379794
    }
  ]
}

3. Get Active Strikes for a Token

GET https://api.ivx.fi/options/active-strikes

Query Parameters

  • tokenAddress (required): Address of the token.

Response

Copy

{
  "status": "success",
  "data": [
    1600
  ]
}

4. Get Opened Positions

GET /options/opened-positions/{portfolioAddress}

Response

Copy

{
  "status": "success",
  "data": {
    "updatedPositionsResponse": [
      {
        "positionId": "0x42cee95ce86d591e1c902a659d3bfe5f9e72d8eeb0f430d446d2708d8ff35aa3",
        "position": {
          "optionId": "0x731a918d6fc950d92af5410f3cdcb2ea90afdd7b0b706c0530cec8cee75439a0",
          "positionAction": 0,
          "positionType": 0
        },
        "option": {
          "token": "0x6969696969696969696969696969696969696969",
          "tokenImage": "https://ivx-fi.s3.eu-west-1.amazonaws.com/bera.png",
          "tokenSymbol": "WBERA",
          "strikePrice": 3.75,
          "expireDate": 1744876800,
          "buyFactors": {
            "settlementFeeRate": 0.0003,
            "riskFreeRate": 0.05,
            "maintenanceMarginRate": 0.25,
            "minPremiumPriceRate": 0.0001,
            "initMaintenanceMarginRate": 0.1,
            "openOptionFactor": 0.25,
            "openPriceFactor": 0.002,
            "closeOptionFactor": 0.25,
            "closePriceFactor": 0.0003,
            "minOpenCloseFee": 0.05,
            "maxPnlRate": 7.2,
            "minNumberOfContracts": 1,
            "maxNumberOfContracts": 300
          },
          "sellFactors": {
            "settlementFeeRate": 0.0001,
            "riskFreeRate": 0.05,
            "maintenanceMarginRate": 0.25,
            "minPremiumPriceRate": 0.0001,
            "initMaintenanceMarginRate": 0.15,
            "openOptionFactor": 0.25,
            "openPriceFactor": 0.0005,
            "closeOptionFactor": 0.25,
            "closePriceFactor": 0.0001,
            "minOpenCloseFee": 0.005,
            "maxPnlRate": 7.2,
            "minNumberOfContracts": 1,
            "maxNumberOfContracts": 300
          }
        },
        "numberOfContract": 1,
        "pnl": -0.001561312898637815,
        "maintenanceMargin": 0.04703527245926575,
        "premiumPrice": 0.04437598956062794,
        "tokenPrice": 3.6599,
        "impliedVolatility": 1.30981909,
        "avgEntryPrice": 0.04593730245926576,
        "closeFee": 0.00109797
      }
    ],
    "requireSettlement": false
  }
}

5. Get Option Premium Details

GET /options/option-premium

Response

Copy

{
  "status": "success",
  "data": {
    "premiumPrice": "0.042853988245505625",
    "initialMaintenanceMargin": "0.05565694452985619",
    "fees": "0.00731120812",
    "volatility": "1.30981909"
  }
}

PreviousTutorial: How to interact with your portfolio

Last updated 20 days ago