Skip to main content
Glama
armorwallet
by armorwallet

get_token_candle_data

Retrieve token candle data for analysis by specifying token address, time interval, and range. Supports market cap or price data in predefined time frames for informed crypto decision-making.

Instructions

Get candle data about any token for analysis.

Expects a CandleStickRequest, returns a list of candle sticks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
candle_stick_requestsYes

Implementation Reference

  • MCP tool handler and registration for 'get_token_candle_data'. Wraps the Armor client call to fetch candle data for a token.
    @mcp.tool()
    async def get_token_candle_data(candle_stick_requests: CandleStickRequest) -> List:
        """
        Get candle data about any token for analysis.
    
        Expects a CandleStickRequest, returns a list of candle sticks.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List = await armor_client.get_market_candle_data(candle_stick_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Input schema (Pydantic model) for the get_token_candle_data tool: CandleStickRequest defining token address, time interval, time range, and market cap option.
    class CandleStickRequest(BaseModel):
        token_address: str = Field(description="Public mint address of the token. To get the address from a token symbol use `get_token_details`")
        time_interval: Literal["1s", "5s", "15s", "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1mn"] = Field(default="1h", description="Time frame to get the candle sticks. Use larger candle time frames over larger time windows to keep returned candles minimal")
        time_from: str = Field(description="The time from which to start the candle data in ISO 8601 format. Attempt to change this to keep number of candles returned under 64.")
        time_to: Optional[str] = Field(default=None, description="The time to end the candle data in ISO 8601 format. Use only for historic analysis.")
        market_cap: Optional[bool] = Field(default=False, description="Whether to return the marketcap of the token instead of the price")
  • Helper method in ArmorWalletAPIClient that performs the actual API call to retrieve token candle data, invoked by the tool handler.
    async def get_market_candle_data(self, data: CandleStickRequest) -> Dict:
        """Get the candle sticks."""
        payload = data.model_dump(exclude_none=True)
        return await self._api_call("POST", f"tokens/candles/", payload)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/armorwallet/armor-crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server