Lighter Trading Tool
AI-generatedSummary
Execute a Lighter DEX trading action and return the result via an AI tool.
Inputs
- notice — Display notice (display-only, no runtime effect).
Output shape
ai_tool
Returns a LangChain DynamicStructuredTool instance for Lighter DEX trading. The tool's parameters define the action and market details; execution sends a POST to the configured trading backend and returns a JSON string with status, action, and relevant data (order ID, side, size, price, transaction hash, or error).
Examples
Example 1: Create a limit order for ETH-PERP long position
Set action to 'createLimitOrder', marketIndex to 1, side to 'long', size to 2, price to 1800, then run the node. The tool outputs a success response with orderId, side, size, and price if the backend confirms.