LogoLogo
  • Welcome to Alterscope
  • INTRODUCTION
    • What is DefAI?
    • What are AI Agents?
    • What is Alteron?
  • How to get started
    • Sign Up
    • Agent Framework
    • Agent Signals
      • APY Changes
      • Arbitrage Opportunities
      • Centralised Exchange Movements
      • Cyvers Security Alerts
      • DAO Proposals
      • Ecosystem In/Out-Flows
      • ERC20 Price Movements
      • Function Calls
      • Gas Fee Spikes
      • Protocol Health Alerts
      • Simple Moving Averages
      • Stablecoin Price Deviations
      • Token Transfers
      • Wallet Health Factors
      • Whale Activity
    • Agent Network
  • Data Feeds
    • API Endpoint
    • Authentication
    • API Reference
      • Development
      • Development Score
      • Security
      • Liquidity
        • Lending Protocols
        • Decentralized Exchange Protocols
        • Stablecoin Protocols
        • Derivative Protocols
        • Liquid Staking Protocols
      • Community
      • Governance
      • Governance Score
      • Blockchain
      • Oracles
      • Overall Score
      • Tokenomics
      • Tokenomics Score
      • Restaking
    • Swagger API Specification
    • Install & run cURL on Windows/MacOSX/Linux
  • Dashboard Functionalities
    • Market Insights
    • Custom API Creation (Nexus)
    • Custom Dashboards (Eagle Eye)
Powered by GitBook
On this page
  1. Data Feeds
  2. API Reference
  3. Liquidity

Derivative Protocols

The derivatives endpoint contains analytics data about specific derivatives protocols and the trading pairs listed in those protocols. Currently: "gmx", "dydx" and "synthetix" are supported pairs.

PreviousStablecoin ProtocolsNextLiquid Staking Protocols

Last updated 1 year ago

Note: The sample request below retrieves list of available pairs for a dydx protocol. Currently gmx, dydx and synthetix are supported pairs.

curl https://api.alterscope.org/data/derivatives/dydx/pairs -H "Authorization: Bearer <your_access_token>"
{
   "status":true,
   "data":{
      "protocol":"dydx",
      "chain":"ethereum",
      "version":"V3",
      "pairs":[
         "ALGO-USD",
         "COMP-USD",
         "BCH-USD",
         "YFI-USD",
         "DOT-USD",
         "ICP-USD",
         "ETH-USD",
         "XLM-USD",
         "ADA-USD",
         "CRV-USD",
         "NEAR-USD",
         "ATOM-USD",
         "SOL-USD",
         "LINK-USD",
         "XMR-USD",
         "ZEC-USD",
         "DOGE-USD",
         "LTC-USD",
         "EOS-USD",
         "FIL-USD",
         "ENJ-USD",
         "UNI-USD",
         "AAVE-USD",
         "AVAX-USD",
         "UMA-USD",
         "MATIC-USD",
         "XTZ-USD",
         "SNX-USD",
         "TRX-USD",
         "MKR-USD",
         "RUNE-USD",
         "1INCH-USD",
         "BTC-USD",
         "ZRX-USD",
         "SUSHI-USD",
         "ETC-USD",
         "CELO-USD"
      ]
   }
}
  • Protocol: This indicates the name or identifier of the decentralized finance protocol under consideration, which is "dydx" in this case.

  • Chain: Specifies the blockchain on which the protocol operates, and in this case, it is Ethereum.

  • Version: Denotes the version of the protocol used, with "V3" pointing to the third version.

  • TVL (Total Value Locked) USD : Represents the total value of assets currently locked within the protocol, measured in USD (U.S. Dollars).

  • Number of Pairs: Indicates the total number of trading pairs available on the dydx protocol, which could refer to different asset pairs available for trading.

Note: The sample request below retrieves list of derivatives analytics data for dydx protocol. Currently gmx, dydx and synthetix are supported pairs.

curl https://api.alterscope.org/data/derivatives/dydx -H "Authorization: Bearer <your_access_token>"

The sample response below will display weekly derivatives analytics data for the specified protocol.

{
   "status":true,
   "data":[
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":422632942.2165953,
         "trades_24h":142476,
         "volume_24h_usd":596161374.5109003,
         "number_pairs":37,
         "timestamp":1710432074
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":407346774.57021254,
         "trades_24h":168458,
         "volume_24h_usd":900202780.6724001,
         "number_pairs":37,
         "timestamp":1710345605
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":403972462.8581539,
         "trades_24h":152968,
         "volume_24h_usd":621634349.257,
         "number_pairs":37,
         "timestamp":1710259217
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":396598485.6485556,
         "trades_24h":177065,
         "volume_24h_usd":897846135.6352998,
         "number_pairs":37,
         "timestamp":1710172803
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":386121203.857258,
         "trades_24h":99177,
         "volume_24h_usd":323728462.08250004,
         "number_pairs":37,
         "timestamp":1710086403
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":382289765.48667747,
         "trades_24h":129834,
         "volume_24h_usd":447900468.8081,
         "number_pairs":37,
         "timestamp":1710000004
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "tvl_usd":379047295.4087512,
         "trades_24h":154109,
         "volume_24h_usd":641638004.7407001,
         "number_pairs":37,
         "timestamp":1709913604
      }
   ]
}
  1. Protocol: This indicates the name or identifier of the decentralized finance protocol under consideration, which is "synthetix" or "dydx" in this case.

  2. Chain: Specifies the blockchain on which the protocol operates, and in this case, it is Optimism.

  3. Version: Denotes the version of the protocol being referred to, with "V3" pointing to the third version.

  4. Pairs: Represents list of available pairs for that protocol. These pairs can be used for querying /data/derivatives/{protocol}/{pair} endpoint.

Below is a sample request with ETH-USD pair and dydx protocol. Currently gmx, dydx and synthetix are supported derivative protocols.

curl https://api.alterscope.org/data/derivatives/dydx/ETH-USD -H "Authorization: Bearer <your_access_token>"

Note: The sample response below is shortened for formatting purposes. The actual response should list pair-id's data associated with the protocol for a whole week.

{
   "status":true,
   "data":[
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2234.882,
         "oracle_price":2236.2304,
         "open_interest":48175.308,
         "trades_24h":15941,
         "price_change_24h":-14.816,
         "volume_usd":121787776.3951,
         "timestamp":1702833002
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2215.55,
         "oracle_price":2215.93,
         "open_interest":48548.735,
         "trades_24h":15024,
         "price_change_24h":-37.17,
         "volume_usd":114819501.2201,
         "timestamp":1702829402
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2213.33,
         "oracle_price":2211.5292,
         "open_interest":49048.062,
         "trades_24h":14611,
         "price_change_24h":-37.0107,
         "volume_usd":110961696.8228,
         "timestamp":1702825801
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2215.053,
         "oracle_price":2212.6601,
         "open_interest":49199.343,
         "trades_24h":13889,
         "price_change_24h":-29.2761,
         "volume_usd":105052950.0819,
         "timestamp":1702822201
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2211.785,
         "oracle_price":2212.1663,
         "open_interest":49422.535,
         "trades_24h":13688,
         "price_change_24h":-45.7541,
         "volume_usd":105454483.9497,
         "timestamp":1702818602
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2215.8,
         "oracle_price":2215.75,
         "open_interest":49782.309,
         "trades_24h":13333,
         "price_change_24h":-35.079,
         "volume_usd":101318523.8172,
         "timestamp":1702815001
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2209.081,
         "oracle_price":2209.384,
         "open_interest":49952.078,
         "trades_24h":13205,
         "price_change_24h":-37.53,
         "volume_usd":100467424.982,
         "timestamp":1702811402
      },
      {
         "protocol":"dydx",
         "chain":"ethereum",
         "version":"V3",
         "pair_id":"ETH-USD",
         "index_price":2216.04,
         "oracle_price":2217.66,
         "open_interest":50055.614,
         "trades_24h":12910,
         "price_change_24h":-27.4032,
         "volume_usd":98729519.8034,
         "timestamp":1702807801
      }
  1. Protocol: "dydx" refers to the decentralized finance (DeFi) protocol or platform being discussed.

  2. Chain: "Ethereum" indicates the blockchain network on which the dydx protocol operates.

  3. Version: "V3" denotes the version of the protocol being used.

  4. Pair_ID: "ETH-USD" represents a trading pair involving Ethereum and US Dollars.

  5. Index_Price: This is a reference price calculated from multiple sources and used as a benchmark for pricing within the dydx protocol.

  6. Oracle_Price: The oracle price represents the latest price information fetched from an oracle by Derivatives Platform. Oracles provide external data to smart contracts, and in this case, it could be used to determine the real-time price of the trading pair.

  7. Open_Interest: This is a measure of the total value of outstanding derivative contracts in the market.

  8. Trades_24h: The number of trades executed in the last 24 hours.

  9. Price_Change_24h: This indicates the percentage change in the price of the trading pair (ETH-USD) over the specified time period.

  10. Volume_USD: The trading volume in US Dollars over the last 24 hours.

  11. Timestamp: The timestamp represents the specific point in time when this data snapshot was taken.

To get a list of pairs for a particular protocol please using the API endpoint .

retrieve list of available pairs for that protocol

Retrieves the list of available pairs for that protocol

get

This endpoint returns available pairs for that protocol

Authorizations
Path parameters
protocolstringRequired

Name of the Derivatives protocol, e.g. "synthetix" or "gmx"

Responses
200
OK
application/json
404
There is no data for the provided `protocol`
505
Internal Server Error
get
GET /data/derivatives/{protocol}/pairs HTTP/1.1
Host: api.alterscope.org
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "protocol": "text",
  "chain": "text",
  "version": "text",
  "pair_ids": [
    "text"
  ]
}

Retrieves the weekly derivatives analytics data for the specified protocol

get

This endpoint returns daily derivatives analytics data of the specified protocol from the last 7 days in descending order

Authorizations
Path parameters
protocolstringRequired

Name of the Derivatives protocol, e.g. "synthetix" or "dydx"

Responses
200
OK
application/json
404
There is no data for the provided `protocol`
505
Internal Server Error
get
GET /data/derivatives/{protocol} HTTP/1.1
Host: api.alterscope.org
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "protocol": "text",
  "chain": "text",
  "version": "text",
  "tvl_usd": 1,
  "trades_24h": 1,
  "volume_24h_usd": 1,
  "number_pairs": 1
}

Retrieves the weekly derivatives analytics data for the specified trading pair listed in specified protocol

get

This endpoint returns daily derivatives pair analytics data of the specified protocol from the last 7 days in descending order

Authorizations
Path parameters
protocolstringRequired

Name of the Derivatives protocol,"synthetix" or "gmx"

pairstringRequired

Name of the Trading pair. Trading pair names can be retrieved from /pairs endpoint for that protocol

Responses
200
OK
application/json
404
There is no data for the provided `protocol` or `pair`
505
Internal Server Error
get
GET /data/derivatives/{protocol}/{pair} HTTP/1.1
Host: api.alterscope.org
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "protocol": "text",
  "chain": "text",
  "version": "text",
  "pair_id": "text",
  "index_price": 1,
  "oracle_price": 1,
  "open_interest": 1,
  "trades_24h": 1,
  "price_change_24h": 1,
  "volume_usd": 1
}
  • GETRetrieves the list of available pairs for that protocol
  • GETRetrieves the weekly derivatives analytics data for the specified protocol
  • GETRetrieves the weekly derivatives analytics data for the specified trading pair listed in specified protocol