Provides access to Bitcoin/USDT perpetual futures market data on AsterDex, including order books, price klines, funding rates, and real-time trading statistics.
Provides access to Dogecoin/USDT perpetual futures market data on AsterDex, including order books, price klines, funding rates, and real-time trading statistics.
Provides access to Ethereum/USDT perpetual futures market data on AsterDex, including order books, price klines, funding rates, and real-time trading statistics.
Provides access to Solana/USDT perpetual futures market data on AsterDex, including order books, price klines, funding rates, and real-time trading statistics.
AsterDex MCP Server
MCP (Model Context Protocol) server for AsterDex perpetual futures market data. Provides real-time and historical market data tools for Claude Code.
Features
9 Market Data Tools:
get_orderbook - Order book depth with bids and asks
get_klines - OHLCV candlestick data for technical analysis
get_funding_rate_history - Historical funding rate data
get_ticker_24h - 24-hour price statistics
get_mark_price - Mark price and funding rate info
get_ticker_price - Latest price lookup
get_book_ticker - Best bid/ask prices
get_index_price_klines - Index price history
get_mark_price_klines - Mark price history
Installation
Prerequisites
Python 3.10 or higher
Claude Code CLI
Install the MCP Server
Configure Claude Code
Add the server to your Claude Code MCP settings:
Or manually add to your MCP configuration file (~/.claude/mcp.json):
Usage
Once installed, you can use the tools directly in Claude Code conversations:
Example Queries
Get BTC/USDT order book:
Get ETH price data:
Analyze funding rates:
Check current prices:
Compare index vs mark price:
Available Tools
get_orderbook
Get order book depth for a trading pair.
Parameters:
symbol(required): Trading pair (e.g., "BTCUSDT")limit(optional): Depth limit - 5, 10, 20, 50, 100, 500, or 1000. Default: 100
Example:
get_klines
Get OHLCV candlestick data.
Parameters:
symbol(required): Trading pair (e.g., "ETHUSDT")interval(required): Time interval - "1m", "5m", "15m", "30m", "1h", "4h", "1d", etc.start_time(optional): Start time in millisecondsend_time(optional): End time in millisecondslimit(optional): Number of candles (max 1500). Default: 500
Example:
get_funding_rate_history
Get historical funding rate data.
Parameters:
symbol(optional): Trading pair (returns all if not provided)start_time(optional): Start time in millisecondsend_time(optional): End time in millisecondslimit(optional): Number of records (max 1000). Default: 100
Example:
get_ticker_24h
Get 24-hour price change statistics.
Parameters:
symbol(optional): Trading pair (returns all if not provided)
Example:
get_mark_price
Get mark price and funding rate information.
Parameters:
symbol(optional): Trading pair (returns all if not provided)
Example:
get_ticker_price
Get latest price.
Parameters:
symbol(optional): Trading pair (returns all if not provided)
Example:
get_book_ticker
Get best bid/ask from order book.
Parameters:
symbol(optional): Trading pair (returns all if not provided)
Example:
get_index_price_klines
Get index price candlestick history.
Parameters:
pair(required): Trading pair (e.g., "BTCUSDT")interval(required): Time intervalstart_time(optional): Start time in millisecondsend_time(optional): End time in millisecondslimit(optional): Number of candles (max 1500). Default: 500
Example:
get_mark_price_klines
Get mark price candlestick history.
Parameters:
symbol(required): Trading pair (e.g., "BTCUSDT")interval(required): Time intervalstart_time(optional): Start time in millisecondsend_time(optional): End time in millisecondslimit(optional): Number of candles (max 1500). Default: 500
Example:
Configuration
Environment Variables
ASTERDEX_BASE_URL: Override the API base URL (default:https://fapi.asterdex.com)
Example:
Time Format
All timestamps are in milliseconds since Unix epoch.
Convert from seconds:
Common time calculations:
Interval Options
Valid kline intervals:
Minutes:
1m,3m,5m,15m,30mHours:
1h,2h,4h,6h,8h,12hDays/Weeks/Months:
1d,3d,1w,1M
Common Trading Pairs
BTCUSDT- Bitcoin/USDTETHUSDT- Ethereum/USDTSOLUSDT- Solana/USDTBNBUSDT- BNB/USDTDOGEUSDT- Dogecoin/USDT
Use the get_ticker_price tool without a symbol to see all available trading pairs.
Troubleshooting
Server not connecting
Check that the MCP server is properly installed:
You should see asterdex in the list.
Import errors
Make sure dependencies are installed:
API errors
The AsterDex API may have rate limits. If you encounter errors, wait a moment and try again.
Development
Project Structure
Testing
Run the server directly:
API Documentation
For detailed API documentation, see:
License
MIT
Support
For issues or questions:
GitHub: asterdex/api-docs
AsterDex Docs: docs.asterdex.com