LogoLogo
Website
  • πŸ‘‹Welcome to Velar
  • Overview
    • πŸ’‘Introduction
    • πŸ›£οΈRoadmap
    • ✨Architecture
  • Getting Started
    • πŸ’»How to Use Velar Products
    • 🌊Providing Liquidity
    • 🚜Yield Farming
    • πŸ”Staking $VELAR Tokens
    • 🧩Building Integrations
    • 🀹Giving Feedback
    • πŸ‘‹Joining Community Channels
  • Velar PerpDex
    • πŸŽ›οΈCore Concepts
    • 🟧Stacks
    • πŸŸ₯Mezo (Coming Soon)
  • Velar Versions
    • ☸️Velar Dharma
      • Automated Market Maker (AMM)
      • Liquidity Pools & Yield Farming
      • IDO Launchpad
      • Bridge
      • MemeStacker
    • πŸ’‘Velar Artha
      • πŸ“ŠPerpetual Swaps
      • 🚿Concentrated Liquidity
      • πŸŒ‰Cross-Chain Bridge
    • πŸ›£οΈVelar Kama
    • ✨Velar Moksha
  • Audits
    • πŸ’‘Introduction
    • πŸ›£οΈAMM Audit on Clarity
    • 🚊PerpDex Audit on Clarity
    • πŸš‰PerpDex Audit on EVM
  • Token
    • πŸ’‘Introduction
    • πŸŽ›οΈTokenomics
    • πŸ“’Vesting Contracts
    • πŸͺœEmission
  • Developers
    • πŸ”¨Contract Addresses
    • πŸ”©Velar SDK
      • Velar SDK 0.7.0-beta [Latest]
      • Velar SDK 0.6.9
    • πŸ”¬Velar API
    • πŸ”₯Velar Verified Burner Contract
    • Velar Assets
  • Velar Executive Leadership
    • ♣️CEO - Mithil Thakore
    • ♠️CMO - Peter Watson
Powered by GitBook
On this page
  • Base URL
  • Available Endpoints
  • Integration Example
  • Building with Velar

Was this helpful?

  1. Developers

Velar API

Velar provides public APIs for developers to access various data points across the protocol. These endpoints enable seamless integration of Velar data into third-party applications, providing real-time and historical information on tokens, prices, pools, and supply metrics.

Base URL

https://api.velar.co

Available Endpoints

Get All Tokens Data

Retrieve details of all available tokens on the DEX.

GET /tickers

Get Token Details

Retrieve details for a specific token or all tokens on the DEX.

GET /tokens
GET /tokens?symbol={symbol}

Parameters:

  • symbol (optional): Token symbol (e.g., WELSH, ROO, VELAR). Use 'all' to get all tokens.

Get Circulating Supply

Retrieve circulating supply information for VELAR token.

GET /circulating-supply

Get Current Prices

Retrieve current price data for tokens.

GET /prices

Get Price by Contract Address

Retrieve price information for a specific token contract.

GET /prices/:contractAddress

Parameters:

  • contractAddress: The contract address of the token

Get Historical Price Data

Retrieve historical price data for a specific token with customizable time intervals.

GET /prices/historical/:contractAddress?interval={interval}

Parameters:

  • contractAddress: The contract address of the token

  • interval: Time interval for the historical data. Available options:

    • hour: Hourly data points

    • week: Weekly data points

    • month: Monthly data points

    • year: Yearly data points

Get Pool Data

Retrieve information about liquidity pools on Velar.

GET /pools

Get Pool Data by LP Token Address

Retrieve specific pool information using LP token contract address.

GET /pools/:lpTokenContractAddress

Parameters:

  • lpTokenContractAddress: The contract address of the LP token

Get Pool Data by Token Pair

Retrieve pool information using the addresses of tokens in the pair.

GET /pools/:poolToken0ContractAddress/:poolToken1ContractAddress
GET /pools/:poolToken1ContractAddress/:poolToken0ContractAddress

Parameters:

  • poolToken0ContractAddress: The contract address of the first token in the pair

  • poolToken1ContractAddress: The contract address of the second token in the pair

Integration Example

// Example: Fetching historical price data for a token
const contractAddress = "0x...";
const response = await fetch(`https://api.velar.co/prices/historical/${contractAddress}?interval=week`);
const data = await response.json();

// Example: Fetching sBTC pool data
const sbtcPoolResponse = await fetch(`https://api.velar.co/pools/SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token/SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.wstx`);
const sbtcPoolData = await sbtcPoolResponse.json();

Building with Velar

By leveraging these developer resources, you can build powerful applications and integrations on top of the Velar protocol, enhancing the overall ecosystem and user experience. The API provides comprehensive data access for:

  • Token information and metrics

  • Real-time price feeds

  • Historical price analysis

  • Supply statistics

  • Market data integration

  • Pool and liquidity data

For support or questions about the API, please reach out to our developer community or consult our additional documentation resources.

PreviousVelar SDK 0.6.9NextVelar Verified Burner Contract

Last updated 3 months ago

Was this helpful?

πŸ”¬