openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: Exness AI Trading Assistant API servers: - url: /api description: Base API path tags: - name: health - name: auth - name: signals - name: journal - name: calculator - name: market paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /auth/register: post: operationId: register tags: [auth] summary: Register a new user requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserRegisterInput" responses: "200": description: Registration successful content: application/json: schema: $ref: "#/components/schemas/AuthToken" /auth/login: post: operationId: login tags: [auth] summary: Login with email and password requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserLoginInput" responses: "200": description: Login successful content: application/json: schema: $ref: "#/components/schemas/AuthToken" /auth/me: get: operationId: getCurrentUser tags: [auth] summary: Get current authenticated user security: - bearerAuth: [] responses: "200": description: Current user content: application/json: schema: $ref: "#/components/schemas/User" /signals: get: operationId: getAllSignals tags: [signals] summary: Get AI signals for all supported symbols responses: "200": description: All signals content: application/json: schema: type: array items: $ref: "#/components/schemas/Signal" /signals/symbols/list: get: operationId: listSignalSymbols tags: [signals] summary: List all supported symbols responses: "200": description: Symbol list content: application/json: schema: $ref: "#/components/schemas/SymbolList" /signals/{symbol}: get: operationId: getSignal tags: [signals] summary: Get AI signal for a specific symbol parameters: - name: symbol in: path required: true schema: type: string responses: "200": description: Signal for the given symbol content: application/json: schema: $ref: "#/components/schemas/Signal" /journal: get: operationId: getJournalEntries tags: [journal] summary: List all journal entries for current user security: - bearerAuth: [] responses: "200": description: Journal entries content: application/json: schema: type: array items: $ref: "#/components/schemas/JournalEntry" post: operationId: createJournalEntry tags: [journal] summary: Create a new journal entry security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/JournalEntryInput" responses: "200": description: Created journal entry content: application/json: schema: $ref: "#/components/schemas/JournalEntry" /journal/{id}: put: operationId: updateJournalEntry tags: [journal] summary: Update an existing journal entry security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/JournalEntryUpdate" responses: "200": description: Updated journal entry content: application/json: schema: $ref: "#/components/schemas/JournalEntry" delete: operationId: deleteJournalEntry tags: [journal] summary: Delete a journal entry security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted successfully content: application/json: schema: $ref: "#/components/schemas/DeleteResult" /calculator/position-size: post: operationId: calculatePositionSize tags: [calculator] summary: Calculate optimal position size based on risk parameters requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CalculatorInput" responses: "200": description: Calculated position size content: application/json: schema: $ref: "#/components/schemas/CalculatorResult" /market/prices: get: operationId: getMarketPrices tags: [market] summary: Get current live market prices responses: "200": description: Live market prices content: application/json: schema: $ref: "#/components/schemas/MarketPrices" /market/symbols: get: operationId: getMarketSymbols tags: [market] summary: Get all available market symbols responses: "200": description: Available symbols content: application/json: schema: $ref: "#/components/schemas/MarketSymbols" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: HealthStatus: type: object properties: status: type: string required: [status] User: type: object properties: id: type: integer email: type: string username: type: string created_at: type: string required: [id, email, username, created_at] AuthToken: type: object properties: access_token: type: string token_type: type: string user: $ref: "#/components/schemas/User" required: [access_token, token_type, user] UserRegisterInput: type: object properties: email: type: string username: type: string password: type: string required: [email, username, password] UserLoginInput: type: object properties: email: type: string password: type: string required: [email, password] NewsItem: type: object properties: title: type: string summary: type: string source: type: string published: type: string url: type: string required: [title, source, published] Signal: type: object properties: # Core symbol: type: string action: type: string confidence: type: number entry: type: number stop_loss: type: ["number", "null"] take_profit: type: ["number", "null"] risk_reward: type: ["number", "null"] trade_duration: type: ["string", "null"] # Technical indicators rsi: type: number ma_trend: type: string ema20: type: number ema50: type: number ema200: type: number macd_trend: type: string bb_position: type: string adx: type: number adx_strength: type: string atr: type: number market_structure: type: string support: type: ["number", "null"] resistance: type: ["number", "null"] momentum: type: string fibonacci: type: object additionalProperties: type: number bull_score: type: integer bear_score: type: integer # Fundamental news_available: type: boolean news_sentiment: type: string news_impact: type: string news_items: type: array items: $ref: "#/components/schemas/NewsItem" # Rich analysis text technical_summary: type: string fundamental_summary: type: string market_sentiment: type: string risk_assessment: type: string reasoning: type: string # Metadata generated_at: type: string last_news_check: type: string data_points: type: integer required: - symbol - action - confidence - entry - rsi - ma_trend - reasoning - generated_at SymbolList: type: object properties: symbols: type: array items: type: string required: [symbols] JournalEntry: type: object properties: id: type: integer symbol: type: string action: type: string entry_price: type: number exit_price: type: ["number", "null"] stop_loss: type: ["number", "null"] take_profit: type: ["number", "null"] lot_size: type: number pnl: type: ["number", "null"] status: type: string notes: type: ["string", "null"] opened_at: type: string closed_at: type: ["string", "null"] required: [id, symbol, action, entry_price, lot_size, status, opened_at] JournalEntryInput: type: object properties: symbol: type: string action: type: string entry_price: type: number stop_loss: type: ["number", "null"] take_profit: type: ["number", "null"] lot_size: type: number notes: type: ["string", "null"] required: [symbol, action, entry_price] JournalEntryUpdate: type: object properties: exit_price: type: ["number", "null"] stop_loss: type: ["number", "null"] take_profit: type: ["number", "null"] status: type: ["string", "null"] notes: type: ["string", "null"] pnl: type: ["number", "null"] DeleteResult: type: object properties: ok: type: boolean required: [ok] CalculatorInput: type: object properties: symbol: type: string account_balance: type: number risk_percent: type: number entry_price: type: number stop_loss: type: number account_currency: type: string required: [symbol, account_balance, risk_percent, entry_price, stop_loss] CalculatorResult: type: object properties: symbol: type: string lot_size: type: number risk_amount: type: number pip_value: type: number pips_at_risk: type: number margin_required: type: number required: [symbol, lot_size, risk_amount, pip_value, pips_at_risk, margin_required] PriceItem: type: object properties: symbol: type: string price: type: number category: type: string change_pct: type: number required: [symbol, price, category, change_pct] MarketPrices: type: object properties: prices: type: array items: $ref: "#/components/schemas/PriceItem" mode: type: string required: [prices, mode] MarketSymbolItem: type: object properties: symbol: type: string category: type: string required: [symbol, category] MarketSymbols: type: object properties: symbols: type: array items: $ref: "#/components/schemas/MarketSymbolItem" required: [symbols]