Stryke Docs
HomeGitHubSocials
  • ⚡Introducing Stryke
  • 🔍Products Overview
    • Product Overview (CLAMM)
      • For Option Traders
      • For Liquidity Providers
  • 🌚Tokenomics
    • SYK Token
    • xSYK Token
    • Reward Gauges
    • Protocol Fees
  • 🚶‍♂️UI Walkthroughs
    • CLAMM Walkthrough
      • Connect Wallet
      • Navigate Markets
      • Trade Options
      • Limit Exercise
      • Provide Liquidity
      • Reward Gauges
  • ⛓️Developers
    • Contracts
      • LP Management
        • Mint a Position
        • Burn a Position
        • Reserve Liquidity
        • Withdraw Reserved Liquidity
      • Trading
        • Mint Option
        • Exercise Option
    • APIs
      • xSYK
      • CLAMM
        • Trading
          • Purchase
          • Exercise
        • LP management
        • Option markets
        • Strikes chain
    • Deployed Addresses
      • CLAMM
      • Tokens & Others
      • Gauges
    • Bug Bounty Program
  • 📚REFERENCES
    • Glossary
    • Audits
    • Partners
    • Media Kit
Powered by GitBook
LogoLogo

© 2024 Stryke

On this page

Was this helpful?

  1. Developers
  2. APIs
  3. CLAMM

LP management

In the section you will find API endpoints to help you manage your LP (Liquidity provision) positions on CLAMM from depositing to retrieving positions and withdrawing.

PreviousExerciseNextOption markets

Last updated 12 months ago

Was this helpful?

Prepare Deposit

Depositing in CLAMM is similar to depositing in Uniswap V3, with a key difference: in CLAMM, you also earn premiums.

Your deposit goes into Uniswap V3 pools, earning typical liquidity provider fees. However, when needed for options positions, deposits are withdrawn from Uniswap V3 and locked in the options market until those positions are settled. This unique structure means you earn both Uniswap V3 fees and option premiums. The /prepare endpoint below will help in generate the transaction call data to deposit in a CLAMM for a provided option market and also provide a summary of your deposit transaction.

Deposit Positions

The /positions endpoint retrieves information about Liquidity Provider (LP) positions for a specified pool on CLAMM. This endpoint allows users to view details about their current LP positions, including the liquidity they have provided, fees earned, and additional information. Along with each position the transaction call data to withdraw that position is also provided.

Deposit History

The /history endpoint retrieves the deposits and transaction details for a user in a specified pool.

Withdraw History

This endpoint retrieves information pertaining to withdrawal transactions by a user from a specified pool.

⛓️

Prepare a executable transaction and a summary for providing liquidity into CLAMM

get
Query parameters
chainIdnumber · enumRequired

Chain ID of the network

Possible values:
poolstringRequired

Address of the token pair pool

hookstringRequired

Address of the hook to deposit through

handlerstringRequired

Address of the handler to deposit through

maxStrikenumberRequired

Range max strike price

minStrikenumberRequired

Range min strike price

optionsAmountnumberRequired

Amount of options to provide liquidity for.

Responses
200Success
application/json
get
GET /clamm/deposit/prepare HTTP/1.1
Host: api.stryke.xyz
Accept: */*
200Success
{
  "tx": {
    "to": "text",
    "data": "text"
  },
  "strikes": [
    1
  ],
  "tokens": {
    "callToken": {
      "amount": "text",
      "address": "text",
      "decimals": "text",
      "symbol": "text"
    },
    "putToken": {
      "amount": "text",
      "address": "text",
      "decimals": "text",
      "symbol": "text"
    }
  }
}

Get current deposit positions

get
Query parameters
chainIdnumber · enumRequired

Chain ID of the network

Possible values:
firstnumber · enumRequired

Pagination parameter for first (Similar to Qraphql)

Possible values:
skipnumber · enumRequired

Pagination parameter for skip (Similar to Qraphql)

Possible values:
poolstringRequired

Address of the token pair pool

userstringRequired

Address of the user

Responses
200Success
application/json
get
GET /clamm/deposit/positions HTTP/1.1
Host: api.stryke.xyz
Accept: */*
200Success
[
  {
    "strikes": {
      "call": 1,
      "put": 1
    },
    "tokens": {
      "token0": {
        "address": "text",
        "decimals": "text",
        "symbol": "text"
      },
      "token1": {
        "address": "text",
        "decimals": "text",
        "symbol": "text"
      }
    },
    "earned": {
      "token0": "text",
      "token1": "text"
    },
    "liquidity": {
      "token0": "text",
      "token1": "text"
    },
    "withdrawable": {
      "token0": "text",
      "token1": "text"
    },
    "reserved": {
      "token0": "text",
      "token1": "text",
      "withdrawable": {
        "token0": "text",
        "token1": "text",
        "liquidity": "text"
      },
      "lastReserve": 1
    }
  }
]

Get history of deposit activity

get
Query parameters
chainIdnumber · enumRequired

Chain ID of the network

Possible values:
firstnumber · enumRequired

Pagination parameter for first (Similar to Qraphql)

Possible values:
skipnumber · enumRequired

Pagination parameter for skip (Similar to Qraphql)

Possible values:
poolstringRequired

Address of the token pair pool

userstringRequired

Address of the user

Responses
200Success
application/json
get
GET /clamm/deposit/history HTTP/1.1
Host: api.stryke.xyz
Accept: */*
200Success
[
  {
    "strikes": {
      "call": 1,
      "put": 1
    },
    "txHash": "text",
    "timestamp": 1,
    "liquidity": {
      "amount0": "text",
      "amount1": "text"
    },
    "tokens": {
      "token0": {
        "address": "text",
        "decimals": "text",
        "symbol": "text"
      },
      "token1": {
        "address": "text",
        "decimals": "text",
        "symbol": "text"
      }
    },
    "handler": {
      "name": "text",
      "deprecated": true,
      "handler": {},
      "pool": "text"
    }
  }
]

Get history of withdraws from CLAMM for a user

get
Query parameters
chainIdnumber · enumRequired

Chain ID of the network

Possible values:
userstringRequired

Address of the user

firstnumber · enumRequired

Pagination parameter for first (Similar to Qraphql)

Possible values:
skipnumber · enumRequired

Pagination parameter for skip (Similar to Qraphql)

Possible values:
poolstringRequired

Address of the token pair pool

Responses
200Success
application/json
400
Failed to fetch withdraw history
get
GET /clamm/withdraw/history HTTP/1.1
Host: api.stryke.xyz
Accept: */*
[
  {
    "liquidity": {
      "amount0": "text",
      "amount1": "text"
    },
    "timestamp": 1,
    "strikes": {
      "call": 1,
      "put": 1
    },
    "txHash": "text",
    "tokens": {
      "token0": {
        "address": "text",
        "decimals": "text",
        "symbol": "text"
      },
      "token1": {
        "address": "text",
        "decimals": "text",
        "symbol": "text"
      }
    },
    "handler": {
      "name": "text",
      "deprecated": true,
      "handler": {},
      "pool": "text"
    }
  }
]
  • Prepare Deposit
  • GETPrepare a executable transaction and a summary for providing liquidity into CLAMM
  • Deposit Positions
  • GETGet current deposit positions
  • Deposit History
  • GETGet history of deposit activity
  • Withdraw History
  • GETGet history of withdraws from CLAMM for a user