Send message to AI assistant
Send a message to the AI trading assistant and receive a streaming response via Server-Sent Events (SSE).
Authentication: Requires a JWT from /v1/auth/verify as a Bearer token.
Rate limiting: 20 requests per minute per wallet (configurable via AI_RATE_LIMIT_RPM).
Response format: The response is an SSE stream (text/event-stream).
Each event has an event type and JSON data field. The stream ends with
a done event containing the conversation ID and token usage.
Conversation continuity: Omit conversation_id to start a new conversation.
Include it to continue an existing conversation with message history.
SSE event types:
text— AI-generated text chunk (streamed incrementally)tool_start— Tool execution started (for UX loading indicators)tool_result— Tool execution completed with summarystrategy— Trade recommendation card for user confirmationtable— Tabular data displayoptions_chain— Options chain dataprice_quote— Single instrument price quoteaccount_summary— Account balance overvieworder_status— Order placement/cancellation resulterror— Error during processing (non-fatal, stream may continue)done— Stream complete with conversation ID and usage stats
Data conventions in SSE events: Unlike the main REST API which uses internal units (micros, millicontracts), AI Chat SSE events use human-readable units:
- Prices in USD (e.g.,
1.50not1500000) - Sizes in contracts (e.g.,
2.0not2000) - Balances in USD (e.g.,
10000.0not10000000000)
Documentation Index
Fetch the complete documentation index at: https://docs.joyride.exchange/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
JWT obtained from POST /v1/auth/verify after SIWS authentication.
Include as: Authorization: Bearer <jwt>
Body
Response
SSE stream of AI response events
Server-Sent Events stream. Each event has format:
event: <type>
data: <json>