Skip to main content
Glama

cancel_dca_order

Cancel existing Dollar-Cost Averaging (DCA) orders to stop automated cryptocurrency purchases at scheduled intervals.

Instructions

Create a DCA order.

Note: Make a single or multiple dca_order_requests 

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cancel_dca_order_requestsYes

Implementation Reference

  • MCP tool handler for canceling DCA orders. Registers the tool and delegates to ArmorWalletAPIClient.cancel_dca_order, handling errors and authentication.
    @mcp.tool()
    async def cancel_dca_order(cancel_dca_order_requests: CancelDCAOrderRequestContainer) -> List[CancelDCAOrderResponse]:
        """
        Create a DCA order.
    
        Note: Make a single or multiple dca_order_requests 
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List[CancelDCAOrderResponse] = await armor_client.cancel_dca_order(cancel_dca_order_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Pydantic schemas for CancelDCAOrderRequest (input model with dca_order_id) and CancelDCAOrderResponse (output model with dca_order_id and status).
    class CancelDCAOrderRequest(BaseModel):
        dca_order_id: str = Field(description="id of the DCA order")
    
    
    class CancelDCAOrderResponse(BaseModel):
        dca_order_id: str = Field(description="id of the DCA order")
        status: str = Field(description="status of the DCA order")
  • Container schema for batch input: list of CancelDCAOrderRequest objects.
    class CancelDCAOrderRequestContainer(BaseModel):
        cancel_dca_order_requests: List[CancelDCAOrderRequest]
  • ArmorWalletAPIClient method that performs the HTTP POST to the /transactions/dca-order/cancel/ API endpoint with the list of DCA order IDs.
    async def cancel_dca_order(self, data: CancelDCAOrderRequestContainer) -> List[CancelDCAOrderResponse]:
        """Cancel a DCA order."""
        # payload = [v.model_dump() for v in data.cancel_dca_order_requests]
        payload = data.model_dump(exclude_none=True)['cancel_dca_order_requests']
        return await self._api_call("POST", "transactions/dca-order/cancel/", payload)
  • FastMCP @mcp.tool() decorator registers the cancel_dca_order function as an MCP tool.
    @mcp.tool()

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/emmaThompson07/armor-crypto-mcp'

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