πŸ” Verus Ticker API

Version: 2.0 | Status: βœ… Active | Base URL: https://tickerapi.verus.services

API Endpoints

πŸ₯ Health & Status

⚑ Cached Endpoints (60s TTL)

πŸ“Š Only for debug (.env file) - Live Endpoints (disabled by default)

πŸ” Example Pair Trace Process Documentation

This explains how we trace and calculate the VRSC/vETH trading pair in the NATIπŸ¦‰ converter using CLI commands.

Step 1: Get Current Block Height

Establish the time range for data collection:

./verus getinfo
{ "height": 3673862, "blocks": 3673862 }

Block Range Calculation:

Start Block = 3673862 - 1440 = 3672422
End Block = 3673862 (current)
Interval = 1440 blocks (β‰ˆ 24 hours)

Step 2: Find the NATIπŸ¦‰ Converter

./verus getcurrencyconverters VRSC
[ { "currencyid": "iH37kRsdfoHtHK5TottP1Yfq8hBSHz9btw", "name": "NATIπŸ¦‰", "options": 41 } ]

Result: Found NATIπŸ¦‰ converter with ID iH37kRsdfoHtHK5TottP1Yfq8hBSHz9btw

Step 3: Get Converter-to-VRSC Rate

Calculate how much VRSC you get for 1 NATIπŸ¦‰ (for liquidity calculation):

./verus estimateconversion '[{"currency":"NATIπŸ¦‰", "convertto":"VRSC", "amount": 1}]'
{ "estimatedcurrencyout": 156.72258332 }
1 NATIπŸ¦‰ = 156.72258332 VRSC

Step 4: Get VRSC-to-DAI Rate

Get USD valuation by converting VRSC to DAI:

./verus estimateconversion '[{"currency":"VRSC", "convertto":"DAI.vETH", "amount": 1, "via": "Bridge.vETH"}]'
{ "estimatedcurrencyout": 2.15310337 }
1 VRSC = 2.15310337 DAI β‰ˆ $2.15

Step 5: Get Converter Details

./verus getcurrency iH37kRsdfoHtHK5TottP1Yfq8hBSHz9btw
{ "name": "NATIπŸ¦‰", "supply": 69665.89779233, "currencies": [ "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", // VRSC "iS8TfRPfVpKo5FVfSUzfHBQxo9KuzpnqLU", // tBTC.vETH "i9nwxtKuVYX4MSbeULLiK2ttVi6rUEhh4X", // vETH "iL62spNN42Vqdxh8H5nrfNe8d6Amsnfkdx" // NATI.vETH ], "weights": [0.25, 0.25, 0.25, 0.25] }

Key Details:

Step 6: Extract Volume Data for VRSC/vETH Pair

Get trading volume and OHLC data for both directions:

VRSC Base Volume:

./verus getcurrencystate iH37kRsdfoHtHK5TottP1Yfq8hBSHz9btw 3672422,3673862,1440 VRSC
{ "conversiondata": { "volumecurrency": "VRSC", "volumethisinterval": 161317.61984463, "volumepairs": [{ "currency": "VRSC", "convertto": "vETH", "volume": 25035.42967509, "open": 1661.91855093, "high": 1669.09163912, "low": 1645.79514717, "close": 1669.09163912 }] } }

vETH Base Volume:

./verus getcurrencystate iH37kRsdfoHtHK5TottP1Yfq8hBSHz9btw 3672422,3673862,1440 vETH
{ "conversiondata": { "volumecurrency": "vETH", "volumethisinterval": 97.43627670, "volumepairs": [{ "currency": "VRSC", "convertto": "vETH", "volume": 15.12028821, "open": 1661.91855093, "high": 1669.09163912, "low": 1645.79514717, "close": 1669.09163912 }] } }

Step 7: Calculate Liquidity

Total Converter Liquidity in USD:

Total = Supply Γ— NATIπŸ¦‰:VRSC Γ— VRSC:DAI
Total = 69,665.90 Γ— 156.72 Γ— 2.15 = $23,508,055

Pair Liquidity (50% allocation):

Pair = $23,508,055 Γ— 0.5 = $11,754,027

Symbol Mapping:

vETH β†’ WETH (Wrapped Ether)
Contract: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Composite Key:

0xBc2738BA63882891094C99E59a02141Ca1A1C36a_0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

🦎 CoinGecko Format (Individual Pool Entries)

Data Structure: Array format with individual pool entries for each converter

Pool Separation: Each converter creates separate pool entries (no aggregation)

Pool ID Format: Uses converter names as unique pool identifiers

Liquidity Calculation: Pool liquidity Γ— currency weight (typically 25% for 4-currency pools)

Symbol Source: Uses Ethereum-standardized symbols from currency_contract_mapping.eth_symbol

Price Source: Direct from converter state data with volume-weighted calculations

curl https://tickerapi.verus.services/coingecko/tickers

πŸ’Ή CoinMarketCap Format (Aggregated Pairs)

Data Structure: Object with sequential numeric keys ("0", "1", "2", etc.) for CMC DEX API compliance

Pair Aggregation: Same trading pairs from multiple converters are combined into single entries

Volume Aggregation: Sums volumes from all converters for the same currency pair

Price Aggregation: Volume-weighted average pricing across all instances

Symbol Source: Uses Ethereum-standardized symbols from currency_contract_mapping.eth_symbol

Contract Integration: Uses ERC20 contract addresses for base_id/quote_id fields

curl https://tickerapi.verus.services/coinmarketcap

🌐 Coinpaprika Format (Aggregated Pairs)

Format Compatibility: VerusStatisticsAPI wrapper structure with {"code":"200000","data":{"time":timestamp,"ticker":[...]}}

Pair Aggregation: Same as CoinMarketCap - combines same trading pairs from multiple converters

Symbol Standard: Uses Ethereum-standardized symbols from currency_contract_mapping.eth_symbol

Data Structure: Array of ticker objects with symbol, volume, last, high, low, open fields

Exclusion Logic: Filters converter currencies and excluded chains

Price Fallback: When last_price = 0, uses (high + low) / 2 calculation

curl https://tickerapi.verus.services/coinpaprika

πŸ§ͺ CMC I-Address Format (Aggregated Pairs - Testing)

Purpose: Testing endpoint using Verus i-addresses instead of ERC20 contract addresses

Pair Aggregation: Same aggregation logic as CoinMarketCap with unique pairs

Key Differences: Uses currency IDs (i-addresses) as base_id/quote_id instead of contract addresses

Data Structure: Identical to CoinMarketCap format but with i-address identifiers

Symbol Source: Uses Verus native currency names from currency_contract_mapping.vrsc_symbol

Format Structure: CoinMarketCap DEX API compatible with sequential keys ("0", "1", "2", etc.)

Use Case: Testing and validation of Verus native identifier integrations

curl https://tickerapi.verus.services/coinmarketcap_iaddress

βš™οΈ Detailed Data Collection and Calculation Process

Step 1: Converter Discovery and Filtering

Method: Call getcurrencyconverters("VRSC") RPC method to get all converters in the VRSC system

Filtering: Exclude converters listed in excluded_chains array: ["Bridge.CHIPS", "Bridge.vDEX", "Bridge.vARRR", "whales"]

Validation: Check each converter has fullyqualifiedname field and is not in exclusion list

Result: List of active converters that contain VRSC as a reserve currency

Current Count: 9 active converters (Bridge.vETH, Switch, Kaiju, vYIELD, SUPERπŸ›’, NATIπŸ¦‰, Pure, SUPERVRSC, NATI)

Step 2: Currency Weight Extraction

Method: For each converter, extract currencies array from converter discovery data

Weight Calculation: Each currency has a weight field (e.g., 25000000 = 0.25 or 25%)

Total Weight: Sum all currency weights in the converter (typically = 100000000 = 1.0 or 100%)

Currency Info: Extract currencyid, weight, and symbol for each currency in the converter

Validation: Ensure all currencies have valid weights and currency IDs

Step 3: Total Converter Liquidity Calculation (USD)

Step 3a: Get converter supply from discovery data (supply field)

Step 3b: Get converter-to-VRSC ratio using estimateconversion(converter_id, "VRSC", 1)

Step 3c: Get VRSC-to-USD price using estimateconversion("VRSC", "DAI.vETH", 1, via="Bridge.vETH") (DAI β‰ˆ $1 USD)

Formula: Total Liquidity = Supply Γ— Converter_to_VRSC_ratio Γ— VRSC_USD_price

Example: Bridge.vETH supply Γ— Bridge.vETH_to_VRSC_ratio Γ— VRSC_USD_price = Total USD liquidity

Step 4: Pair Liquidity Calculation

Method: For each trading pair (base_currency, target_currency) in a converter

Weight Sum: Add the weight of base_currency + weight of target_currency

Formula: Pair Liquidity = Total_Converter_Liquidity Γ— (Weight_Base + Weight_Target) / Total_Weight

Example: If VRSC (25%) + DAI.vETH (25%) in Bridge.vETH = 50% of total converter liquidity

Result: Pair liquidity represents the portion of total converter liquidity allocated to that specific trading pair

Step 5: Real Volume Calculation Method

Method: Call getcurrencystate(converter_name, "start_block,end_block,interval", volume_currency) for each currency in the converter

Block Range: Use current_block - 1440 to current_block (24-hour period with 1440 blocks β‰ˆ 24 hours)

Multiple Calls: Make separate calls for each currency as the volume_currency parameter

Base Volume: Extract volume from getcurrencystate call using base_currency as volume_currency parameter

Target Volume: Extract volume from getcurrencystate call using target_currency as volume_currency parameter

Data Source: Real blockchain volume data from conversiondata.volumepairs in the response

Precision: All volumes returned as-is from blockchain (typically 8 decimal places)

Step 6: OHLC Price Data Extraction and Price Inversion

Method: Extract OHLC (Open, High, Low, Close) data from the same getcurrencystate calls used for volume

Source: Price data comes from conversiondata.volumepairs entries for the specific trading pair

Price Inversion: When necessary, invert prices using 1 / original_price to maintain proper base/target relationships

Direction Logic: Ensure price represents target_currency per unit of base_currency (e.g., DAI per VRSC)

Consistency: Use target_currency call data for OHLC to maintain consistency with volume methodology

Fallback: If no OHLC data available, set values to 0 or use fallback calculations

Step 7: Data Aggregation and Formatting

Pair Creation: Generate all possible trading pairs (base→target) for currencies within each converter

Volume Filtering: Only include pairs with volume > 0 (either base_volume > 0 or target_volume > 0)

Currency Mapping: Apply ERC20 symbol mapping from currency_contract_mapping for Ethereum compatibility

Exclusion: Filter out pairs involving converter currencies or currencies in excluded chains

Precision: Format all numeric values to 8 decimal places as strings to prevent scientific notation

Step 8: Endpoint-Specific Output Formatting

CoinGecko Format: Array of ticker objects with ticker_id, volumes, prices, pool_id, liquidity_in_usd

CoinMarketCap Format: Object with contract address composite keys, aggregated same-pair data

Coinpaprika Format: VerusStatisticsAPI wrapper with {"code":"200000","data":{"time":timestamp,"ticker":[...]}}

Caching: All endpoints have cached versions using 60-second TTL for performance optimization

βš™οΈ Configuration Setup

πŸ“„ Example .env Configuration File

Setup Instructions: Create a .env file in the project root with your RPC credentials

Security Note: Never commit the actual .env file with real credentials to version control

# ============================================================================= # API CONFIGURATION # ============================================================================= # Enable live endpoints (set to false for production) ENABLE_LIVE_ENDPOINTS=false # ============================================================================= # RPC CONNECTION SETTINGS # ============================================================================= # IMPORTANT: Replace these values with your actual daemon credentials # These must match the settings in your respective .conf files # VRSC (Verus) RPC Connection VERUS_RPC_HOST=127.0.0.1 VERUS_RPC_PORT=27486 VERUS_RPC_USER=your_rpc_username VERUS_RPC_PASSWORD=your_rpc_password # VARRR RPC Connection VARRR_RPC_HOST=127.0.0.1 VARRR_RPC_PORT=20778 VARRR_RPC_USER=your_rpc_username VARRR_RPC_PASSWORD=your_rpc_password # VDEX RPC Connection VDEX_RPC_HOST=127.0.0.1 VDEX_RPC_PORT=21778 VDEX_RPC_USER=your_rpc_username VDEX_RPC_PASSWORD=your_rpc_password # CHIPS RPC Connection CHIPS_RPC_HOST=127.0.0.1 CHIPS_RPC_PORT=22778 CHIPS_RPC_USER=your_rpc_username CHIPS_RPC_PASSWORD=your_rpc_password # ============================================================================= # CHAIN CONFIGURATIONS # ============================================================================= # VRSC (Verus) Chain Configuration VRSC_BLOCK_TIME_SECONDS=60 VRSC_BLOCKS_PER_DAY=1440 VRSC_NAME=Verus VRSC_MIN_NATIVE_TOKENS=1000 # VARRR Chain Configuration VARRR_BLOCK_TIME_SECONDS=60 VARRR_BLOCKS_PER_DAY=1440 VARRR_NAME=vARRR VARRR_MIN_NATIVE_TOKENS=5000 # VDEX Chain Configuration VDEX_BLOCK_TIME_SECONDS=60 VDEX_BLOCKS_PER_DAY=1440 VDEX_NAME=vDEX VDEX_MIN_NATIVE_TOKENS=2000 # CHIPS Chain Configuration CHIPS_BLOCK_TIME_SECONDS=10 CHIPS_BLOCKS_PER_DAY=8640 CHIPS_NAME=CHIPS CHIPS_MIN_NATIVE_TOKENS=20000

πŸ”— Ethereum Contract Integration

πŸ“‹ Complete Contract Address Mapping

Data Source: currency_contract_mapping contains ERC20 contract addresses for Verus currencies exported to Ethereum

Coverage: 14 currencies mapped to ERC20 contracts representing 99.8% of total trading volume

Structure: Each currency maps to {"address": "0x...", "eth_symbol": "SYMBOL", "vrsc_symbol": "VRSC_NAME"}

Complete currency_contract_mapping:

Ethereum-Exported Currencies:
β€’ DAI.vETH (iGBs4DWz...): 0x6B175474E89094C44Da98b954EedeAC495271d0F β†’ DAI
β€’ EURC.vETH (iC5TQFrF...): 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c β†’ EURC
β€’ MKR.vETH (iCkKJuJS...): 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2 β†’ MKR
β€’ NATI.vETH (iL62spNN...): 0x4f14E88B5037F0cA24348Fa707E4A7Ee5318d9d5 β†’ NATION
β€’ VRSC (i5w5MuNi...): 0xBc2738BA63882891094C99E59a02141Ca1A1C36a β†’ VRSC
β€’ scrvUSD.vETH (i9nLSK4S...): 0x0655977FEb2f289A4aB78af67BAB0d17aAb84367 β†’ CRVUSD
β€’ tBTC.vETH (iS8TfRPf...): 0x18084fbA666a33d37592fA2633fD49a74DD93a88 β†’ TBTC
β€’ vARRR (iExBJfZY...): 0x45766AE12411450e20bd1c8cca1e63DffD834e19 β†’ VARR
β€’ vUSDC.vETH (i61cV2ui...): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 β†’ USDC
β€’ vUSDT.vETH (i9oCSqKA...): 0xdAC17F958D2ee523a2206206994597C13D831ec7 β†’ USDT

Verus Native with ERC20 Contracts:
β€’ vETH (i9nwxtKu...): 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 β†’ WETH
β€’ CHIPS (iJ3WZocn...): 0x714cFa2DA83b53b8fe2c1c9F99ca723A4c61AD48 β†’ CHIPS
β€’ SUPERNET (i6SapneN...): 0x504DAa3346f4AE4E624932FD654339Ad971FB242 β†’ SUPERNET
β€’ vDEX (iHog9UCT...): 0x0609Aede2f67C136bcb0e413E298F6cA8e283c37 β†’ VDEX

🏷️ Symbol Standardization

Verus Native (CoinGecko/CoinMarketCap): Uses original Verus currency names (DAI.vETH, MKR.vETH, tBTC.vETH)

ERC20 Standard (Coinpaprika): Uses Ethereum-standardized symbols (DAI, MKR, TBTC) from eth_symbol field

Contract Keys (CoinMarketCap): Uses contract address composite keys for unique pair identification

Fallback Logic: Currencies without ERC20 mapping retain their Verus native symbols

πŸ”„ Cross-Chain Compatibility

Ethereum Integration: Contract addresses enable direct integration with Ethereum DeFi protocols

Token Names: Official Etherscan token names ("USD Coin", "Dai Stablecoin", "Wrapped Ether") for ecosystem familiarity

Address Validation: All contract addresses verified against live Ethereum blockchain data

Multi-Chain Support: Architecture supports future expansion to other blockchain networks

πŸ†š CoinMarketCap vs I-Address Endpoint Comparison

Purpose: The I-Address endpoint provides identical functionality to CoinMarketCap but uses Verus native identifiers for testing and validation

Feature Regular CoinMarketCap I-Address CoinMarketCap Status
Key Format CONTRACT_CONTRACT IADDRESS_IADDRESS βœ… Exact Same
Structure base_id, base_name, base_symbol, quote_id, quote_name, quote_symbol, etc. base_id, base_name, base_symbol, quote_id, quote_name, quote_symbol, etc. βœ… Identical
Base/Quote IDs ERC20 contract addresses Verus i-addresses βœ… As Requested
Names/Symbols ERC20 symbols (DAI, WETH) Verus native (DAI.vETH, vETH) βœ… Verus Native

Usage:

curl https://tickerapi.verus.services/coinmarketcap # ERC20 contract addresses
curl https://tickerapi.verus.services/coinmarketcap_iaddress # Verus i-addresses

πŸ“Š Aggregation Logic and Methodologies

πŸ”— Current Data Processing (All Endpoints)

Pair Generation: Each endpoint generates 57 unique trading pairs from active converters

Data Consistency: All endpoints use identical blockchain data with same block height

Volume Extraction: Direct volume data from individual converter pairs via getcurrencystate RPC calls

Price Calculation: OHLC data extracted from blockchain volume pairs

Result: 57 consistent pairs across all endpoints with different formatting and symbol standards

πŸ“ˆ Volume-Weighted Price Calculation

Methodology: Each price component weighted by its corresponding volume for accurate market representation

Formula: weighted_avg = Ξ£(price_i Γ— volume_i) / Ξ£(volume_i)

OHLC Aggregation: High = max(all_highs), Low = min(all_lows), Open/Close = volume-weighted averages

Fallback Logic: When last_price = 0, use (high + low) / 2 for price calculations

🚫 Exclusion and Filtering Logic

Converter Currency Exclusion: is_converter_currency() removes basket currencies from trading pairs

Chain Exclusion: excluded_chains filters out problematic converters (Bridge.CHIPS, Bridge.vDEX, etc.)

Volume Filtering: Only pairs with base_volume > 0 OR target_volume > 0 are included

Contract Validation: Pairs without valid contract addresses use fallback symbol mapping

βœ… Data Validation & Consistency

Pair Count Validation: All endpoints return exactly 57 trading pairs with consistent data

Cross-Endpoint Validation: All cached endpoints return identical data to their original counterparts

Block Height Consistency: All endpoints use the same blockchain block height for data consistency

πŸ”— Contract Address Integration

Data Source: currency_contract_mapping in dict.py contains authoritative ERC20 contract addresses

Coverage: 15 currencies with ERC20 contracts, 99.8% volume coverage

Key Mappings:

Fallback Logic: Currencies without contracts use Verus native symbols

🚫 Converter Currency Exclusion

Exclusion Logic: is_converter_currency(currency_id) filters out multi-currency basket pairs

Excluded Converters: Bridge.vETH, SUPERVRSC, SUPERπŸ›’, Switch, Kaiju, NATIπŸ¦‰, Pure, vYIELD, whales, NATI

Reason: Converter currencies represent baskets, not tradeable pairs

Implementation: Applied across all endpoints (CoinGecko, CoinMarketCap, Coinpaprika)

πŸ“Š Price Aggregation Method

Quote Volume Weighting: When the same trading pair exists across multiple converters, the final last_price is calculated using volume-weighted averaging with quote volume as the weight. This ensures that higher dollar-value trades have more influence on the final price.

Formula: weighted_price = (price1 Γ— quote_vol1 + price2 Γ— quote_vol2) / (quote_vol1 + quote_vol2)

Applied to: /coinmarketcap, /coinmarketcap_cache, /coinmarketcap_iaddress, /coinmarketcap_iaddress_cache, /coinpaprika, /coinpaprika_cache


Verus Ticker API - Providing real-time, validated cryptocurrency data from the Verus blockchain