{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/billing/tv-username":{"get":{"summary":"Get Tv Username","description":"The user's saved TradingView username + whether we still NEED it — i.e. they hold an indicator\nentitlement but haven't given us a username to grant it to. Drives the post-purchase prompt.","operationId":"get_tv_username_api_billing_tv_username_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Set Tv Username","operationId":"set_tv_username_api_billing_tv_username_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TvUsernameIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/tv-lookup":{"get":{"summary":"Tv Lookup","description":"Admin: look up a buyer's TradingView username (saved OR pending from the completion page),\nthe indicators they own, and each indicator's grant status — so support can grant it manually\nwithout touching the DB.","operationId":"tv_lookup_api_billing_tv_lookup_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/tv-test-grant":{"post":{"summary":"Tv Test Grant","description":"Admin-only smoke test for the TradingView grant bot: push (or pull) ONE username↔indicator\ndirectly, bypassing entitlements. Confirms the TV cookies + pine_id mapping actually work end to\nend. Returns config diagnostics so a misconfig is obvious without leaking secret values.","operationId":"tv_test_grant_api_billing_tv_test_grant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TvTestGrantIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/tv-sync":{"post":{"summary":"Tv Sync","description":"Admin: reconcile TradingView access for every user who has a saved username. Also runnable per\nuser is done automatically on purchase + on username save.","operationId":"tv_sync_api_billing_tv_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/create-checkout-session":{"post":{"summary":"Create Checkout Session","operationId":"create_checkout_session_api_billing_create_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/profile":{"get":{"summary":"Get Profile","description":"The signed-in user's contact/billing profile (Settings → Subscription).","operationId":"get_profile_api_billing_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Update Profile","operationId":"update_profile_api_billing_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/backfill-profiles":{"post":{"summary":"Backfill Profiles From Stripe","description":"Admin: pull name/phone/address from Stripe for existing customers (matched by email) and store\nthem in user_profiles. Fills only blank fields, so it never overwrites what a user already edited.","operationId":"backfill_profiles_from_stripe_api_billing_backfill_profiles_post","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/create-portal-session":{"post":{"summary":"Create Portal Session","description":"Stripe customer portal so a user can update/cancel their subscription.","operationId":"create_portal_session_api_billing_create_portal_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/preclaim":{"post":{"summary":"Preclaim","description":"Purchase-completion page hook (no login required). Captures the buyer's email + TradingView\nusername right after checkout. If they already have an app account, we apply it now; otherwise we\nstash it so it's applied automatically when they sign up under the same email.","operationId":"preclaim_api_billing_preclaim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreclaimIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/session-email":{"get":{"summary":"Session Email","description":"Confirmation-page helper: resolve the buyer's email from a Stripe Checkout session id (passed\nto the redirect as ?session_id={CHECKOUT_SESSION_ID}) so the page can pre-fill it. Returns only\nthe email; never raises.","operationId":"session_email_api_billing_session_email_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/email-test":{"post":{"summary":"Email Test Endpoint","description":"Admin-only: send a test email and return the provider + exact result/error (Hostinger status,\nmailbox resolution, env presence — no secret values). Pinpoints an email misconfig without logs.","operationId":"email_test_endpoint_api_billing_email_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/founder-seats":{"get":{"summary":"Founder Seats","description":"Public: how many founder seats remain (drives the page's counter + sold-out state).","operationId":"founder_seats_api_billing_founder_seats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/founder-claim":{"post":{"summary":"Founder Claim","description":"Public: if seats remain, record the lead and hand back the founder code; else sold_out.","operationId":"founder_claim_api_billing_founder_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FounderClaimIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/installment/status":{"get":{"summary":"Installment Status","description":"The signed-in user's installment plan progress (for the Learn banner + pay-off button).","operationId":"installment_status_api_billing_installment_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/installment/lookup":{"get":{"summary":"Installment Lookup","description":"Admin: a payment-plan student's progress and exactly which modules are locked vs unlocked, so you\ncan verify the gate is doing what it should.","operationId":"installment_lookup_api_billing_installment_lookup_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/installment/set":{"post":{"summary":"Installment Set","description":"Admin override: create or update a student's payment-plan record — the manual lever for locking/\nunlocking module blocks when the automatic gating didn't fire (or a mismatch). Setting unlock_tier\nis what controls which modules are open (1 = M1-4, 2 = +M5-7+LV, 3 = all).","operationId":"installment_set_api_billing_installment_set_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallmentSetIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/installment/clear":{"post":{"summary":"Installment Clear","description":"Admin: remove a student's payment-plan record entirely — course gating falls back to full access\n(use when converting a plan to paid-in-full / removing the module gate).","operationId":"installment_clear_api_billing_installment_clear_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallmentSetIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/installment/pay-off":{"post":{"summary":"Installment Pay Off","description":"Create a one-time Checkout for the remaining installments so the student can unlock everything now.","operationId":"installment_pay_off_api_billing_installment_pay_off_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/send-welcome":{"post":{"summary":"Send Welcome Manual","description":"Admin: send the course welcome/onboarding email to any address — for manual grants, email\nmismatches (paid with one email, signed up with another), or a resend.","operationId":"send_welcome_manual_api_billing_send_welcome_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendWelcomeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/trial/start":{"post":{"summary":"Start Trial Manual","description":"Admin: give one person the 14-day Verdict trial without a checkout, and send the setup email.\nNo account yet → the trial is stashed by email and starts the day they sign up with it.","operationId":"start_trial_manual_api_billing_trial_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTrialIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/trial/status":{"get":{"summary":"Trial Status","description":"The signed-in user's running trial (for the Learn banner).","operationId":"trial_status_api_billing_trial_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/pending-signups":{"get":{"summary":"Pending Signups","description":"Admin: buyers who PAID but haven't created an account yet — a stashed one-time purchase\n(pending_claims) or an installment plan with no linked user. These are the reminder-email targets.","operationId":"pending_signups_api_billing_pending_signups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/pending-signups/remind":{"post":{"summary":"Pending Signups Remind","description":"Admin: send the create-your-account reminder to one pending buyer, or to all of them.","operationId":"pending_signups_remind_api_billing_pending_signups_remind_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemindIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/pending-signups/dismiss":{"post":{"summary":"Pending Signups Dismiss","description":"Admin: remove a buyer from the pending-signups list — for testers, or someone who signed up\nunder a different email (already handled). Deletes their stashed one-time claim and any\nUNLINKED installment plan for that email (never touches a plan already tied to an account).","operationId":"pending_signups_dismiss_api_billing_pending_signups_dismiss_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemindIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/webhook":{"post":{"summary":"Stripe Webhook","operationId":"stripe_webhook_api_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/strategy-execution/stacking":{"post":{"tags":["Strategy Execution"],"summary":"Execute a Position Stacking Strategy","description":"Initiates a position stacking strategy.","operationId":"execute_stacking_strategy_api_strategy_execution_stacking_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackingStrategyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Execute Stacking Strategy Api Strategy Execution Stacking Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-execution/re-enable-strategies":{"post":{"tags":["Strategy Execution"],"summary":"Re-enable automated strategies after manual control","description":"Default (resume_recovery=False): clears user_manual_control + hedge_mode_active and DROPS the\nhedge tracking so the position shows as user-managed. BE/TSL/SL/TP are NOT restored and no\nautomated monitor resumes.\n\nresume_recovery=True: clears ONLY user_manual_control and KEEPS the hedge/recovery tracking, so\nthe recovery monitor resumes managing the existing hedge group — use this to undo a FALSE\nuser-control flag on a position that is really still hedged.","operationId":"re_enable_strategies_api_strategy_execution_re_enable_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReEnableStrategiesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Re Enable Strategies Api Strategy Execution Re Enable Strategies Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-execution/balance-account-lots":{"post":{"tags":["Strategy Execution"],"summary":"Manually rebalance every recovery group on the account to net-lot 0","description":"Force a net-lot rebalance NOW on every active recovery group on the account: for each group that\nis off net-0 beyond tolerance, the rebalancer adds a delta-neutral leg toward net-0 (respecting the\nmargin guard + leg cap — it never trims an existing leg or realizes a loss). The continuous\nrebalancer already does this, so this is a manual nudge.","operationId":"balance_account_lots_api_strategy_execution_balance_account_lots_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceLotsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Balance Account Lots Api Strategy Execution Balance Account Lots Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-execution/max-lots-decision":{"post":{"tags":["Strategy Execution"],"summary":"Approve/stop stacking past the max-total-lots cap (H4)","description":"H4 — the user's answer to a 'max lots reached, continue?' prompt. approve=True sets\nmax_lots_continue_approved on the recovery group so the engine raises the ceiling by one\nincrement and resumes stacking; approve=False acknowledges (clears the pending flag) and\nleaves the group held for the user to intervene.","operationId":"max_lots_decision_api_strategy_execution_max_lots_decision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaxLotsDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Max Lots Decision Api Strategy Execution Max Lots Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-execution/group-modify":{"post":{"tags":["Strategy Execution"],"summary":"Modify a group of positions","description":"Modify all positions sharing a position_group_id.\nCan set virtual SL/TP, execute partial close, or close all positions.","operationId":"group_modify_positions_api_strategy_execution_group_modify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupModifyPositionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Group Modify Positions Api Strategy Execution Group Modify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettings"}}}}}},"post":{"summary":"Update Settings","operationId":"update_settings_api_settings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/test":{"post":{"tags":["notifications"],"summary":"Test Notification","operationId":"test_notification_api_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestNotificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/preview-strategy":{"post":{"summary":"Preview Strategy","description":"Calculates the margin, potential profit, and loss for a trade, optionally applying a strategy.","operationId":"preview_strategy_api_preview_strategy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/library/textbook/meta":{"get":{"summary":"Textbook Meta","description":"Is the textbook available to this user? (Drives the Library UI's ready/locked state.)","operationId":"textbook_meta_api_library_textbook_meta_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/library/textbook.pdf":{"get":{"summary":"Textbook Pdf","description":"The raw PDF bytes (course-gated). The frontend fetches this once and renders it with pdf.js.","operationId":"textbook_pdf_api_library_textbook_pdf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/users/me/permissions":{"get":{"summary":"Get User Permissions","operationId":"get_user_permissions_api_users_me_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissions"}}}}}}},"/api/market_data/prepare-connection2":{"post":{"tags":["Market Data"],"summary":"Prepare Connection2","operationId":"prepare_connection2_api_market_data_prepare_connection2_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/market_data/candles":{"get":{"tags":["Market Data"],"summary":"Get Candles","operationId":"get_candles_api_market_data_candles_get","parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string","title":"Symbol"}},{"name":"timeframe","in":"query","required":true,"schema":{"type":"string","title":"Timeframe"}},{"name":"account_id","in":"query","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/drills/progress":{"get":{"summary":"List Drill Progress","description":"Every lesson's saved drill progress for this student (drives 'completed' badges).","operationId":"list_drill_progress_api_drills_progress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DrillProgressOut"},"type":"array","title":"Response List Drill Progress Api Drills Progress Get"}}}}}},"post":{"summary":"Save Drill Progress","description":"Upsert this lesson's drill progress (last write wins).","operationId":"save_drill_progress_api_drills_progress_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillProgressIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillProgressOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/drills/progress/{lesson_id}":{"get":{"summary":"Get Drill Progress","description":"This lesson's saved drill progress, or null if none yet.","operationId":"get_drill_progress_api_drills_progress__lesson_id__get","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DrillProgressOut"},{"type":"null"}],"title":"Response Get Drill Progress Api Drills Progress  Lesson Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies":{"get":{"summary":"List Sl Strategies","operationId":"list_sl_strategies_api_sl_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SLStrategy"},"type":"array","title":"Response List Sl Strategies Api Sl Strategies Get"}}}}}},"post":{"summary":"Create Sl Strategy","operationId":"create_sl_strategy_api_sl_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLStrategyIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLStrategy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies/{strategy_id}":{"put":{"summary":"Update Sl Strategy","operationId":"update_sl_strategy_api_sl_strategies__strategy_id__put","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLStrategyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLStrategy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Sl Strategy","operationId":"delete_sl_strategy_api_sl_strategies__strategy_id__delete","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies/{strategy_id}/execute":{"post":{"summary":"Execute Strategy","operationId":"execute_strategy_api_sl_strategies__strategy_id__execute_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteStrategyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies/analysis/{position_id}":{"get":{"summary":"Analyze Position","operationId":"analyze_position_api_sl_strategies_analysis__position_id__get","parameters":[{"name":"position_id","in":"path","required":true,"schema":{"type":"string","title":"Position Id"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-hub/public":{"get":{"summary":"List Public Strategies","description":"Sanitized public strategy listing — config is never exposed to non-owners.","operationId":"list_public_strategies_api_strategy_hub_public_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicStrategy"},"title":"Response List Public Strategies Api Strategy Hub Public Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-hub/global":{"get":{"summary":"List Global Strategies","description":"Global strategies — pre-applied platform strategies available to subscribers.","operationId":"list_global_strategies_api_strategy_hub_global_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublicStrategy"},"type":"array","title":"Response List Global Strategies Api Strategy Hub Global Get"}}}}}}},"/api/sl-strategies/{strategy_id}/publish":{"post":{"summary":"Publish Strategy","description":"Make a strategy public. Developer tier/role only.","operationId":"publish_strategy_api_sl_strategies__strategy_id__publish_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishStrategyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStrategy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies/{strategy_id}/unpublish":{"post":{"summary":"Unpublish Strategy","description":"Remove a strategy from the public hub. Developer only.","operationId":"unpublish_strategy_api_sl_strategies__strategy_id__unpublish_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-hub/{strategy_id}/clone":{"post":{"summary":"Clone Public Strategy","description":"Clone a public strategy into the current user's private library.","operationId":"clone_public_strategy_api_strategy_hub__strategy_id__clone_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clone Public Strategy Api Strategy Hub  Strategy Id  Clone Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies/{strategy_id}/set-global":{"post":{"summary":"Set Global Strategy","description":"Mark a strategy as global (available to all users). Admin only.","operationId":"set_global_strategy_api_sl_strategies__strategy_id__set_global_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"is_global","in":"query","required":true,"schema":{"type":"boolean","title":"Is Global"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sl-strategies/seed-sr-ladder-defaults":{"post":{"summary":"Seed Sr Ladder Defaults","description":"Create (or refresh) the 4 default S/R Ladder GLOBAL strategies. Admin/developer only.\n\nIdempotent: upserts by name so re-running just refreshes the config. The strategies are marked\nis_global so they appear in every user's SL-strategy dropdown. Live adds/banking stay OFF until\nBT_SR_LADDER_DISABLED=0 (demo-first).","operationId":"seed_sr_ladder_defaults_api_sl_strategies_seed_sr_ladder_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sl-strategies/seed-kcx-cross-defaults":{"post":{"summary":"Seed Kcx Cross Defaults","description":"Create (or refresh) the 4 KCX Cross + Hedge GLOBAL strategies (Rapid Scalp / Scalp / Intraday /\nInterday). Admin/developer only. Idempotent — upserts by name; grouped under 'KCX Cross'.","operationId":"seed_kcx_cross_defaults_api_sl_strategies_seed_kcx_cross_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sl-strategies/seed-levels-defaults":{"post":{"summary":"Seed Levels Defaults","description":"Create (or refresh) the 4 Levels — BE + Trail GLOBAL management strategies. Admin/developer only.\nIdempotent; grouped under 'Levels'. Pair with a stop you draw at the level on the ticket.","operationId":"seed_levels_defaults_api_sl_strategies_seed_levels_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sl-strategies/convert-standard-pips":{"post":{"summary":"Convert Standard Pips","description":"Convert every saved strategy to standard pips (gold $0.10 instead of $0.01). Global strategies\nkeep their Currencies / Indices / Oil values; custom strategies run the same values on every asset.\nEach strategy's previous config is backed up first. Already-converted strategies are skipped.","operationId":"convert_standard_pips_api_sl_strategies_convert_standard_pips_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sl-strategies/seed-trailing-defaults":{"post":{"summary":"Seed Trailing Defaults","description":"Create (or refresh) the 9 Trailing Stop GLOBAL strategies (Scalp / Intraday / Interday ×\nFixed Distance / KCX S/R / Pivot). Admin/developer only. Idempotent — upserts by name.","operationId":"seed_trailing_defaults_api_sl_strategies_seed_trailing_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/global-default-strategy":{"get":{"summary":"Get Global Default Strategy","description":"Get the global default strategy ID from app settings. Available to all authenticated users.","operationId":"get_global_default_strategy_api_global_default_strategy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sl-strategies/risk-inspect":{"get":{"summary":"Risk Inspect","description":"Verification view: in one place, show (a) what risk_settings each of the user's SL strategies\nis CONFIGURED with, and (b) what the engine is ACTUALLY running for every live managed position —\nso you can confirm the engine is following the settings (or see exactly where it drifted) without\nneeding the Strategy Hub card UI. Also runs the unified hedge_status across all live positions so\nsignal disagreements show up on demand (no waiting on slowly-accumulating shadow logs).","operationId":"risk_inspect_api_sl_strategies_risk_inspect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/prop-readiness/firms":{"get":{"summary":"List Firms","description":"Firm evaluations we have rules for (from the Prop Firm Planner), plus the student's saved pick.","operationId":"list_firms_api_prop_readiness_firms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Firms Api Prop Readiness Firms Get"}}}}}}},"/api/prop-readiness/firm":{"put":{"summary":"Choose Firm","operationId":"choose_firm_api_prop_readiness_firm_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Choose Firm Api Prop Readiness Firm Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Clear Firm","description":"No evaluation picked: the single-firm score stops until the student picks one again.","operationId":"clear_firm_api_prop_readiness_firm_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Clear Firm Api Prop Readiness Firm Delete"}}}}}}},"/api/prop-readiness/settings":{"put":{"summary":"Update Settings","description":"Start fresh (`reset`: score only trades closed from now on) and/or turn scoring off/on (`opted_out`).","operationId":"update_settings_api_prop_readiness_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__apis__prop_readiness__SettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Settings Api Prop Readiness Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-readiness":{"get":{"summary":"Get Prop Readiness","description":"Score against one firm (`rule_id`, else the saved pick) or, with `max_drawdown`, the student's own numbers.","operationId":"get_prop_readiness_api_prop_readiness_get","parameters":[{"name":"rule_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rule Id"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"daily_loss_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100000,"exclusiveMinimum":0},{"type":"null"}],"title":"Daily Loss Limit"}},{"name":"max_drawdown","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":500000,"exclusiveMinimum":0},{"type":"null"}],"title":"Max Drawdown"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Prop Readiness Api Prop Readiness Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-readiness/all-firms":{"get":{"summary":"All Firms","description":"Needs 30+ days of demo history: the last 30 days scored against every firm evaluation we have rules for.","operationId":"all_firms_api_prop_readiness_all_firms_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response All Firms Api Prop Readiness All Firms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/handoff":{"get":{"tags":["Auth"],"summary":"Auth Handoff","operationId":"auth_handoff_api_auth_handoff_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/announcements/active":{"get":{"summary":"Active Announcements","operationId":"active_announcements_api_announcements_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/announcements/{announcement_id}/dismiss":{"post":{"summary":"Dismiss Announcement","operationId":"dismiss_announcement_api_announcements__announcement_id__dismiss_post","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","title":"Announcement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/announcements/admin":{"get":{"summary":"List Announcements","operationId":"list_announcements_api_announcements_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Announcement","operationId":"create_announcement_api_announcements_admin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/announcements/admin/{announcement_id}":{"put":{"summary":"Update Announcement","operationId":"update_announcement_api_announcements_admin__announcement_id__put","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","title":"Announcement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Announcement","operationId":"delete_announcement_api_announcements_admin__announcement_id__delete","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","title":"Announcement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/announcements/admin/{announcement_id}/reset":{"post":{"summary":"Reset Dismissals","description":"Show it again to everyone who already dismissed it.","operationId":"reset_dismissals_api_announcements_admin__announcement_id__reset_post","parameters":[{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","title":"Announcement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cohorts":{"get":{"summary":"List Cohorts","operationId":"list_cohorts_api_cohorts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Cohort"},"type":"array","title":"Response List Cohorts Api Cohorts Get"}}}}}},"post":{"summary":"Create Cohort","operationId":"create_cohort_api_cohorts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cohort"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cohorts/{cohort_id}":{"put":{"summary":"Update Cohort","operationId":"update_cohort_api_cohorts__cohort_id__put","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cohort"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Cohort","operationId":"delete_cohort_api_cohorts__cohort_id__delete","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","title":"Cohort Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cohorts/enrollments":{"get":{"summary":"List Enrollments","operationId":"list_enrollments_api_cohorts_enrollments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnrollmentRow"},"type":"array","title":"Response List Enrollments Api Cohorts Enrollments Get"}}}}}}},"/api/cohorts/enrollment":{"post":{"summary":"Upsert Enrollment","operationId":"upsert_enrollment_api_cohorts_enrollment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cohorts/webhook/payment":{"post":{"summary":"Payment Webhook","operationId":"payment_webhook_api_cohorts_webhook_payment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/my-access":{"get":{"summary":"My Access","operationId":"my_access_api_my_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyAccess"}}}}}}},"/api/controllers/slots":{"get":{"summary":"Get Custom Slots","description":"Return how many custom slots this user has and how many are used.","operationId":"get_custom_slots_api_controllers_slots_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/controllers":{"get":{"summary":"List Controllers","description":"List all controllers for this user.","operationId":"list_controllers_api_controllers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Controller","description":"Create a controller and its underlying automation_settings.\nValidates:\n- Same account cannot have two modes in same controller\n- Custom slot limit for custom controllers\n- Rapid scalp with no bias + no cross requires acknowledgement\n- Hedge recovery must be populated from preset","operationId":"create_controller_api_controllers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateControllerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/controllers/{controller_id}/mode-accounts/{pair_id}":{"patch":{"summary":"Update Mode Account","description":"Update a mode-account pair and sync its automation_setting.","operationId":"update_mode_account_api_controllers__controller_id__mode_accounts__pair_id__patch","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}},{"name":"pair_id","in":"path","required":true,"schema":{"type":"string","title":"Pair Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModeAccountPair"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/controllers/{controller_id}":{"delete":{"summary":"Delete Controller","description":"Delete a controller and ALL automation settings created by it.\nUses controller_id FK to find all three types: entry, bias, cross hedge.","operationId":"delete_controller_api_controllers__controller_id__delete","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/controllers/presets":{"get":{"summary":"List Global Presets","description":"Return all active global presets for the controller wizard.","operationId":"list_global_presets_api_controllers_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/kcx-sr/status":{"get":{"summary":"Kcx Sr Status","operationId":"kcx_sr_status_api_admin_kcx_sr_status_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/force-disconnect-account/{meta_api_account_id}":{"post":{"summary":"Force-disconnect a stale MetaAPI account connection","description":"Runs on the engine (its manager + pool); with a separate engine, the website's own pool too.","operationId":"force_disconnect_account_api_admin_force_disconnect_account__meta_api_account_id__post","parameters":[{"name":"meta_api_account_id","in":"path","required":true,"schema":{"type":"string","title":"Meta Api Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reset-all-connections":{"post":{"summary":"Reset all MetaAPI connections and circuit breakers","description":"Admin recovery endpoint for use after a MetaAPI server outage.\n1. Resets all tripped circuit breakers so accounts can reconnect.\n2. Removes all stale connections from the strategy manager.\n3. Re-triggers connect_deployed_accounts to rebuild connections cleanly.","operationId":"reset_all_connections_api_admin_reset_all_connections_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetAllConnectionsResponse"}}}}}}},"/api/admin/execute-due-trades":{"post":{"summary":"Execute all due scheduled trades","description":"Cron job endpoint to check for due trades and execute them.\nCron: send X-Cron-Secret (BT_CRON_SECRET); admins may also call it while logged in.\n\nRe-enabled for the admin/dev Scheduled Trades feature. Only admin/dev users can\ncreate scheduled_trades rows (the create endpoint is dev-gated), so this sweep only\never fires their trades.","operationId":"execute_due_trades_api_admin_execute_due_trades_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/scan-news-alerts":{"post":{"summary":"Fire volatility alerts for upcoming economic-news events","description":"Cron job endpoint. For every economic event entering the next 15 minutes, notify each user who\nsubscribed to that event's folder color (red/orange/yellow) via their chosen channels (push/SMS).\nDe-duped per (event, user) in news_alerts_sent so an event is never alerted twice, regardless of\nhow often the cron runs. Colors, lead time and channels are all user-driven (see Notifications).","operationId":"scan_news_alerts_api_admin_scan_news_alerts_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/cleanup-orphan-hedges":{"post":{"summary":"Scan all deployed accounts for orphan hedge orders/positions","description":"Background cron job endpoint (runs every 2 minutes).\nScans ALL deployed MetaAPI accounts for orphan hedge pending orders and positions\nwhose parent position no longer exists.","operationId":"cleanup_orphan_hedges_api_admin_cleanup_orphan_hedges_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/check-risk-limits":{"post":{"summary":"Check risk limits for all deployed accounts","description":"Background cron job endpoint (runs every minute).\nScans ALL deployed MetaAPI accounts that have active risk settings,\ncalculates P&L, checks daily/weekly loss/profit limits and trailing drawdown,\nand auto-closes positions + locks trading when limits are breached.","operationId":"check_risk_limits_api_admin_check_risk_limits_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/user-details/{user_id}":{"get":{"summary":"Get User Details","operationId":"get_user_details_api_admin_user_details__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/accounts-by-email":{"get":{"summary":"Accounts By Email","description":"List EVERY app account (Stack Auth id) that shares an email, with the signals that say which one\nto keep: active entitlements, saved TradingView username, app tier/role, and activity counts\n(trading accounts, workbook saves, homework submissions). Flags the keeper vs. empty duplicates so\nan admin can safely remove the shells without a database query.","operationId":"accounts_by_email_api_admin_accounts_by_email_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/send-note":{"post":{"summary":"Send Note","description":"Send one user a note by email and/or text. dry_run=True only looks the user up (name, email, phone).\nEmail goes through email_service; the text goes through the user's GHL contact (found by email), so it\nreaches the phone GHL has even when the app has none.","operationId":"send_note_api_admin_send_note_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/merge-users":{"post":{"summary":"Merge Users","description":"Move everything the duplicate account owns to the keeper (dry_run=True only reports what would move),\nthen mark the duplicate deleted and, with delete_login, remove its sign-in.","operationId":"merge_users_api_admin_merge_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeUsersRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/possible-duplicates":{"get":{"summary":"Possible Duplicates","description":"Live accounts that probably belong to one person: same mailbox, same name (also vs. the email's\nlocal part), same TradingView username or same phone — so different emails are caught too.","operationId":"possible_duplicates_api_admin_possible_duplicates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Possible Duplicates Api Admin Possible Duplicates Get"}}}}}}},"/api/admin/fill-missing-names":{"post":{"summary":"Fill Missing Names","description":"For accounts with no name, look the email up in Stripe, then GHL, and save the name to the billing\nprofile (fills blanks only). Cohort lists, leaderboards and Hedging reviews read that name.","operationId":"fill_missing_names_api_admin_fill_missing_names_post","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":300,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/update-tier":{"post":{"summary":"Update User Tier","operationId":"update_user_tier_api_admin_update_tier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/inner-circle":{"post":{"summary":"Set Inner Circle","description":"Grant or revoke Inner Circle (hedging) access. Cannot be purchased — admin-only.","operationId":"set_inner_circle_api_admin_users__user_id__inner_circle_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"enabled","in":"query","required":true,"schema":{"type":"boolean","title":"Enabled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"summary":"List Users","operationId":"list_users_api_admin_users_get","parameters":[{"name":"env","in":"query","required":false,"schema":{"type":"string","default":"dev","title":"Env"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stack-webhook":{"post":{"summary":"Stack Webhook","description":"Inbound webhook from Stack Auth — provisions a row in the app `users` table the instant a user\nsigns up, so new users appear in admin User Management immediately instead of waiting on the\nNeon↔Stack sync. Configure this URL (…/routes/stack-webhook) in the Stack Auth dashboard under\nWebhooks and set STACK_WEBHOOK_SECRET to the signing secret it shows. When the secret is set the\nSvix signature is verified; without it every call is refused (503), since an unsigned endpoint\nwould let anyone create user rows. Users are still provisioned on first login without it.","operationId":"stack_webhook_api_stack_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/sync-users":{"post":{"summary":"Sync Users","description":"Backfill: upsert every current Stack Auth user (neon_auth.users_sync) into the app `users`\ntable, so existing signups that predate the webhook are captured in one click. New users are\nhandled live by /stack-webhook; this is the 'catch the DB up now' action.","operationId":"sync_users_api_admin_sync_users_post","parameters":[{"name":"env","in":"query","required":false,"schema":{"type":"string","default":"dev","title":"Env"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/grant-course-bundle":{"post":{"summary":"Grant Course Bundle","description":"Manually grant the 6-month course bundle (course + tier + indicators) as timed entitlements.\nLets us fulfill/test bundles before Stripe checkout is wired; the Stripe webhook will call the\nsame entitlements library. Indicators are recorded now; the TradingView bot consumes them later.","operationId":"grant_course_bundle_api_admin_grant_course_bundle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantBundleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-config":{"get":{"summary":"Get Feature Config","operationId":"get_feature_config_api_admin_feature_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Update Feature Config","operationId":"update_feature_config_api_admin_feature_config_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Config"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/discovered-indicators":{"get":{"summary":"Get Discovered Indicators","operationId":"get_discovered_indicators_api_admin_discovered_indicators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/discovered-indicators/{indicator_name}":{"delete":{"summary":"Delete Discovered Indicator","description":"Delete all signal records for a given indicator name from Postgres.","operationId":"delete_discovered_indicator_api_admin_discovered_indicators__indicator_name__delete","parameters":[{"name":"indicator_name","in":"path","required":true,"schema":{"type":"string","title":"Indicator Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteIndicatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/subscription-health":{"get":{"summary":"Get Subscription Health","description":"Health check for subscription sync. Reports data integrity issues using Postgres users table.","operationId":"get_subscription_health_api_admin_subscription_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionHealthResponse"}}}}}}},"/api/admin/users/create":{"post":{"summary":"Create User","description":"Create a Stack Auth account with a temporary password and pre-provision the app user row with the\nchosen tier/role, so the person can sign in straight away. The password is never logged or stored here.","operationId":"create_user_api_admin_users_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/delete-user/{user_id}":{"delete":{"summary":"Delete User","description":"Fully remove a user from the system. This is a destructive, irreversible operation.\n\nSteps:\n1. Undeploy and remove MetaAPI trading accounts\n2. Delete all user data from PostgreSQL (preserves activity_log)\n3. Delete user from Stack Auth","operationId":"delete_user_api_admin_delete_user__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"env","in":"query","required":false,"schema":{"type":"string","default":"dev","title":"Env"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/connection-health":{"get":{"summary":"Connection health dashboard","operationId":"get_connection_health_dashboard_api_admin_connection_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/re-register-position":{"post":{"summary":"Force re-register a position into the strategy engine","description":"Re-registers a live MetaAPI position into the strategy engine using the\nruntime_rules stored in Postgres. Use when a position is live but is not\nbeing managed (e.g. after a reconnect that missed the position, or a bug\nin the restore loop).","operationId":"re_register_position_api_admin_re_register_position_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReRegisterPositionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/run-reconciliation":{"post":{"summary":"Legacy Reconciliation Noop","description":"Legacy Databutton cron endpoint — kept to silence 405 errors in logs.","operationId":"legacy_reconciliation_noop_api_admin_run_reconciliation_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-v3":{"post":{"summary":"Run Migration V3","description":"One-shot migration endpoint for the v3 signal columns. Now also runs\nautomatically on startup via ensure_essential_columns().","operationId":"run_migration_v3_api_admin_run_migration_v3_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/diag/recovery-events":{"get":{"summary":"Diag Recovery Events","description":"Recent recovery_event_log rows, newest first. Filters are all optional and ANDed:\n- group: recovery_group_id prefix (the 8-char id from Risk Inspect works)\n- account / symbol: exact-ish match (account is a substring match on meta_api id)\n- event_type: CSV, e.g. \"tsl_close,roll,rebalance\"\n- losses_only=true: ONLY rows with realized_pnl < 0 — i.e. a close that REALIZED a loss (the\n  no-realize-loss smoking gun). Across all groups this instantly surfaces every violation.\n- since_minutes: only rows newer than N minutes\n- limit: capped at 2000","operationId":"diag_recovery_events_api_admin_diag_recovery_events_get","parameters":[{"name":"secret","in":"query","required":true,"schema":{"type":"string","title":"Secret"}},{"name":"group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"}},{"name":"account","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account"}},{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"losses_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Losses Only"}},{"name":"since_minutes","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Since Minutes"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/diag/loss-scan":{"get":{"summary":"Diag Loss Scan","description":"No-realize-loss watchdog: every close that realized a loss (realized_pnl < 0) in the last\n`since_minutes` (default 24h), plus a per-group tally. If the engine is honoring the rule this is\nempty. Read-only.","operationId":"diag_loss_scan_api_admin_diag_loss_scan_get","parameters":[{"name":"secret","in":"query","required":true,"schema":{"type":"string","title":"Secret"}},{"name":"since_minutes","in":"query","required":false,"schema":{"type":"integer","default":1440,"title":"Since Minutes"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/migrate-pips-canonical":{"post":{"summary":"Run Migrate Pips Canonical","description":"Apply (up) or roll back (down) the Pattern-A pip-scale x100 migration.","operationId":"run_migrate_pips_canonical_api_admin_migrate_pips_canonical_post","parameters":[{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"up","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/migrate-pips-field":{"post":{"summary":"Run Migrate Pips Field","description":"Apply (up) / roll back (down) the per-field Pattern-B x100 migration for ONE column.\nDeploy the matching BT_FLAG_ALL_PIPS consumer-flip in the same window. See\ndocs/all_pips_migration.md before running.","operationId":"run_migrate_pips_field_api_admin_migrate_pips_field_post","parameters":[{"name":"column","in":"query","required":true,"schema":{"type":"string","title":"Column"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"up","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/seed-global-presets":{"post":{"summary":"Seed Global Presets","description":"Bulk create/update all global tools, SL presets, and the 12 mode×risk\nstack-recovery strategies — without a redeploy. Idempotent (safe to re-run);\nonly refreshes system-owned globals, never user-created records.","operationId":"seed_global_presets_api_admin_seed_global_presets_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-cross-hedge":{"post":{"summary":"Run Migration Cross Hedge","description":"One-shot migration: add cross-hedge columns to automation_settings.","operationId":"run_migration_cross_hedge_api_admin_run_migration_cross_hedge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-components":{"post":{"summary":"Run Migration Components","description":"One-shot migration: create the component tables (stack_recovery_strategies,\nbias_controllers, cross_hedge_controllers), add sl_strategies hedge-bracket\ncolumns, the automation_settings linking FKs, and indexes. Idempotent —\nruns from inside the deployed backend where the DB user is the owner.","operationId":"run_migration_components_api_admin_run_migration_components_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/populate-global-strategies":{"post":{"summary":"Populate Global Strategies","description":"Idempotent — safe to run multiple times. Creates system-owned (is_public)\nglobal SL strategies and stack recovery strategies keyed by trading_style +\nrisk_level so the automation form can auto-match them when a preset is applied.\nRequires the new columns (run /admin/run-migration-components first).","operationId":"populate_global_strategies_api_admin_populate_global_strategies_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/simulate-recovery-tick":{"post":{"summary":"TEST HELPER: feed a synthetic adverse price into the live recovery monitor","description":"Drive the REAL hedge-recovery code path for an already-open, recovery-enabled\nposition using a synthetic adverse evaluation price — so stack-recovery can be\ntested on demo without waiting for the market to move.\n\n- `meta_position_id`: the broker (MetaAPI) position id of an open position whose\n  automation has hedge recovery enabled (it must be registered in the engine).\n- `drawdown_pips`: how far adverse (in pips, get_pip_size scale) to simulate.\n\nIf no hedge exists yet it runs check_recovery_trigger (places the first hedge);\nif a hedge already exists it runs run_group_monitor (drives stacking / stack-TSL).\nPlaces REAL orders on the account — intended for demo accounts only.","operationId":"simulate_recovery_tick_api_admin_simulate_recovery_tick_post","parameters":[{"name":"meta_position_id","in":"query","required":true,"schema":{"type":"string","title":"Meta Position Id"}},{"name":"drawdown_pips","in":"query","required":false,"schema":{"type":"number","default":250.0,"title":"Drawdown Pips"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/inspect-position-hedge":{"get":{"summary":"DIAGNOSTIC: dump a position's SL-strategy hedge state and why it has/hasn't activated","description":"Read-only. For an open, engine-registered position, returns its\nrisk_settings.hedging config, the relevant state flags, the live drawdown,\nand an explicit reason the drawdown hedge would or would not trigger right now.\nUse this to diagnose 'SL-strategy hedge not activating' without server logs.","operationId":"inspect_position_hedge_api_admin_inspect_position_hedge_get","parameters":[{"name":"meta_position_id","in":"query","required":true,"schema":{"type":"string","title":"Meta Position Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/recent-logs":{"get":{"summary":"DIAGNOSTIC: tail the in-memory log buffer (optionally filtered)","description":"Return recent captured stdout/stderr log lines, newest last. Optional\n`contains` filters case-insensitively (e.g. 'Hedging', '[BIAS]', '[CROSS-HEDGE]',\n'[SL-STRATEGY]', '[CONFLUENCE]'). Buffer holds the most recent ~5000 lines since\nthe server last started. Now gated on BT_DIAG_SECRET (admin_tools is disableAuth at the router\nlevel, so this was previously reachable with no auth — and logs can carry sensitive strings).","operationId":"recent_logs_api_admin_recent_logs_get","parameters":[{"name":"secret","in":"query","required":true,"schema":{"type":"string","title":"Secret"}},{"name":"contains","in":"query","required":false,"schema":{"type":"string","title":"Contains"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/run-migration-multi-account":{"post":{"summary":"Run Migration Multi Account","description":"One-shot migration: add account_ids UUID[] to automation_settings and backfill from trading_account_id.\nThe Render DB user is the owner, so ALTER TABLE succeeds here but not from local scripts.","operationId":"run_migration_multi_account_api_admin_run_migration_multi_account_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-tp-actions":{"post":{"summary":"Run Migration Tp Actions","description":"One-shot migration: add tp_action, BE/TSL columns to automation_settings.","operationId":"run_migration_tp_actions_api_admin_run_migration_tp_actions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-hedge-recovery":{"post":{"summary":"Run Migration Hedge Recovery","description":"One-shot migration: add hedge recovery columns to automation_settings.","operationId":"run_migration_hedge_recovery_api_admin_run_migration_hedge_recovery_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-hedge-recovery-v2":{"post":{"summary":"Run Migration Hedge Recovery V2","description":"One-shot migration: add ranging detection and acceptable loss columns to automation_settings.","operationId":"run_migration_hedge_recovery_v2_api_admin_run_migration_hedge_recovery_v2_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-hedge-recovery-v3":{"post":{"summary":"Run Migration Hedge Recovery V3","description":"One-shot migration: add stack signal indicator and tier columns to automation_settings.","operationId":"run_migration_hedge_recovery_v3_api_admin_run_migration_hedge_recovery_v3_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/run-migration-hedge-recovery-v4":{"post":{"summary":"Run Migration Hedge Recovery V4","description":"One-shot migration: rename points→pips columns, add cross_hedge_indicators and cross_signal_* columns.","operationId":"run_migration_hedge_recovery_v4_api_admin_run_migration_hedge_recovery_v4_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/users-export":{"get":{"summary":"Users Export","description":"CSV export of users + subscription/contact info for the Admin → Users tab. Admin/dev only.\nOne row per auth account, enriched with tier/role, entitlements, TradingView username, installment\nstatus, and the buyer profile (name/phone/address from Stripe or user-entered).\n\nUses the SAME unified source as the Users LIST (FULL OUTER JOIN of neon_auth.users_sync + the app\n`users` table) so every account is exported — not only the ones the Neon↔Stack sync has landed\n(reading users_sync alone can return as little as one row when that sync lags). Honors the `env`\ntoggle so the export matches the list the admin is viewing. `address_only=true` emits only rows with\na complete postal address (line1 + city + postal code) — ready to hand to a mailing house.","operationId":"users_export_api_admin_users_export_get","parameters":[{"name":"env","in":"query","required":false,"schema":{"type":"string","default":"dev","title":"Env"}},{"name":"address_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Address Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":5000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/tickets":{"get":{"summary":"List My Tickets","operationId":"list_my_tickets_api_support_tickets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TicketSummary"},"type":"array","title":"Response List My Tickets Api Support Tickets Get"}}}}}},"post":{"summary":"Create Ticket","operationId":"create_ticket_api_support_tickets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/tickets/{ticket_id}":{"get":{"summary":"Get Ticket","operationId":"get_ticket_api_support_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/tickets/{ticket_id}/messages":{"post":{"summary":"Reply To Ticket","operationId":"reply_to_ticket_api_support_tickets__ticket_id__messages_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/unread-count":{"get":{"summary":"Get Unread Count","description":"Support nav badge count. For an ADMIN/support handler: tickets with unread USER messages across\nthe whole queue (new requests + new replies). For a regular USER: their tickets with unread admin\nreplies (responses to their tickets).","operationId":"get_unread_count_api_support_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/support/tickets":{"get":{"summary":"Admin List Tickets","operationId":"admin_list_tickets_api_admin_support_tickets_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TicketSummary"},"title":"Response Admin List Tickets Api Admin Support Tickets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/support/tickets/{ticket_id}":{"get":{"summary":"Admin Get Ticket","operationId":"admin_get_ticket_api_admin_support_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/support/tickets/{ticket_id}/messages":{"post":{"summary":"Admin Reply To Ticket","operationId":"admin_reply_to_ticket_api_admin_support_tickets__ticket_id__messages_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/support/tickets/{ticket_id}/status":{"patch":{"summary":"Admin Update Ticket Status","operationId":"admin_update_ticket_status_api_admin_support_tickets__ticket_id__status_patch","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/support/assignment-rules":{"get":{"summary":"List Assignment Rules","operationId":"list_assignment_rules_api_admin_support_assignment_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Upsert Assignment Rule","operationId":"upsert_assignment_rule_api_admin_support_assignment_rules_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentRuleUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/support/assignment-rules/{category}":{"delete":{"summary":"Delete Assignment Rule","operationId":"delete_assignment_rule_api_admin_support_assignment_rules__category__delete","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/awards":{"get":{"summary":"My Awards","operationId":"my_awards_api_awards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Awards Api Awards Get"}}}}}}},"/api/awards/public/{code}":{"get":{"summary":"Public Award","description":"No login: what the shared certificate link shows (first name + last initial only).","operationId":"public_award_api_awards_public__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Public Award Api Awards Public  Code  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/test-trade-route":{"get":{"summary":"Test Trade Route","operationId":"test_trade_route_api_test_trade_route_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/manual_trade":{"post":{"summary":"Execute Manual Trade","operationId":"execute_manual_trade_api_manual_trade_post","parameters":[{"name":"preview","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Preview"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/close_trade":{"post":{"tags":["trade"],"summary":"Close Trade","description":"Close a specific position or trade.","operationId":"close_trade_api_close_trade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionCloseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/arm_position_hedge":{"post":{"tags":["trade"],"summary":"Arm Position Hedge","description":"Arm an on-demand protective hedge on an already-open position (the manual counterpart to the\nautomatic drawdown hedge). Delegates to the account's live StrategyListener, which writes the\nsame hedging config the entry/drawdown paths use — so firing and tracking are reused.","operationId":"arm_position_hedge_api_arm_position_hedge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArmHedgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/set_position_trailing_stop":{"post":{"tags":["trade"],"summary":"Set Position Trailing Stop","description":"Add or replace a trailing stop (pips / KCX S/R / pivot) on an open position.","operationId":"set_position_trailing_stop_api_set_position_trailing_stop_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrailingStopRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/disarm_position_hedge":{"post":{"tags":["trade"],"summary":"Disarm Position Hedge","description":"Cancel a pending (not-yet-fired) manual hedge on a position.","operationId":"disarm_position_hedge_api_disarm_position_hedge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionCloseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recovery-groups":{"get":{"tags":["trade"],"summary":"Get Recovery Groups","description":"Returns all active hedge recovery groups for the user.\nReads open positions with hedge_recovery.enabled=true from Postgres runtime_rules.\nStack Recovery is an admin/developer-only subsystem.","operationId":"get_recovery_groups_api_recovery_groups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/quick_trade":{"post":{"summary":"Quick Trade","operationId":"quick_trade_api_quick_trade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickTradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quick_trade_preview":{"post":{"summary":"Quick Trade Preview","description":"Dry-run a Quick Trade: same preset→sizing→margin path as execution, but places no order.\nReturns the lot size, split count, margin required, and the SL strategy that will apply — so the\nstudent sees exactly what one tap would do before committing.","operationId":"quick_trade_preview_api_quick_trade_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickTradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/symbol_spec":{"get":{"summary":"Symbol Spec","description":"Read-only: what one lot of `symbol` is on this account's broker (standard, mini, micro...),\nfrom the already-warm connection. Never opens a connection; `available: False` until it's warm.","operationId":"symbol_spec_api_symbol_spec_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"symbol","in":"query","required":true,"schema":{"type":"string","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hedging-addon/status":{"get":{"tags":["hedging-addon"],"summary":"Status","operationId":"status_api_hedging_addon_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Status Api Hedging Addon Status Get"}}}}}}},"/api/hedging-addon/trial":{"post":{"tags":["hedging-addon"],"summary":"Start Trial","operationId":"start_trial_api_hedging_addon_trial_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Trial Api Hedging Addon Trial Post"}}}}}}},"/api/hedging-addon/request-review":{"post":{"tags":["hedging-addon"],"summary":"Request Review","operationId":"request_review_api_hedging_addon_request_review_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Request Review Api Hedging Addon Request Review Post"}}}}}}},"/api/hedging-addon/checkout":{"post":{"tags":["hedging-addon"],"summary":"Checkout","operationId":"checkout_api_hedging_addon_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Checkout Api Hedging Addon Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/hedging-addon/requests":{"get":{"tags":["hedging-addon"],"summary":"List Requests","operationId":"list_requests_api_admin_hedging_addon_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Requests Api Admin Hedging Addon Requests Get"}}}}}}},"/api/admin/hedging-addon/student":{"get":{"tags":["hedging-addon"],"summary":"Student Detail","operationId":"student_detail_api_admin_hedging_addon_student_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Student Detail Api Admin Hedging Addon Student Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/hedging-addon/ai-review":{"post":{"tags":["hedging-addon"],"summary":"Ai Review","description":"Draft only — nothing is saved or shown to the student until the instructor decides.","operationId":"ai_review_api_admin_hedging_addon_ai_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIReviewIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ai Review Api Admin Hedging Addon Ai Review Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/hedging-addon/decision":{"post":{"tags":["hedging-addon"],"summary":"Decide","operationId":"decide_api_admin_hedging_addon_decision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Decide Api Admin Hedging Addon Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/presets/global":{"get":{"tags":["presets"],"summary":"List Global Presets","operationId":"list_global_presets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GlobalPreset"},"type":"array","title":"Response List Global Presets"}}}}}}},"/api/presets/global/{preset_id}":{"get":{"tags":["presets"],"summary":"Get Global Preset","operationId":"get_global_preset","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/presets/user":{"get":{"tags":["presets"],"summary":"List User Presets","operationId":"list_user_presets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserPreset"},"type":"array","title":"Response List User Presets"}}}}}},"post":{"tags":["presets"],"summary":"Create User Preset","operationId":"create_user_preset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPresetCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/presets/user/{preset_id}":{"delete":{"tags":["presets"],"summary":"Delete User Preset","operationId":"delete_user_preset","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers":{"get":{"summary":"List Controllers","operationId":"list_controllers_api_cross_hedge_controllers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Controller","operationId":"create_controller_api_cross_hedge_controllers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrossHedgeControllerCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers/seed-modes":{"post":{"summary":"Seed Mode Controllers","description":"One-click: create the 4 per-mode cross-hedge controllers (Rapid Scalp / Scalp / Intraday /\nInterday) for `symbol` so the user doesn't hand-make four. Idempotent — skips any mode that already\nhas a controller for this user+symbol (matched by mode, case-insensitive).","operationId":"seed_mode_controllers_api_cross_hedge_controllers_seed_modes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedModesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers/{controller_id}":{"put":{"summary":"Update Controller","operationId":"update_controller_api_cross_hedge_controllers__controller_id__put","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrossHedgeControllerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Controller","operationId":"delete_controller_api_cross_hedge_controllers__controller_id__delete","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers/{controller_id}/clone":{"post":{"summary":"Clone Controller","description":"Clone a public (global) or own controller into the user's private library.","operationId":"clone_controller_api_cross_hedge_controllers__controller_id__clone_post","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers/{controller_id}/set-direction":{"post":{"summary":"Set Direction","description":"Manually override a controller's last_direction (and neutral sub-type) for TESTING.\n\n`direction` query param: ?direction=buy|sell|neutral\n`reversal` (optional, only with direction=neutral): ?reversal=buy|sell sets a DIRECTIONAL neutral\n  (an early reversal warning — 'buy' = potential bullish reversal, 'sell' = potential bearish\n  reversal). Omit for a plain 'sandwich' neutral (no direction). This also feeds the in-memory\n  recovery early-de-risk guard, so the override actually exercises the reversal protection.\nOn a clear buy/sell we stamp last_directional (so 'latch' can keep trading the last clear cross)\nand clear any neutral reversal. Mirrors the signal-driven update; no automation rows are toggled.","operationId":"set_direction_api_cross_hedge_controllers__controller_id__set_direction_post","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}},{"name":"direction","in":"query","required":true,"schema":{"type":"string","title":"Direction"}},{"name":"reversal","in":"query","required":false,"schema":{"type":"string","title":"Reversal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers/{controller_id}/set-osc":{"post":{"summary":"Set Osc","description":"Manually override a controller's mode-scoped OSC (oscillator up/down) for TESTING the entry\nfilter. ?osc=up|down|mixed|clear. 'up'/'mixed' blocks a Sell entry, 'down'/'mixed' blocks a Buy;\n'clear' (or none) removes it. This is exactly what a live osc_1m..osc_4h alert would set.","operationId":"set_osc_api_cross_hedge_controllers__controller_id__set_osc_post","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}},{"name":"osc","in":"query","required":true,"schema":{"type":"string","title":"Osc"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cross-hedge-controllers/{controller_id}/set-exh-tier":{"post":{"summary":"Set Exh Tier","description":"Manually override the Trend-Exhaustion tier for TESTING. ?tier=0|1|2|3 (0=clear/resume). Optional\n?trend=Bullish|Bearish sets the tiring-trend direction (used for the Tier-3 counter-add). Tier 1 blocks\nentries/adds; Tier 2/3 hedge to net-0; 0 resumes. Sets last_exh_at=NOW() so it reads as FRESH.","operationId":"set_exh_tier_api_cross_hedge_controllers__controller_id__set_exh_tier_post","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}},{"name":"tier","in":"query","required":true,"schema":{"type":"integer","title":"Tier"}},{"name":"trend","in":"query","required":false,"schema":{"type":"string","title":"Trend"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbook/state":{"get":{"summary":"Get Workbook State","description":"All of this student's workbook stores + their server revs, for first load on a new device.","operationId":"get_workbook_state_api_workbook_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Workbook State Api Workbook State Get"}}}}}},"post":{"summary":"Set Workbook State","description":"Upsert one workbook store, guarded by rev. 409 (with the current value+rev) if the write is stale.","operationId":"set_workbook_state_api_workbook_state_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbookKVIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Workbook State Api Workbook State Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbook/submission":{"post":{"summary":"Record Submission","description":"Record that the student submitted a module (drives the instructor 'who's behind' view AND the\ngradebook). Stores the answer text + chart links so the instructor can read the work in-app.\nIndependent of GHL — fires whether or not a webhook is configured. Latest-only: a resubmit overwrites.\nReturns the server `submitted_at` and confirms receipt to the student (in-app push + email), so the\nstudent gets a real 'received' acknowledgement — not just an optimistic client-side flash.","operationId":"record_submission_api_workbook_submission_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Record Submission Api Workbook Submission Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workbook/submissions":{"get":{"summary":"My Submissions","description":"The signed-in student's OWN submission timestamps per module, so the Workbook can show a persisted\n'Submitted <date> — received ✓' badge that survives a reload (not just the transient flash).","operationId":"my_submissions_api_workbook_submissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response My Submissions Api Workbook Submissions Get"}}}}}}},"/api/workbook/feedback":{"get":{"summary":"Get My Feedback","description":"All instructor feedback for the signed-in student, newest first. Drives the HOMEWORK-tab reply\npanel + the unread badge.","operationId":"get_my_feedback_api_workbook_feedback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get My Feedback Api Workbook Feedback Get"}}}}}}},"/api/workbook/feedback/read":{"post":{"summary":"Mark Feedback Read","description":"Student opened their feedback — clear the unread badge for that module.","operationId":"mark_feedback_read_api_workbook_feedback_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackReadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Mark Feedback Read Api Workbook Feedback Read Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/summary":{"get":{"summary":"Instructor Summary","description":"Cohort progress, most-behind first — INCLUDING enrolled students who've submitted nothing\n(they sort to the top). Admin only.","operationId":"instructor_summary_api_admin_workbook_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/workbook/student":{"get":{"summary":"Instructor Student Detail","description":"Every module one student has submitted (newest first), with a graded/ungraded flag — the\ndrill-down list behind a roster row. Admin only.","operationId":"instructor_student_detail_api_admin_workbook_student_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/answers":{"get":{"summary":"Instructor View Answers","description":"One student's submitted answers + chart links for one module, plus any feedback already left.\nThis is the grading pane. Admin only.","operationId":"instructor_view_answers_api_admin_workbook_answers_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"module","in":"query","required":true,"schema":{"type":"string","title":"Module"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/lookup":{"get":{"summary":"Admin Student Lookup","description":"Read-only support tool. Given a user_id OR an email, show where a student's homework and trading\ndata actually live — including work saved under a DIFFERENT user_id for the same email (the\nidentity-mismatch case a \"my data is gone\" ticket usually turns out to be). NEVER writes anything.\nAdmin only.","operationId":"admin_student_lookup_api_admin_workbook_lookup_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Student Lookup Api Admin Workbook Lookup Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/feedback":{"post":{"summary":"Instructor Send Feedback","description":"Save (upsert, latest-only) the instructor's feedback for a student's module, then notify the\nstudent in-app (badge on their HOMEWORK tab) and by email. Admin only.","operationId":"instructor_send_feedback_api_admin_workbook_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Instructor Send Feedback Api Admin Workbook Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/ai-feedback":{"post":{"summary":"Instructor Ai Feedback","description":"Draft instructor feedback for one student's submitted module. Admin only. Reads the student's\nACTUAL submitted answers + chart links from the DB (source of truth), grades them against the drill\nanswer keys (private rubric, sent by the UI) and the attached charts (Claude vision), and returns an\neditable draft. Does NOT send anything to the student and never returns the answer keys.","operationId":"instructor_ai_feedback_api_admin_workbook_ai_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIFeedbackIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Instructor Ai Feedback Api Admin Workbook Ai Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/students":{"get":{"summary":"List Students","description":"Roster for the Homework Inbox. scope='all' → EVERY user (same source as the Users tab), each with\ntheir submitted/needs-review status + advisor, so the list is never empty or stale. scope='mine' →\nonly students assigned to me. Actionable rows (work to review) and designated students sort first.","operationId":"list_students_api_admin_students_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Designate Student","description":"Mark a user as a current student (idempotent). Optionally assign an advisor at the same time.","operationId":"designate_student_api_admin_students_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Designate Student Api Admin Students Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/students/needs-review-count":{"get":{"summary":"Needs Review Count","description":"Total submissions with no feedback yet — drives the badge on the Homework tab. scope='mine'\ncounts only students assigned to me.","operationId":"needs_review_count_api_admin_students_needs_review_count_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/students/candidates":{"get":{"summary":"Student Candidates","description":"Search all users (by email/name) for the 'designate as student' picker.","operationId":"student_candidates_api_admin_students_candidates_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/advisors":{"get":{"summary":"List Advisors","description":"Admin/dev users a student can be assigned to (the 'assign to' dropdown).","operationId":"list_advisors_api_admin_advisors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/students/{student_id}/remove":{"post":{"summary":"Remove Student","description":"Remove the current-student designation (they keep lifetime course access; they're just no longer\nan active student). Does NOT delete their submitted work or feedback.","operationId":"remove_student_api_admin_students__student_id__remove_post","parameters":[{"name":"student_id","in":"path","required":true,"schema":{"type":"string","title":"Student Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Remove Student Api Admin Students  Student Id  Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/students/{student_id}/advisor":{"post":{"summary":"Assign Advisor","description":"Assign (or clear) the admin/dev who owns this student. Designates them if not already.","operationId":"assign_advisor_api_admin_students__student_id__advisor_post","parameters":[{"name":"student_id","in":"path","required":true,"schema":{"type":"string","title":"Student Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Assign Advisor Api Admin Students  Student Id  Advisor Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/backfill":{"post":{"summary":"Backfill Answers","description":"One-shot recovery: for every submission missing answer text, pull the student's saved answers out\nof their autosave (workbook_kv 'kcxwb:hw' + chart links 'kcxwb:charts') and fill the submission, so\nthe instructor sees existing work without anyone re-submitting. Admin only.","operationId":"backfill_answers_api_admin_workbook_backfill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Backfill Answers Api Admin Workbook Backfill Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workbook/saved":{"post":{"summary":"Instructor Saved Work","description":"Read a student's AUTOSAVED workbook (kcxwb:hw + chart links) — work they may never have SUBMITTED —\norganized by module via the content map, plus their self-entered name/email (kcxwb:student). This is\nhow the instructor sees homework a student did but didn't submit. READ-ONLY: writes nothing. Admin only.","operationId":"instructor_saved_work_api_admin_workbook_saved_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedWorkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket":{"post":{"tags":["TV Ticket"],"summary":"Tv Ticket","description":"Execute a trade from a TradingView KCX Trade Ticket alert. Token-authed; per-user.","operationId":"tv_ticket_api_tv_ticket_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/positions":{"get":{"tags":["TV Ticket"],"summary":"Token Positions","description":"Token-authed: open positions across ALL of the user's accounts (each tagged with its account),\nso the panel shows every open position regardless of which account is picked for new orders. Reads\nonly already-live connections (engine-cached, enriched; else a warm connection) — never cold-connects.\n`account_id` is accepted for backward compatibility but no longer filters the list.","operationId":"token_positions_api_tv_ticket_positions_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/latest":{"get":{"tags":["TV Ticket"],"summary":"Latest Staged","description":"Token-authed read: the latest pending staged ticket for this token, so the Chrome extension\ncan auto-fill its Entry/SL/TP/lots boxes from the chart's last alert fire (once per bar).","operationId":"latest_staged_api_tv_ticket_latest_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/options":{"get":{"tags":["TV Ticket"],"summary":"Token Options","description":"Token-authed: the user's accounts + presets + SL strategies + the symbol list. Symbols come from\nthe CONNECTED BROKER for the chosen account (or the token's default) when a warm connection exists\n(correct prefixes/suffixes/names); otherwise the curated fallback so the picker works before connect.\nOne token can trade ANY of the user's accounts — the account picker just sets which one.","operationId":"token_options_api_tv_ticket_options_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/warm":{"get":{"tags":["TV Ticket"],"summary":"Token Warm","description":"Token-authed: pre-warm the broker connection AND (if a symbol is given) pre-subscribe that\nsymbol's price feed, so the next Buy/Sell fires without a cold-connect OR a subscribe+first-price\ndelay. Establishes the same connection a trade would use. Safe to call on panel load, on symbol\nchange, and on an interval; places no order.","operationId":"token_warm_api_tv_ticket_warm_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pnl_alerts":{"get":{"summary":"Get Pnl Alerts","operationId":"get_pnl_alerts_api_pnl_alerts_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set Pnl Alerts","operationId":"set_pnl_alerts_api_pnl_alerts_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stack-recovery/pip-dollars":{"get":{"summary":"Pip Dollars Estimate","description":"Live pips→$ estimate for the drawdown-trigger field. Pure per-symbol contract math (no live\naccount needed for known symbols). Returns ok=false with a reason when it can't compute (missing\nlots/symbol) so the UI can prompt the user. `lots` is a SAMPLE size — actual $ scales with the\nlive tilt lots.","operationId":"pip_dollars_estimate_api_stack_recovery_pip_dollars_get","parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string","title":"Symbol"}},{"name":"pips","in":"query","required":true,"schema":{"type":"number","title":"Pips"}},{"name":"lots","in":"query","required":true,"schema":{"type":"number","title":"Lots"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stack-recovery-strategies":{"get":{"summary":"List Strategies","operationId":"list_strategies_api_stack_recovery_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Strategy","operationId":"create_strategy_api_stack_recovery_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackRecoveryCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stack-recovery-strategies/{strategy_id}":{"put":{"summary":"Update Strategy","operationId":"update_strategy_api_stack_recovery_strategies__strategy_id__put","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackRecoveryCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Strategy","operationId":"delete_strategy_api_stack_recovery_strategies__strategy_id__delete","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stack-recovery-strategies/{strategy_id}/clone":{"post":{"summary":"Clone Strategy","description":"Clone a public (global) or own strategy into the user's private library.","operationId":"clone_strategy_api_stack_recovery_strategies__strategy_id__clone_post","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recovery-event-log":{"get":{"summary":"Get Recovery Event Log","description":"Return recent hedge-recovery events for analysis (most recent first).\n\nOne row per transaction: hedge adopt, stack_added, roll, catastrophe,\ntsl_close, recovery_complete, etc. Written by app.libs.hedge_recovery.log_event.\nFilter by account_id (meta-api id), recovery_group_id, or parent_position_id.","operationId":"get_recovery_event_log_api_recovery_event_log_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"recovery_group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Group Id"}},{"name":"parent_position_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Position Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recovery-analytics":{"get":{"summary":"Get Recovery Analytics","description":"Aggregate recovery + rebalance performance over the last `days` for the Recovery Analytics\nreport. Reads recovery_groups (lifecycle/outcomes) and recovery_event_log (rb_bank, stack_added,\nnet_lot_snapshot, …). Optional account_id filter (meta-api id).\n\nReturns: outcomes (recovered/failed/active + rate), timing (time-to-recover), realized $,\nrebalance (RB banked $ + count — the rebalancer's gross profit contribution), exposure\n(avg |net-lot| + % time delta-neutral, from the net_lot snapshots), per-event aggregates, and a\nrecent per-group table. NOTE: RB *loss-side* (balance legs closed underwater with the group) is\nnot separately tagged yet, so 'rb_net_banked' is the gross banked, not banked-minus-loss.","operationId":"get_recovery_analytics_api_recovery_analytics_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/precourse/quiz":{"get":{"summary":"Get Quiz","operationId":"get_quiz_api_precourse_quiz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/precourse/quiz/submit":{"post":{"summary":"Submit Quiz","operationId":"submit_quiz_api_precourse_quiz_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/precourse/admin/list":{"get":{"summary":"Admin List","operationId":"admin_list_api_precourse_admin_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/precourse/admin/override":{"post":{"summary":"Admin Override","description":"Unlock the modules for a student who didn't pass. No retake required.","operationId":"admin_override_api_precourse_admin_override_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-lab/signals":{"get":{"tags":["strategy-lab"],"summary":"Strategy Lab Signals","operationId":"strategy_lab_signals","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Days"}},{"name":"modes","in":"query","required":false,"schema":{"type":"string","default":"Scalp,Intraday,Interday","title":"Modes"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":2000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-lab/signal-match":{"get":{"tags":["strategy-lab"],"summary":"Strategy Lab Signal Match","description":"HARNESS 1 — signal-port validation. Auto-compares the Python Pine port's GENERATED entries\nagainst the RECORDED Quant-Signals entries (the `signals` table, i.e. what TradingView actually\nsent) over the same window, and returns recall/precision per mode. High recall = the port isn't\nmissing signals; high precision = it isn't inventing them. This is the trust gate before acting on\nany backtest ranking. Read-only, gated by ?secret=BT_DIAG_SECRET (paste-a-URL, like /admin/diag/*).","operationId":"strategy_lab_signal_match","parameters":[{"name":"secret","in":"query","required":true,"schema":{"type":"string","title":"Secret"}},{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Days"}},{"name":"modes","in":"query","required":false,"schema":{"type":"string","default":"Scalp,Intraday,Interday","title":"Modes"}},{"name":"tol_bars","in":"query","required":false,"schema":{"type":"number","default":2.0,"title":"Tol Bars"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategy-lab/recovery-actuals":{"get":{"tags":["strategy-lab"],"summary":"Strategy Lab Recovery Actuals","description":"HARNESS 2 — real closed-recovery-group outcomes from recovery_event_log, so the backtest's\npredicted recovery rate / net can be checked against reality. A group counts as RECOVERED if it\nlogged a completion event (recovery_complete / equity_target_complete / account_target_complete)\nand never realized a loss; a LOSS group logged realized_pnl<0 or a catastrophe. Compare the\n`recovered_rate` + `mean_net` here against the sim's aggregate (surface sweep / walk-forward) over\nthe same window — close agreement = the sim is trustworthy. Read-only, gated by\n?secret=BT_DIAG_SECRET (paste-a-URL, like /admin/diag/*).","operationId":"strategy_lab_recovery_actuals","parameters":[{"name":"secret","in":"query","required":true,"schema":{"type":"string","title":"Secret"}},{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/keys":{"get":{"tags":["TV Ticket Keys"],"summary":"List Tokens","description":"List the caller's tokens (masked — the full value is only shown at creation).","operationId":"list_tokens_api_tv_ticket_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["TV Ticket Keys"],"summary":"Create Token","description":"Generate a new webhook token (shown in FULL once). Dev/admin only during pilot.","operationId":"create_token_api_tv_ticket_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/keys/{token}/defaults":{"post":{"tags":["TV Ticket Keys"],"summary":"Set Token Defaults","description":"Bind a preset / SL strategy / calc style to a token — the extension's fires inherit these.","operationId":"set_token_defaults_api_tv_ticket_keys__token__defaults_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDefaultsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/keys/{token}/revoke":{"post":{"tags":["TV Ticket Keys"],"summary":"Revoke Token","description":"Revoke one of the caller's tokens.","operationId":"revoke_token_api_tv_ticket_keys__token__revoke_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/keys/{token}":{"delete":{"tags":["TV Ticket Keys"],"summary":"Delete Token","description":"Permanently DELETE one of the caller's tokens (e.g. clean up revoked ones). Irreversible.","operationId":"delete_token_api_tv_ticket_keys__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/keys/{token}/account":{"post":{"tags":["TV Ticket Keys"],"summary":"Set Default Account","description":"Bind (or change) the default trading account this token executes on.","operationId":"set_default_account_api_tv_ticket_keys__token__account_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/execute-due-trades":{"post":{"summary":"Execute Due Trades","operationId":"execute_due_trades22","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/verdict_diag":{"get":{"tags":["Signals"],"summary":"Verdict Diag Open","description":"OPEN diagnostic (this router is disableAuth) — market state only, no account data. Lets us see\nat a glance whether the KCX Controllers heartbeat is landing (latest_verdicts populated) and what\nthe live controller tables hold for the symbol, WITHOUT needing an authenticated token.","operationId":"verdict_diag_open_api_verdict_diag_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingest_health":{"get":{"tags":["Signals"],"summary":"Ingest Health","description":"OPEN diagnostic — when did each KCX Method Controller alert type last LAND on the server?\nOne URL to confirm TradingView webhooks are arriving. Market state only, no account data.\n  • signals_24h — last-received + count per indicator (KCX Method entries, KCX Setup Radar, …).\n    NOTE: the S/R feed and the Controllers heartbeat EARLY-RETURN before the signals INSERT, so\n    they are reported separately below, not in signals_24h.\n  • controllers_heartbeat_last — freshness of the KCX Controllers 2m heartbeat (via latest_verdicts).\n  • sr_feed — the 15s S/R + pillar feed per timeframe, with age in seconds (in-memory; if the app\n    runs multiple workers this reflects the worker that answered).","operationId":"ingest_health_api_ingest_health_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forex_calendar":{"get":{"tags":["Signals"],"summary":"Forex Calendar","description":"This week's economic calendar for the Pre-Flight Checklist news section. Tries ForexFactory's\npublic JSON feed first, then TradingView's calendar API (normalized to the same shape), and caches\nwhichever works ~15 min (stale-on-error). OPEN — market data only.","operationId":"forex_calendar_api_forex_calendar_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/receive_signal":{"post":{"tags":["Signals"],"summary":"Receive Signal","description":"Receives a webhook from TradingView and inserts the signal into the database.\nRequires TRADINGVIEW_WEBHOOK_SECRET to be set in environment and passed via 'secret' query parameter.","operationId":"receive_signal_api_receive_signal_post","parameters":[{"name":"secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signals":{"get":{"tags":["Signals"],"summary":"Get Ranked Signals","operationId":"get_ranked_signals_api_signals_get","parameters":[{"name":"limit_per_type","in":"query","required":false,"schema":{"type":"integer","default":2,"title":"Limit Per Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Signal"},"title":"Response Get Ranked Signals Api Signals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signals/farm-health":{"get":{"tags":["Signals"],"summary":"Get Farm Health","description":"Alert-farm liveness per clock (KCX Signal Scoping Addendum — heartbeat farm monitoring).\n\nEach of the four trigger instances (M1/M5/H1/H4) and the 1m master now stamp Timeframe on their\nheartbeats, so we can surface a dead instance: \"if the app stops seeing a heartbeat from 60, the\nH1 alert is dead.\" Returns per trigger-mode the newest signal time and a `stale` flag. Market\nstate only — never account data.","operationId":"get_farm_health_api_signals_farm_health_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"stale_minutes","in":"query","required":false,"schema":{"type":"integer","default":120,"title":"Stale Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signals/history":{"get":{"tags":["Signals"],"summary":"Get Signal History","operationId":"get_signal_history_api_signals_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Signal"},"type":"array","title":"Response Get Signal History Api Signals History Get"}}}}}}},"/api/signals/indicators":{"get":{"tags":["Signals"],"summary":"Get Available Indicators","operationId":"get_available_indicators","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableIndicatorsResponse"}}}}}}},"/api/automation_settings":{"get":{"tags":["Signals"],"summary":"List Automation Settings","operationId":"list_automation_settings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AutomationSetting"},"type":"array","title":"Response List Automation Settings"}}}}}},"post":{"tags":["Signals"],"summary":"Create Automation Setting","operationId":"create_automation_setting","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationSettingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationSetting"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automation_settings/{setting_id}":{"put":{"tags":["Signals"],"summary":"Update Automation Setting","operationId":"update_automation_setting","parameters":[{"name":"setting_id","in":"path","required":true,"schema":{"type":"string","title":"Setting Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationSettingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationSetting"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Signals"],"summary":"Delete Automation Setting","operationId":"delete_automation_setting","parameters":[{"name":"setting_id","in":"path","required":true,"schema":{"type":"string","title":"Setting Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/automation_settings/{setting_id}/test":{"post":{"tags":["Signals"],"summary":"Test Automation Setting","description":"Triggers a test trade for a specific automation setting.","operationId":"test_automation_setting","parameters":[{"name":"setting_id","in":"path","required":true,"schema":{"type":"string","title":"Setting Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resource-items":{"get":{"summary":"List Resource Items","description":"Published resource items THIS user is entitled to see, in display order:\n  - visibility='public'    → everyone;\n  - visibility='indicator' → only if the user owns the `required_indicator` entitlement;\n  - visibility='admin'     → only Admin / Developer roles (can_manage_global).\nAdmin/Dev see every published row. Gating is server-side — a browser never receives a row the\nuser isn't entitled to.","operationId":"list_resource_items_api_resource_items_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceRow"},"type":"array","title":"Response List Resource Items Api Resource Items Get"}}}}}},"post":{"summary":"Create Resource Item","operationId":"create_resource_item_api_resource_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resource-indicator-options":{"get":{"summary":"Resource Indicator Options","description":"The canonical indicator names (TV_PINE_IDS keys) an admin can gate a guide to. Admin/dev only.\nThese match the `indicator` entitlement values exactly, so the picklist can't drift into typos.","operationId":"resource_indicator_options_api_resource_indicator_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Resource Indicator Options Api Resource Indicator Options Get"}}}}}}},"/api/resource-items/manage":{"get":{"summary":"List Resource Items Manage","description":"Every resource item incl. unpublished — admin/dev only.","operationId":"list_resource_items_manage_api_resource_items_manage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResourceRow"},"type":"array","title":"Response List Resource Items Manage Api Resource Items Manage Get"}}}}}}},"/api/resource-items/{db_id}":{"put":{"summary":"Update Resource Item","operationId":"update_resource_item_api_resource_items__db_id__put","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourcePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Resource Item","operationId":"delete_resource_item_api_resource_items__db_id__delete","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resource-layout":{"get":{"summary":"Get Resource Layout","operationId":"get_resource_layout_api_resource_layout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceLayout"}}}}}},"put":{"summary":"Put Resource Layout","operationId":"put_resource_layout_api_resource_layout_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceLayout"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceLayout"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/handout-items":{"get":{"summary":"List Handout Items","description":"Published weekly handouts. Available to any authenticated user (Workbook HANDOUTS tab).","operationId":"list_handout_items_api_handout_items_get","parameters":[{"name":"course","in":"query","required":false,"schema":{"type":"string","default":"verdict","title":"Course"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HandoutRow"},"title":"Response List Handout Items Api Handout Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Handout Item","operationId":"create_handout_item_api_handout_items_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoutIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoutRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/handout-items/manage":{"get":{"summary":"List Handout Items Manage","operationId":"list_handout_items_manage_api_handout_items_manage_get","parameters":[{"name":"course","in":"query","required":false,"schema":{"type":"string","default":"verdict","title":"Course"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HandoutRow"},"title":"Response List Handout Items Manage Api Handout Items Manage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/handout-items/{db_id}":{"put":{"summary":"Update Handout Item","operationId":"update_handout_item_api_handout_items__db_id__put","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoutPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoutRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Handout Item","operationId":"delete_handout_item_api_handout_items__db_id__delete","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lecture-items":{"get":{"summary":"List Lecture Items","description":"Published lectures for the Learn → LECTURES tab. Any authenticated user. `cohort` '' = current.","operationId":"list_lecture_items_api_lecture_items_get","parameters":[{"name":"course","in":"query","required":false,"schema":{"type":"string","default":"verdict","title":"Course"}},{"name":"cohort","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cohort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LectureRow"},"title":"Response List Lecture Items Api Lecture Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Lecture Item","operationId":"create_lecture_item_api_lecture_items_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LectureIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LectureRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lecture-items/manage":{"get":{"summary":"List Lecture Items Manage","operationId":"list_lecture_items_manage_api_lecture_items_manage_get","parameters":[{"name":"course","in":"query","required":false,"schema":{"type":"string","default":"verdict","title":"Course"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LectureRow"},"title":"Response List Lecture Items Manage Api Lecture Items Manage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lecture-items/{db_id}":{"put":{"summary":"Update Lecture Item","operationId":"update_lecture_item_api_lecture_items__db_id__put","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LecturePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LectureRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Lecture Item","operationId":"delete_lecture_item_api_lecture_items__db_id__delete","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lecture-items/cohorts":{"get":{"summary":"List Lecture Cohorts","description":"Names of past cohorts that have published recordings for this course (newest name last).","operationId":"list_lecture_cohorts_api_lecture_items_cohorts_get","parameters":[{"name":"course","in":"query","required":false,"schema":{"type":"string","default":"verdict","title":"Course"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response List Lecture Cohorts Api Lecture Items Cohorts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lecture-items/{db_id}/play":{"get":{"summary":"Play Lecture Item","operationId":"play_lecture_item_api_lecture_items__db_id__play_get","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"lecture","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lecture-items/upload-url":{"post":{"summary":"Lecture Upload Url","operationId":"lecture_upload_url_api_lecture_items_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audiobook-items":{"get":{"summary":"List Audiobook Items","description":"Published chapters that have a URL — the player's chapter list. Any authenticated user.","operationId":"list_audiobook_items_api_audiobook_items_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AudioRow"},"type":"array","title":"Response List Audiobook Items Api Audiobook Items Get"}}}}}},"post":{"summary":"Create Audiobook Item","operationId":"create_audiobook_item_api_audiobook_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audiobook-items/manage":{"get":{"summary":"List Audiobook Items Manage","operationId":"list_audiobook_items_manage_api_audiobook_items_manage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AudioRow"},"type":"array","title":"Response List Audiobook Items Manage Api Audiobook Items Manage Get"}}}}}}},"/api/audiobook-items/{db_id}":{"put":{"summary":"Update Audiobook Item","operationId":"update_audiobook_item_api_audiobook_items__db_id__put","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Audiobook Item","operationId":"delete_audiobook_item_api_audiobook_items__db_id__delete","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/ops-health":{"get":{"summary":"Ops Health","operationId":"ops_health_api_admin_ops_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trading-accounts/brokers":{"get":{"tags":["Trading Accounts"],"summary":"List Brokers","description":"Enabled brokers for the account form: name, platform, and live/demo MetaApi server names.","operationId":"list_brokers_api_trading_accounts_brokers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trading-accounts/admin/brokers":{"get":{"tags":["Trading Accounts"],"summary":"Admin List Brokers","operationId":"admin_list_brokers_api_trading_accounts_admin_brokers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Trading Accounts"],"summary":"Admin Upsert Broker","operationId":"admin_upsert_broker_api_trading_accounts_admin_brokers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/admin/brokers/{name}":{"delete":{"tags":["Trading Accounts"],"summary":"Admin Delete Broker","operationId":"admin_delete_broker_api_trading_accounts_admin_brokers__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/live-info":{"get":{"tags":["Trading Accounts"],"summary":"Get Accounts Live Info","description":"Lightweight live balance/equity for the user's accounts, read from the\nstrategy engine's ALREADY-cached connections (manager.connections) — no new\nbroker connections or MetaAPI fetches, so it is cheap enough for the Live\nSignals \"Trading Status\" panel to poll on its 15s cadence. Accounts without a\nwarm connection return connected=false with null figures.","operationId":"get_accounts_live_info","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AccountLiveInfo"},"type":"array","title":"Response Get Accounts Live Info"}}}}}}},"/api/trading-accounts/recovery/acknowledge-held":{"post":{"tags":["Trading Accounts"],"summary":"Acknowledge Held Recovery","description":"Acknowledge HELD recovery notifications — pauses the 10-minute held reminders for the\ncaller's currently-held groups. Reminders resume only if a NEW held episode begins; taking\nover or closing the position stops them on its own. Scope to one account via account_id (the\nuser clicked that account's HELD badge). Idempotent.","operationId":"acknowledge_held_recovery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeHeldRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts":{"get":{"tags":["Trading Accounts"],"summary":"List Trading Accounts","operationId":"list_trading_accounts_api_trading_accounts_trading_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TradingAccount"},"type":"array","title":"Response List Trading Accounts Api Trading Accounts Trading Accounts Get"}}}}}},"post":{"tags":["Trading Accounts"],"summary":"Create Trading Account","operationId":"create_trading_account_api_trading_accounts_trading_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingAccountCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingAccount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/debug-create":{"post":{"tags":["Trading Accounts"],"summary":"Debug Create Body","description":"Debug endpoint to log raw request body for account creation troubleshooting.","operationId":"debug_create_body_api_trading_accounts_trading_accounts_debug_create_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}":{"put":{"tags":["Trading Accounts"],"summary":"Update Trading Account","description":"Update a trading account's name, password, and/or demo status.","operationId":"update_trading_account_api_trading_accounts_trading_accounts__account_id__put","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingAccount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Trading Accounts"],"summary":"Delete Trading Account","operationId":"delete_trading_account_api_trading_accounts_trading_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}/direct-live/{action}":{"post":{"tags":["Trading Accounts"],"summary":"Direct Live Gate Action","description":"Live-account gate for the direct connection: approve (admin/dev), confirm (owner), revoke (either).","operationId":"direct_live_gate_action_api_trading_accounts_trading_accounts__account_id__direct_live__action__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}/direct-password":{"post":{"tags":["Trading Accounts"],"summary":"Save Direct Password","description":"Store the MT5 password (encrypted) for the direct connection only. MetaApi is not touched.","operationId":"save_direct_password_api_trading_accounts_trading_accounts__account_id__direct_password_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectPasswordIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}/prop-firm":{"post":{"tags":["Trading Accounts"],"summary":"Set Prop Firm","description":"Label only: marks the owner's account as a prop firm account (DEMO / PROP FIRM / LIVE badge).","operationId":"set_prop_firm_api_trading_accounts_trading_accounts__account_id__prop_firm_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectEnabledIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}/direct-enabled":{"post":{"tags":["Trading Accounts"],"summary":"Set Direct Enabled","description":"The account's \"Trade through\" switch: Direct (the worker, MetaApi only as backup) or MetaAPI. Covers manual\ntrades, their management and the account's Direct automations.","operationId":"set_direct_enabled_api_trading_accounts_trading_accounts__account_id__direct_enabled_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectEnabledIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}/direct-resume":{"post":{"tags":["Trading Accounts"],"summary":"Resume Direct","description":"End a MetaAPI failover now: trades route through Direct again. The worker fails over again only after\nFAILOVER_AFTER fresh broker-connection failures, and undeploys the backup itself after a few good passes.","operationId":"resume_direct_api_trading_accounts_trading_accounts__account_id__direct_resume_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/deploy":{"post":{"tags":["Trading Accounts"],"summary":"Deploy Trading Account","operationId":"deploy_trading_account_api_trading_accounts_trading_accounts_deploy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/trading-accounts/undeploy":{"post":{"tags":["Trading Accounts"],"summary":"Undeploy Trading Account","operationId":"undeploy_trading_account_api_trading_accounts_trading_accounts_undeploy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading-accounts/admin/reconcile":{"post":{"tags":["Trading Accounts"],"summary":"Admin Reconcile","description":"Manual trigger for account reconciliation. Admin only.","operationId":"admin_reconcile_api_trading_accounts_admin_reconcile_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trading-accounts/admin/backfill-metadata":{"post":{"tags":["Trading Accounts"],"summary":"Admin Backfill Metadata","description":"Admin endpoint — sets original_user_id metadata on MetaAPI accounts that are\nmissing it. Iterates over all trading_accounts rows that have a meta_api_account_id\nset, fetches the MetaAPI account, and updates its metadata if original_user_id\nis absent. This makes reconciliation and startup connection work correctly for\naccounts that were added manually without going through the normal create flow.","operationId":"admin_backfill_metadata_api_trading_accounts_admin_backfill_metadata_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trading-accounts/trading-accounts/{account_id}/sync-history":{"post":{"tags":["Trading Accounts"],"summary":"Sync Historical Trades","description":"Connect to MetaAPI and fetch historical deals for the given account.\nReconstructs positions from deals and upserts them into the database \nso they appear accurately in the Analytics dashboard.","operationId":"sync_historical_trades_api_trading_accounts_trading_accounts__account_id__sync_history_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":365,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lesson-video/stream-token":{"get":{"summary":"Get Stream Token","operationId":"get_stream_token_api_lesson_video_stream_token_get","parameters":[{"name":"uid","in":"query","required":true,"schema":{"type":"string","description":"Cloudflare Stream video UID","title":"Uid"},"description":"Cloudflare Stream video UID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lesson-videos":{"get":{"summary":"List Lesson Videos","description":"Published course videos, in display order. Available to any authenticated user (the Learn page).","operationId":"list_lesson_videos_api_lesson_videos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LessonVideoRow"},"type":"array","title":"Response List Lesson Videos Api Lesson Videos Get"}}}}}},"post":{"summary":"Create Lesson Video","operationId":"create_lesson_video_api_lesson_videos_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonVideoIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonVideoRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lesson-videos/manage":{"get":{"summary":"List Lesson Videos Manage","description":"Every course video incl. unpublished — admin/dev only (the Talia Studio library manager).","operationId":"list_lesson_videos_manage_api_lesson_videos_manage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LessonVideoRow"},"type":"array","title":"Response List Lesson Videos Manage Api Lesson Videos Manage Get"}}}}}}},"/api/lesson-videos/{db_id}":{"put":{"summary":"Update Lesson Video","operationId":"update_lesson_video_api_lesson_videos__db_id__put","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonVideoPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonVideoRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Lesson Video","operationId":"delete_lesson_video_api_lesson_videos__db_id__delete","parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/preset-recommendations":{"get":{"summary":"Get Recommendations","operationId":"get_recommendations_api_preset_recommendations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Recommendations Api Preset Recommendations Get"}}}}}},"put":{"summary":"Save Recommendations","operationId":"save_recommendations_api_preset_recommendations_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/Recommendation"},"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Save Recommendations Api Preset Recommendations Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/preset-recommendations/lab":{"get":{"summary":"Get Lab Results","description":"The last Strategy Lab \"Setup × preset\" run, for the admin's \"Fill from Strategy Lab\" button.","operationId":"get_lab_results_api_preset_recommendations_lab_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Lab Results Api Preset Recommendations Lab Get"}}}}}}},"/api/talia/weekly-review":{"get":{"summary":"Get Weekly Review","operationId":"get_weekly_review_api_talia_weekly_review_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Weekly Review Api Talia Weekly Review Get"}}}}}}},"/api/talia/weekly-review/prefs":{"put":{"summary":"Set Weekly Review Prefs","operationId":"set_weekly_review_prefs_api_talia_weekly_review_prefs_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__apis__talia_review__PrefsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Weekly Review Prefs Api Talia Weekly Review Prefs Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/talia/weekly-review/now":{"post":{"summary":"Weekly Review Now","description":"Write this week's review now (in the app only; no email). Once a day.","operationId":"weekly_review_now_api_talia_weekly_review_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Weekly Review Now Api Talia Weekly Review Now Post"}}}}}}},"/api/admin/talia/weekly-review/run":{"post":{"summary":"Run Weekly Reviews","operationId":"run_weekly_reviews_api_admin_talia_weekly_review_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Weekly Reviews Api Admin Talia Weekly Review Run Post"}}}}}}},"/api/position-stacking-strategies":{"get":{"summary":"List Position Stacking Strategies","operationId":"list_position_stacking_strategies_api_position_stacking_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PositionStackingStrategy"},"type":"array","title":"Response List Position Stacking Strategies Api Position Stacking Strategies Get"}}}}}},"post":{"summary":"Create Position Stacking Strategy","operationId":"create_position_stacking_strategy_api_position_stacking_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionStackingStrategyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionStackingStrategy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/position-stacking-strategies/{strategy_id}":{"put":{"summary":"Update Position Stacking Strategy","operationId":"update_position_stacking_strategy_api_position_stacking_strategies__strategy_id__put","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionStackingStrategyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionStackingStrategy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Position Stacking Strategy","operationId":"delete_position_stacking_strategy_api_position_stacking_strategies__strategy_id__delete","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/volatility-planner":{"get":{"tags":["volatility-planner"],"summary":"Get Volatility Planner","description":"30m bars ([epoch_ms, open, high, low, close]) for the last `weeks` (1-12) weeks of `symbol`.","operationId":"get_volatility_planner","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Weeks"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/risk-settings/list":{"get":{"summary":"List Risk Settings","description":"List all risk settings for the authenticated user.","operationId":"list_risk_settings_api_risk_settings_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskSettingResponse"},"type":"array","title":"Response List Risk Settings Api Risk Settings List Get"}}}}}}},"/api/risk-settings/create":{"post":{"summary":"Create Risk Setting","description":"Create a new risk setting. Also creates the initial risk_state row.","operationId":"create_risk_setting_api_risk_settings_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskSettingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskSettingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/risk-settings/update/{setting_id}":{"put":{"summary":"Update Risk Setting","description":"Update an existing risk setting.","operationId":"update_risk_setting_api_risk_settings_update__setting_id__put","parameters":[{"name":"setting_id","in":"path","required":true,"schema":{"type":"string","title":"Setting Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskSettingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskSettingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/risk-settings/delete/{setting_id}":{"delete":{"summary":"Delete Risk Setting","description":"Delete a risk setting and its associated risk_state (cascades).","operationId":"delete_risk_setting_api_risk_settings_delete__setting_id__delete","parameters":[{"name":"setting_id","in":"path","required":true,"schema":{"type":"string","title":"Setting Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/risk-settings/status":{"get":{"summary":"Get Risk Status","description":"Get all risk settings with their current state/lock status.","operationId":"get_risk_status_api_risk_settings_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskStatusListResponse"}}}}}}},"/api/replay-drills/round":{"get":{"summary":"Get Round","operationId":"get_round_api_replay_drills_round_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Round Api Replay Drills Round Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/replay-drills/answer":{"post":{"summary":"Answer","operationId":"answer_api_replay_drills_answer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Answer Api Replay Drills Answer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/replay-drills/fan/round":{"get":{"summary":"Fan Round","operationId":"fan_round_api_replay_drills_fan_round_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Fan Round Api Replay Drills Fan Round Get"}}}}}}},"/api/replay-drills/fan/answer":{"post":{"summary":"Fan Answer","operationId":"fan_answer_api_replay_drills_fan_answer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Fan Answer Api Replay Drills Fan Answer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/replay-drills/stats":{"get":{"summary":"Get Stats","operationId":"get_stats_api_replay_drills_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Stats Api Replay Drills Stats Get"}}}}}}},"/api/replay-drills/reset":{"post":{"summary":"Reset","operationId":"reset_api_replay_drills_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Api Replay Drills Reset Post"}}}}}}},"/api/replay-drills/sample":{"get":{"summary":"Get Sample","operationId":"get_sample_api_replay_drills_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Sample Api Replay Drills Sample Get"}}}}}}},"/api/replay-drills/sample/answer":{"post":{"summary":"Sample Answer","operationId":"sample_answer_api_replay_drills_sample_answer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sample Answer Api Replay Drills Sample Answer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/replay-drills/sample/lead":{"post":{"summary":"Sample Lead","operationId":"sample_lead_api_replay_drills_sample_lead_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sample Lead Api Replay Drills Sample Lead Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/staged":{"get":{"tags":["TV Ticket Panel"],"summary":"List Staged","description":"Pending staged tickets for the current user (newest first).","operationId":"list_staged_api_tv_ticket_staged_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tv_ticket/staged/{staged_id}/cancel":{"post":{"tags":["TV Ticket Panel"],"summary":"Cancel Staged","operationId":"cancel_staged_api_tv_ticket_staged__staged_id__cancel_post","parameters":[{"name":"staged_id","in":"path","required":true,"schema":{"type":"string","title":"Staged Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/staged/{staged_id}/execute":{"post":{"tags":["TV Ticket Panel"],"summary":"Execute Staged","description":"Confirm & fire a staged ticket. Available to all signed-in users (the Order Ticket replaces\nQuick Trade); auth is still required, and it only touches this user's own staged tickets/accounts.","operationId":"execute_staged_api_tv_ticket_staged__staged_id__execute_post","parameters":[{"name":"staged_id","in":"path","required":true,"schema":{"type":"string","title":"Staged Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/panel_execute":{"post":{"tags":["TV Ticket Panel"],"summary":"Panel Execute","description":"Direct Buy/Sell/close/cancel from the panel. Available to all signed-in users (the Order Ticket\nreplaces Quick Trade); auth is still required and it executes on the user's own account.","operationId":"panel_execute_api_tv_ticket_panel_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelTicket"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tv_ticket/sr_distance":{"post":{"tags":["TV Ticket Panel"],"summary":"Sr Distance","operationId":"sr_distance_api_tv_ticket_sr_distance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SrDistanceReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/help/faq":{"get":{"tags":["Help"],"summary":"Get Faq","description":"Return the FAQ knowledge base (metadata + entries) for the help panel. Entries for\ncurrently-disabled features (Stack Recovery / Bias / Cross Hedge) are filtered out.","operationId":"get_faq_api_help_faq_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/help/search":{"get":{"tags":["Help"],"summary":"Search Faq","description":"Semantic search over the FAQ. Returns top-k matching entries with scores.","operationId":"search_faq_api_help_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"user question / search text","title":"Q"},"description":"user question / search text"},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"number of results","default":5,"title":"K"},"description":"number of results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/help/chat":{"post":{"tags":["Help"],"summary":"Help Chat","description":"Grounded help chat: retrieve relevant FAQ entries, then answer from them.\nWorks extractively with no LLM key; uses Claude when ANTHROPIC_API_KEY +\nthe anthropic SDK are present. Returns the answer plus its sources.","operationId":"help_chat_api_help_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verdicts/latest":{"get":{"summary":"Get Latest Verdicts","description":"Newest verdict per mode for a symbol. Prefers the heartbeat-derived latest_verdicts (carries\nzone); falls back to deriving straight from the live controller tables when that's empty.","operationId":"get_latest_verdicts_api_verdicts_latest_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verdicts/diag":{"get":{"summary":"Verdict Diag","description":"Diagnostic for a stuck Verdict Board (market state only). Shows what the pipeline actually\nholds: the latest_verdicts rows AND the most recent inbound 'verdict' signals with their raw\npayload — so we can see whether verdict alerts are arriving and in what shape (nested Modes vs\nflattened top-level keys vs a renamed indicator).","operationId":"verdict_diag_api_verdicts_diag_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verdicts/state":{"get":{"summary":"Get Verdict State Internal","description":"Service-to-service market-state read for the isolated Kaycee assistant (FEATURE_STATE).\n\nKaycee runs as a separate service and has no Stack-Auth user JWT, so it authenticates with a\nshared secret (`Authorization: Bearer <APP_STATE_TOKEN>`) instead of AuthorizedUser. This is\nSAFE because the payload is MARKET STATE ONLY — the same verdicts the public dashboard shows,\nwith no account/position/order data of any kind. Disabled (503) unless APP_STATE_TOKEN is set,\nso it can never be accidentally left open.","operationId":"get_verdict_state_internal_api_verdicts_state_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/momentum/recipes":{"get":{"summary":"List Recipes","operationId":"list_recipes_api_momentum_recipes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/momentum/scorecard":{"get":{"summary":"Get Scorecard","description":"Each recipe's demo paper results against its 18-month study, with the demo accounts' real net $.","operationId":"get_scorecard_api_momentum_scorecard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/momentum/automation":{"get":{"summary":"Get Automation","description":"Every demo account's automation with a summary of its log, plus the demo accounts to pick from.","operationId":"get_automation_api_momentum_automation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Save Automation","operationId":"save_automation_api_momentum_automation_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/momentum/automation/{account_id}":{"delete":{"summary":"Delete Automation","description":"Remove one account's automation (its signal log is kept).","operationId":"delete_automation_api_momentum_automation__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/momentum/signals":{"get":{"summary":"List Signals","operationId":"list_signals_api_momentum_signals_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/momentum/scan":{"post":{"summary":"Scan","operationId":"scan_api_momentum_scan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/trade-coach":{"get":{"summary":"Trade Coach Reports","operationId":"trade_coach_reports_api_admin_trade_coach_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trade Coach Reports Api Admin Trade Coach Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/trade-coach/run":{"post":{"summary":"Queue Trade Coach Run","operationId":"queue_trade_coach_run_api_admin_trade_coach_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Queue Trade Coach Run Api Admin Trade Coach Run Post"}}}}}}},"/api/market-prep":{"get":{"summary":"Get Market Prep","operationId":"get_market_prep_api_market_prep_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Market Prep Api Market Prep Get"}}}}}}},"/api/market-prep/prefs":{"put":{"summary":"Set Market Prep Prefs","operationId":"set_market_prep_prefs_api_market_prep_prefs_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__apis__market_prep__PrefsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Market Prep Prefs Api Market Prep Prefs Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/market-prep/public":{"get":{"summary":"Public Market Prep","description":"No login: the latest saved prep (facts + email HTML) for a GHL / Make weekly email to leads and trial users.","operationId":"public_market_prep_api_market_prep_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Public Market Prep Api Market Prep Public Get"}}}}}}},"/api/admin/market-prep/run":{"post":{"summary":"Run Market Prep","operationId":"run_market_prep_api_admin_market_prep_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Market Prep Api Admin Market Prep Run Post"}}}}}}},"/api/user_favorites":{"get":{"summary":"Get User Favorites","description":"The user's starred symbols, accounts and brokers (shown first in the Trading Terminal pickers).","operationId":"get_user_favorites_api_user_favorites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFavorites"}}}}}},"put":{"summary":"Set User Favorites","operationId":"set_user_favorites_api_user_favorites_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFavorites"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFavorites"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading_presets":{"get":{"summary":"List Trading Presets","operationId":"list_trading_presets_api_trading_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TradingPreset"},"type":"array","title":"Response List Trading Presets Api Trading Presets Get"}}}}}},"post":{"summary":"Create Trading Preset","operationId":"create_trading_preset_api_trading_presets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTradingPresetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading_presets/{preset_id}/star":{"post":{"summary":"Star Trading Preset","description":"Star a preset into THIS user's Quick Trade dropdown. Multiple presets may be starred\n(independent of the single is_default). Works for the user's own presets or any global preset.","operationId":"star_trading_preset_api_trading_presets__preset_id__star_post","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Unstar Trading Preset","operationId":"unstar_trading_preset_api_trading_presets__preset_id__star_delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading_presets/{preset_id}/duplicate":{"post":{"summary":"Duplicate Trading Preset","description":"Create a NEW preset owned by the caller, copying an existing one they can see. Serves both\nthe 'Duplicate' action on a user's own preset AND 'Add to my presets' on a GLOBAL preset — the\ncopy is always private (user-owned, is_global FALSE, is_default FALSE), so the source global is\nnever modified and the user gets an editable copy. Respects the tier preset limit. A cloned\npreset never carries a Stack Recovery link for a non-admin (recovery is admin/developer-only).","operationId":"duplicate_trading_preset_api_trading_presets__preset_id__duplicate_post","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/default_risk_settings":{"get":{"summary":"Get Default Risk Settings","description":"Part C: serve the user's saved defaults as a canonical `config.risk_settings` partial.\n\nThe backend is authoritative for a user's risk defaults (audit A8 / Part C decision #1): the\nfrontend fetches this to prefill an SL strategy's unset risk fields, instead of keeping its\nown localStorage copy. Maps the active trading_presets row through risk_settings_from_preset\nso the shape matches exactly what the engine and the Strategy Hub cards read. Returns an empty\nblock when the user has no preset (caller falls back to its seed defaults).","operationId":"get_default_risk_settings_api_default_risk_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trading_presets/{preset_id}":{"put":{"summary":"Update Trading Preset","operationId":"update_trading_preset_api_trading_presets__preset_id__put","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTradingPresetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Trading Preset","operationId":"delete_trading_preset_api_trading_presets__preset_id__delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading_presets/{preset_id}/activate":{"post":{"summary":"Activate Trading Preset","operationId":"activate_trading_preset_api_trading_presets__preset_id__activate_post","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradingPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trading_presets/deactivate":{"post":{"summary":"Deactivate All Trading Presets","operationId":"deactivate_all_trading_presets_api_trading_presets_deactivate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/trade-journal":{"get":{"summary":"List Journal","operationId":"list_journal_api_trade_journal_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Journal Api Trade Journal Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Save Journal","operationId":"save_journal_api_trade_journal_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Journal Api Trade Journal Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trade-journal/trades":{"get":{"summary":"List Closed Trades","description":"The caller's closed BettaTrader trades (all accounts) for the Workbook import picker.","operationId":"list_closed_trades_api_trade_journal_trades_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Closed Trades Api Trade Journal Trades Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trade-copier/presets":{"get":{"summary":"List Trade Copier Presets","description":"Fetches all trade copier presets for the authenticated user.","operationId":"list_trade_copier_presets_api_trade_copier_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TradeCopierPreset"},"type":"array","title":"Response List Trade Copier Presets Api Trade Copier Presets Get"}}}}}},"post":{"summary":"Create Trade Copier Preset","description":"Creates a new trade copier preset.","operationId":"create_trade_copier_preset_api_trade_copier_presets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeCopierPreset"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeCopierPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trade-copier/presets/{preset_id}":{"put":{"summary":"Update Trade Copier Preset","description":"Updates an existing trade copier preset.","operationId":"update_trade_copier_preset_api_trade_copier_presets__preset_id__put","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeCopierPreset"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeCopierPreset"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Trade Copier Preset","description":"Deletes a trade copier preset.","operationId":"delete_trade_copier_preset_api_trade_copier_presets__preset_id__delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trade-copier/nt8/allow":{"get":{"summary":"Get Nt8 Copier Allow","description":"The user's NT8 accounts and whether each is confirmed as their own (only those can lead or follow).","operationId":"get_nt8_copier_allow_api_trade_copier_nt8_allow_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Nt8 Copier Allow Api Trade Copier Nt8 Allow Get"}}}}}},"put":{"summary":"Set Nt8 Copier Allow","operationId":"set_nt8_copier_allow_api_trade_copier_nt8_allow_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Nt8AllowIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Nt8 Copier Allow Api Trade Copier Nt8 Allow Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trade-copier/nt8/kill":{"post":{"summary":"Kill Nt8 Copier","description":"Kill switch: stop every NT8 preset, then the add-on stops mirroring and flattens the copier's accounts.","operationId":"kill_nt8_copier_api_trade_copier_nt8_kill_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Kill Nt8 Copier Api Trade Copier Nt8 Kill Post"}}}}}}},"/api/trade-copier/nt8/audit.csv":{"get":{"summary":"Nt8 Copier Audit Csv","description":"Timestamped copier audit (leader order → each follower order, with fills, rejects, guards and kills).","operationId":"nt8_copier_audit_csv_api_trade_copier_nt8_audit_csv_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/course-leaderboard":{"get":{"summary":"Get Board","operationId":"get_board_api_course_leaderboard_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Scope"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Board Api Course Leaderboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/course-leaderboard/prefs":{"put":{"summary":"Put Prefs","operationId":"put_prefs_api_course_leaderboard_prefs_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__apis__course_leaderboard__PrefsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Prefs Api Course Leaderboard Prefs Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/course-leaderboard/public":{"get":{"summary":"Public Board","description":"No login: top 10 students who opted in to the public board (name = nickname or first name + last initial).","operationId":"public_board_api_course_leaderboard_public_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Public Board Api Course Leaderboard Public Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/course-leaderboard":{"get":{"summary":"Admin View","operationId":"admin_view_api_admin_course_leaderboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin View Api Admin Course Leaderboard Get"}}}}}}},"/api/admin/course-leaderboard/prizes":{"put":{"summary":"Admin Prizes","operationId":"admin_prizes_api_admin_course_leaderboard_prizes_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrizesIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Prizes Api Admin Course Leaderboard Prizes Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/course-leaderboard/cohort":{"put":{"summary":"Admin Set Cohort","description":"Put students in a cohort (or back to online with cohort_id = null). Lesson access is left as it is.","operationId":"admin_set_cohort_api_admin_course_leaderboard_cohort_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortSetIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Set Cohort Api Admin Course Leaderboard Cohort Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/course-leaderboard/remove-leftovers":{"post":{"summary":"Admin Remove Leftovers","description":"Clear what removed accounts (sign-in deleted) left behind: cohort, points, access grants, Hedging review.\nAccounts that can still sign in are skipped.","operationId":"admin_remove_leftovers_api_admin_course_leaderboard_remove_leftovers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeftoversIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Remove Leftovers Api Admin Course Leaderboard Remove Leftovers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/course-leaderboard/close":{"post":{"summary":"Admin Close","description":"Month (default: last month) or a cohort: record the top 3 students (staff excluded) and GHL-tag them.","operationId":"admin_close_api_admin_course_leaderboard_close_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Close Api Admin Course Leaderboard Close Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sw.js":{"get":{"tags":["Service Worker"],"summary":"Serve Service Worker","description":"Serve the push notification service worker JavaScript.\nThis endpoint must be unprotected so the browser can fetch and register it.\nThe Service-Worker-Allowed header allows the SW to control a broader scope\nthan its default (which would be limited to /routes/).","operationId":"serve_service_worker_api_sw_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/scheduled-trades":{"get":{"summary":"List all scheduled trades for the user","operationId":"list_scheduled_trades_api_scheduled_trades_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ScheduledTrade"},"type":"array","title":"Response List Scheduled Trades Api Scheduled Trades Get"}}}}}},"post":{"summary":"Create a new scheduled trade","operationId":"create_scheduled_trade_api_scheduled_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTradeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTrade"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scheduled-trades/{trade_id}":{"put":{"summary":"Update a scheduled trade","operationId":"update_scheduled_trade_api_scheduled_trades__trade_id__put","parameters":[{"name":"trade_id","in":"path","required":true,"schema":{"type":"string","title":"Trade Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTradeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTrade"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel a scheduled trade","operationId":"cancel_scheduled_trade_api_scheduled_trades__trade_id__delete","parameters":[{"name":"trade_id","in":"path","required":true,"schema":{"type":"string","title":"Trade Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oco-breakouts":{"get":{"summary":"List the user's OCO breakout brackets","description":"Armed / triggered / cancelled OCO breakout brackets for the user (Strategist / Pro / Tester, dev, admin).","operationId":"list_oco_breakouts_api_oco_breakouts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/oco-breakouts/arm":{"post":{"summary":"Arm an OCO breakout bracket now (Trading Terminal)","description":"Same bracket a scheduled OCO arms at its time, armed immediately: buy-stop at ask + offset,\nsell-stop at bid - offset; the first side crossed fires with the SL strategy (Strategist / Pro / Tester, dev, admin).","operationId":"arm_oco_breakout_api_oco_breakouts_arm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcoArmIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oco-breakouts/{oco_id}/cancel":{"post":{"summary":"Cancel an armed OCO breakout bracket","description":"Cancel an armed bracket: un-arm the live watcher and mark it cancelled (Strategist / Pro / Tester, dev, admin).","operationId":"cancel_oco_breakout_api_oco_breakouts__oco_id__cancel_post","parameters":[{"name":"oco_id","in":"path","required":true,"schema":{"type":"string","title":"Oco Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mode-analysis/symbols":{"get":{"tags":["mode-analysis"],"summary":"Get Mode Symbols","description":"Tradeable symbols for the Market Analysis picker, with that broker's exact names (e.g. USTECH).\n\nSources, in order:\n  1. The user's LIVE Trading-Terminal connection — the same method the Terminal uses. Loading\n     symbols in the Terminal first makes them appear here immediately.\n  2. The durable DB store (admin market-data broker's list, shared by every user), refreshed at\n     most daily; `refresh=true` re-pulls from the broker.\nA live Terminal read is also written back to the shared store so it warms up for everyone.","operationId":"get_mode_analysis_symbols","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Account Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mode-analysis":{"get":{"tags":["mode-analysis"],"summary":"Get Mode Analysis","description":"Per-trade-mode technical-analysis summary for `symbol` (see _load_frames for the candle source).\nPass `account_id` to prefer that account's Direct broker for symbols outside the saved store.\nCached ~25s; refresh=true recomputes.","operationId":"get_mode_analysis","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/incidents":{"get":{"summary":"List Incidents","description":"Recent sweep findings for the caller's accounts, newest first.\n\nEach row is enriched with the app-side account id (`ui_account_id`) + label so\nthe client can build a `/trading-terminal?account=&symbol=&position=` deep link.","operationId":"list_incidents_api_incidents_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":150,"title":"Limit"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"sweep_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sweep Type"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"resolved","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bias-controllers":{"get":{"summary":"List Controllers","operationId":"list_controllers_api_bias_controllers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Controller","operationId":"create_controller_api_bias_controllers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiasControllerCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bias-controllers/seed-modes":{"post":{"summary":"Seed Mode Controllers","description":"One-click: create the 4 per-mode bias controllers (Rapid Scalp / Scalp / Intraday / Interday) for\n`symbol`. Idempotent — skips any mode that already has a controller for this user+symbol.","operationId":"seed_mode_controllers_api_bias_controllers_seed_modes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiasSeedModesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bias-controllers/{controller_id}":{"put":{"summary":"Update Controller","operationId":"update_controller_api_bias_controllers__controller_id__put","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiasControllerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Controller","operationId":"delete_controller_api_bias_controllers__controller_id__delete","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bias-controllers/{controller_id}/clone":{"post":{"summary":"Clone Controller","description":"Clone a public (global) or own controller into the user's private library.","operationId":"clone_controller_api_bias_controllers__controller_id__clone_post","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bias-controllers/{controller_id}/set-direction":{"post":{"summary":"Set Direction","description":"Manually override a controller's current_direction (and, optionally, its grade) for TESTING.\n\n`direction` query param: ?direction=buy|sell|neutral\n`grade` (optional) query param: ?grade=primed|aligned|locked  ('locked in' accepted) — overrides\n  current_grade so you can test the grade-scaled entry/recovery aggressiveness without waiting for a\n  live signal. Omit to leave the grade unchanged.\nLinked automations read current_direction/current_grade at trade time, so no automation rows are\ntoggled here — mirrors the signal-driven update.","operationId":"set_direction_api_bias_controllers__controller_id__set_direction_post","parameters":[{"name":"controller_id","in":"path","required":true,"schema":{"type":"string","title":"Controller Id"}},{"name":"direction","in":"query","required":true,"schema":{"type":"string","title":"Direction"}},{"name":"grade","in":"query","required":false,"schema":{"type":"string","title":"Grade"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/access/table":{"get":{"summary":"Access Table","operationId":"access_table_api_admin_access_table_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/access/user":{"get":{"summary":"Access For User","operationId":"access_for_user_api_admin_access_user_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":200,"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/pair-code":{"post":{"summary":"Nt8 Pair Code","description":"A one-time code the trader types into the add-on (valid 10 minutes).","operationId":"nt8_pair_code_api_nt8_pair_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Pair Code Api Nt8 Pair Code Post"}}}}}}},"/api/nt8/pair":{"post":{"summary":"Nt8 Pair","description":"Called by the add-on: swaps the code for the device token it keeps and sends on every connection.","operationId":"nt8_pair_api_nt8_pair_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Pair Api Nt8 Pair Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/devices":{"get":{"summary":"Nt8 Devices","operationId":"nt8_devices_api_nt8_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Devices Api Nt8 Devices Get"}}}}}}},"/api/nt8/caps":{"put":{"summary":"Nt8 Set Cap","description":"The broker's / prop firm's max contracts on one NT8 account (NinjaTrader doesn't report it).\nEvery app order, copy and size recommendation on the account stays at or under it.","operationId":"nt8_set_cap_api_nt8_caps_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Set Cap Api Nt8 Caps Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/devices/{device_id}":{"delete":{"summary":"Nt8 Unpair","operationId":"nt8_unpair_api_nt8_devices__device_id__delete","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Nt8 Unpair Api Nt8 Devices  Device Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/order":{"post":{"summary":"Nt8 Order","operationId":"nt8_order_api_nt8_order_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Order Api Nt8 Order Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/flatten":{"post":{"summary":"Nt8 Flatten","description":"Close the account's position (one instrument, or all) and cancel its working orders there.","operationId":"nt8_flatten_api_nt8_flatten_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmdIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Flatten Api Nt8 Flatten Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/cancel":{"post":{"summary":"Nt8 Cancel","operationId":"nt8_cancel_api_nt8_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmdIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Cancel Api Nt8 Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nt8/modify":{"post":{"summary":"Nt8 Modify","description":"Move a working order's stop and/or limit price (e.g. the protective stop).","operationId":"nt8_modify_api_nt8_modify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmdIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nt8 Modify Api Nt8 Modify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recovery_groups":{"get":{"summary":"List Recovery Groups","operationId":"list_recovery_groups_api_recovery_groups_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recovery_groups/settings":{"put":{"summary":"Set Recovery Settings","operationId":"set_recovery_settings_api_recovery_groups_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__apis__recovery_group__SettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recovery_groups/{group_id}/trade":{"post":{"summary":"Recovery Trade","operationId":"recovery_trade_api_recovery_groups__group_id__trade_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/calendar":{"get":{"summary":"News Calendar","description":"Public: this week's + next week's economic events, normalized with folder colors.\n\nShape: {source, fetched_at, fallback_url, colors, events:[{id,title,country,impact,\ncolor,ts,iso,forecast,previous,actual}]}","operationId":"news_calendar_api_news_calendar_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/subscription":{"delete":{"tags":["Push Notifications"],"summary":"Delete Subscription","operationId":"delete_subscription_api_subscription_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions":{"get":{"tags":["Push Notifications"],"summary":"List Subscriptions","operationId":"list_subscriptions_api_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionInfo"},"type":"array","title":"Response List Subscriptions Api Subscriptions Get"}}}}}}},"/api/vapid-public-key":{"get":{"tags":["Push Notifications"],"summary":"Get Vapid Public Key","operationId":"get_vapid_public_key_api_vapid_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/subscribe":{"post":{"tags":["Push Notifications"],"summary":"Subscribe","operationId":"subscribe_api_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/unsubscribe":{"post":{"tags":["Push Notifications"],"summary":"Unsubscribe","operationId":"unsubscribe_api_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity":{"get":{"summary":"List User Activity","description":"Lists the most recent activities for the authenticated user.","operationId":"list_user_activity_api_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"title":"Response List User Activity Api Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/activity":{"get":{"summary":"List All Activity","description":"Lists activity logs for admins or developers.","operationId":"list_all_activity_api_admin_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"user_id_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"title":"Response List All Activity Api Admin Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/run":{"get":{"tags":["Analytics"],"summary":"Run Strategy Analyzer","operationId":"run_strategy_analyzer_api_analytics_strategy_analyzer_run_get","parameters":[{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","description":"live | demo | all","default":"all","title":"Scope"},"description":"live | demo | all"},{"name":"min_sample","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":20,"title":"Min Sample"}},{"name":"profit_factor_bar","in":"query","required":false,"schema":{"type":"number","maximum":99.0,"minimum":0.0,"default":1.3,"title":"Profit Factor Bar"}},{"name":"exclude_outage","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Exclude Outage"}},{"name":"outage_days","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"comma-separated YYYY-MM-DD days to leave out; blank = defaults","title":"Outage Days"},"description":"comma-separated YYYY-MM-DD days to leave out; blank = defaults"},{"name":"exclude_unrecorded_hedge","in":"query","required":false,"schema":{"type":"boolean","description":"leave out hedged trades whose hedge leg P/L was never saved","default":true,"title":"Exclude Unrecorded Hedge"},"description":"leave out hedged trades whose hedge leg P/L was never saved"},{"name":"trading_account_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"comma-separated account ids","title":"Trading Account Ids"},"description":"comma-separated account ids"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"trade_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"rapid_scalp | scalp | intraday | interday — limit mode presets to one","title":"Trade Mode"},"description":"rapid_scalp | scalp | intraday | interday — limit mode presets to one"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/my-trading":{"get":{"tags":["Analytics"],"summary":"My Trading Report","description":"The signed-in user's own closed trades → headline stats, breakdowns, equity curve, streaks.\nRead-only, computed when the page is opened; never touches the execution path.","operationId":"my_trading_report_api_analytics_my_trading_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","description":"live | demo | all","default":"all","title":"Scope"},"description":"live | demo | all"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":0,"description":"look-back in days; 0 = all time","default":90,"title":"Days"},"description":"look-back in days; 0 = all time"},{"name":"trading_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Id"}},{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/materialize-sl-strategy":{"post":{"tags":["Analytics"],"summary":"Materialize Sl Strategy","description":"Create a saved SL-strategy from a winning manual config's rules, so the Analyzer's\nReview & Apply form can reference it. Developer/admin only.","operationId":"materialize_sl_strategy_api_analytics_strategy_analyzer_materialize_sl_strategy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterializeSlIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/settle-pnl":{"post":{"tags":["Analytics"],"summary":"Settle Pnl Now","description":"Run the broker settle-up once in the background (works even while BT_PNL_SETTLE is off).","operationId":"settle_pnl_now_api_analytics_strategy_analyzer_settle_pnl_post","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/settle-pnl/status":{"get":{"tags":["Analytics"],"summary":"Settle Pnl Status","operationId":"settle_pnl_status_api_analytics_strategy_analyzer_settle_pnl_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/strategy-analyzer/lab/tools":{"get":{"tags":["Analytics"],"summary":"Lab Tools","operationId":"lab_tools_api_analytics_strategy_analyzer_lab_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/strategy-analyzer/lab/run":{"get":{"tags":["Analytics"],"summary":"Lab Run","description":"Run a lab tool and wait for it. Kept for scripts; the page uses lab/start + lab/job, because\nCloudflare in front of the app drops any request that runs longer than ~100 s.","operationId":"lab_run_api_analytics_strategy_analyzer_lab_run_get","parameters":[{"name":"tool","in":"query","required":true,"schema":{"type":"string","description":"one of the whitelisted lab tools","title":"Tool"},"description":"one of the whitelisted lab tools"},{"name":"since","in":"query","required":true,"schema":{"type":"string","description":"UTC start, e.g. '2026-06-17 05:00'","title":"Since"},"description":"UTC start, e.g. '2026-06-17 05:00'"},{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"by_indicator","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"By Indicator"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","description":"signal_lab only: signals | trades","default":"signals","title":"Source"},"description":"signal_lab only: signals | trades"},{"name":"preset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"KCX Method chart preset (tools that list presets)","title":"Preset"},"description":"KCX Method chart preset (tools that list presets)"},{"name":"spread","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":50,"minimum":0},{"type":"null"}],"description":"cost-aware tools: spread in price units","title":"Spread"},"description":"cost-aware tools: spread in price units"},{"name":"commission_per_lot","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":500,"minimum":0},{"type":"null"}],"description":"cost-aware tools: round-trip $/lot","title":"Commission Per Lot"},"description":"cost-aware tools: round-trip $/lot"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/lab/start":{"post":{"tags":["Analytics"],"summary":"Lab Start","operationId":"lab_start_api_analytics_strategy_analyzer_lab_start_post","parameters":[{"name":"tool","in":"query","required":true,"schema":{"type":"string","description":"one of the whitelisted lab tools","title":"Tool"},"description":"one of the whitelisted lab tools"},{"name":"since","in":"query","required":true,"schema":{"type":"string","description":"UTC start, e.g. '2026-06-17 05:00'","title":"Since"},"description":"UTC start, e.g. '2026-06-17 05:00'"},{"name":"symbol","in":"query","required":false,"schema":{"type":"string","default":"XAUUSD","title":"Symbol"}},{"name":"by_indicator","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"By Indicator"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","description":"signal_lab only: signals | trades","default":"signals","title":"Source"},"description":"signal_lab only: signals | trades"},{"name":"preset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"KCX Method chart preset (tools that list presets)","title":"Preset"},"description":"KCX Method chart preset (tools that list presets)"},{"name":"spread","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":50,"minimum":0},{"type":"null"}],"description":"cost-aware tools: spread in price units","title":"Spread"},"description":"cost-aware tools: spread in price units"},{"name":"commission_per_lot","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":500,"minimum":0},{"type":"null"}],"description":"cost-aware tools: round-trip $/lot","title":"Commission Per Lot"},"description":"cost-aware tools: round-trip $/lot"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/lab/job/{job_id}":{"get":{"tags":["Analytics"],"summary":"Lab Job","operationId":"lab_job_api_analytics_strategy_analyzer_lab_job__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/strategy-analyzer/lab/apply":{"post":{"tags":["Analytics"],"summary":"Lab Apply","description":"Apply a strategy-lab recommendation to ONE automation (and, if given, its SL strategy's\nhedge distance). Per-indicator/manual, any account — developer/admin only.","operationId":"lab_apply_api_analytics_strategy_analyzer_lab_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabApplyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/demo-challenge":{"get":{"summary":"Get Challenge","operationId":"get_challenge_api_demo_challenge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Challenge Api Demo Challenge Get"}}}}}}},"/api/demo-challenge/join":{"post":{"summary":"Join Challenge","operationId":"join_challenge_api_demo_challenge_join_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Join Challenge Api Demo Challenge Join Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/demo-challenge/leaderboard":{"get":{"summary":"Leaderboard","operationId":"leaderboard_api_demo_challenge_leaderboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Leaderboard Api Demo Challenge Leaderboard Get"}}}}}}},"/api/demo-challenge/leaderboard/public":{"get":{"summary":"Public Leaderboard","description":"No login: top 10 by nickname, for ads, GHL pages and Make.","operationId":"public_leaderboard_api_demo_challenge_leaderboard_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Public Leaderboard Api Demo Challenge Leaderboard Public Get"}}}}}}},"/api/admin/demo-challenge/finalize":{"post":{"summary":"Finalize","operationId":"finalize_api_admin_demo_challenge_finalize_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Finalize Api Admin Demo Challenge Finalize Post"}}}}}}},"/api/prop-planner/rules":{"get":{"tags":["prop-planner"],"summary":"List Rules","operationId":"list_rules_api_prop_planner_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Rules Api Prop Planner Rules Get"}}}}}}},"/api/prop-planner/accounts":{"get":{"tags":["prop-planner"],"summary":"List Accounts","operationId":"list_accounts_api_prop_planner_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Accounts Api Prop Planner Accounts Get"}}}}}},"post":{"tags":["prop-planner"],"summary":"Create Account","operationId":"create_account_api_prop_planner_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Account Api Prop Planner Accounts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/accounts/{account_id}":{"get":{"tags":["prop-planner"],"summary":"Get Account","operationId":"get_account_api_prop_planner_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Account Api Prop Planner Accounts  Account Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["prop-planner"],"summary":"Update Account","operationId":"update_account_api_prop_planner_accounts__account_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Account Api Prop Planner Accounts  Account Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["prop-planner"],"summary":"Delete Account","operationId":"delete_account_api_prop_planner_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Account Api Prop Planner Accounts  Account Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/accounts/{account_id}/clone":{"post":{"tags":["prop-planner"],"summary":"Clone Account","description":"Copies for copy-traded accounts: same rules, starting point, custom rules (and check-ins if asked).","operationId":"clone_account_api_prop_planner_accounts__account_id__clone_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Clone Account Api Prop Planner Accounts  Account Id  Clone Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/accounts/{account_id}/advance":{"post":{"tags":["prop-planner"],"summary":"Advance Account","description":"Evaluation passed (or sim → live): close this phase and start the next one as a linked account.","operationId":"advance_account_api_prop_planner_accounts__account_id__advance_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Advance Account Api Prop Planner Accounts  Account Id  Advance Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/accounts/{account_id}/seen-rules":{"post":{"tags":["prop-planner"],"summary":"Ack Rules","operationId":"ack_rules_api_prop_planner_accounts__account_id__seen_rules_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ack Rules Api Prop Planner Accounts  Account Id  Seen Rules Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/accounts/{account_id}/checkins":{"post":{"tags":["prop-planner"],"summary":"Save Checkin","description":"Save the day; `copy_to` applies the same day (P&L, swings, trades, note — not payouts) to other accounts.","operationId":"save_checkin_api_prop_planner_accounts__account_id__checkins_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckinIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Checkin Api Prop Planner Accounts  Account Id  Checkins Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/accounts/{account_id}/checkins/{day}":{"delete":{"tags":["prop-planner"],"summary":"Delete Checkin","operationId":"delete_checkin_api_prop_planner_accounts__account_id__checkins__day__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}},{"name":"day","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Checkin Api Prop Planner Accounts  Account Id  Checkins  Day  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prop-planner/report-change":{"post":{"tags":["prop-planner"],"summary":"Report Change","operationId":"report_change_api_prop_planner_report_change_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Report Change Api Prop Planner Report Change Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prop-planner/rules":{"get":{"tags":["prop-planner"],"summary":"Admin Rules","operationId":"admin_rules_api_admin_prop_planner_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Rules Api Admin Prop Planner Rules Get"}}}}}}},"/api/admin/prop-planner/rules/{rule_id}":{"put":{"tags":["prop-planner"],"summary":"Admin Save Rule","description":"Save + approve a rulebook (id 0 = new). Every save is logged and bumps the version students see.","operationId":"admin_save_rule_api_admin_prop_planner_rules__rule_id__put","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Save Rule Api Admin Prop Planner Rules  Rule Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prop-planner/changes/{change_id}":{"post":{"tags":["prop-planner"],"summary":"Admin Decide","operationId":"admin_decide_api_admin_prop_planner_changes__change_id__post","parameters":[{"name":"change_id","in":"path","required":true,"schema":{"type":"integer","title":"Change Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Decide Api Admin Prop Planner Changes  Change Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prop-planner/check-pages":{"post":{"tags":["prop-planner"],"summary":"Admin Check Pages","operationId":"admin_check_pages_api_admin_prop_planner_check_pages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Check Pages Api Admin Prop Planner Check Pages Post"}}}}}}},"/health":{"get":{"summary":" Health","operationId":"_health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/livez":{"get":{"summary":" Livez","operationId":"_livez_livez_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/readyz":{"get":{"summary":" Readyz","operationId":"_readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{full_path}":{"head":{"summary":"Serve Frontend","operationId":"serve_frontend__full_path__head","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Serve Frontend","operationId":"serve_frontend__full_path__head","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIFeedbackIn":{"properties":{"user_id":{"type":"string","title":"User Id"},"module":{"type":"string","title":"Module"},"module_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Title"},"student_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Name"},"questions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Questions"},"chart_rubric":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Chart Rubric"}},"type":"object","required":["user_id","module"],"title":"AIFeedbackIn"},"AIReviewIn":{"properties":{"user_id":{"type":"string","maxLength":64,"title":"User Id"}},"type":"object","required":["user_id"],"title":"AIReviewIn"},"AccountIdPayload":{"properties":{"accountId":{"type":"string","title":"Accountid"}},"type":"object","required":["accountId"],"title":"AccountIdPayload"},"AccountIn":{"properties":{"rule_id":{"type":"integer","title":"Rule Id"},"label":{"type":"string","title":"Label","default":""},"start_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Balance"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"goal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Goal Date"},"days_per_week":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Days Per Week","default":5},"stop_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Stop Usd"},"carry_in":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Carry In"},"custom_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Rules"}},"type":"object","required":["rule_id"],"title":"AccountIn"},"AccountLiveInfo":{"properties":{"account_id":{"type":"string","title":"Account Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance"},"equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Equity"},"margin_level":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Level"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"connected":{"type":"boolean","title":"Connected","default":false},"stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stale"},"recovery_badge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Badge"},"recovery_contended":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recovery Contended"},"recovery_net_lots":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Net Lots"}},"type":"object","required":["account_id"],"title":"AccountLiveInfo"},"AccountPatch":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"start_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Balance"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"carry_in":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Carry In"},"goal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Goal Date"},"days_per_week":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Days Per Week"},"stop_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Stop Usd"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"custom_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Rules"}},"type":"object","title":"AccountPatch"},"AcknowledgeHeldRequest":{"properties":{"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},"type":"object","title":"AcknowledgeHeldRequest"},"Activity":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"activity_type":{"type":"string","title":"Activity Type"},"description":{"type":"string","title":"Description"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["id","created_at","activity_type","description","details"],"title":"Activity"},"AdvanceIn":{"properties":{"rule_id":{"type":"integer","title":"Rule Id"},"start_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Balance"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"goal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Goal Date"}},"type":"object","required":["rule_id"],"title":"AdvanceIn"},"AlertsIn":{"properties":{"account_id":{"type":"string","title":"Account Id"},"above":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Above"},"below":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Below"}},"type":"object","required":["account_id"],"title":"AlertsIn"},"AnnouncementIn":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":5000,"title":"Body","default":""},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"enabled":{"type":"boolean","title":"Enabled","default":true},"audience":{"type":"string","enum":["everyone","students"],"title":"Audience","default":"everyone"}},"type":"object","required":["title","starts_at"],"title":"AnnouncementIn"},"AnswerIn":{"properties":{"id":{"type":"string","maxLength":80,"title":"Id"},"choice":{"type":"string","maxLength":12,"title":"Choice"}},"type":"object","required":["id","choice"],"title":"AnswerIn"},"ArmHedgeRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"position_id":{"type":"string","title":"Position Id"},"trigger_mode":{"type":"string","title":"Trigger Mode","default":"fixed_price"},"arm_mode":{"type":"string","title":"Arm Mode","default":"virtual"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pips"},"trail_mode":{"type":"string","title":"Trail Mode","default":"pips"},"timeframe":{"type":"string","title":"Timeframe","default":"5m"}},"type":"object","required":["account_id","position_id"],"title":"ArmHedgeRequest"},"AssignIn":{"properties":{"advisor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advisor Id"}},"type":"object","title":"AssignIn"},"AssignmentRuleUpsert":{"properties":{"category":{"type":"string","title":"Category"},"assign_to":{"type":"string","title":"Assign To"}},"type":"object","required":["category","assign_to"],"title":"AssignmentRuleUpsert"},"AudioIn":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url","default":""},"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published","default":false}},"type":"object","required":["title"],"title":"AudioIn"},"AudioPatch":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"ord":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ord"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"}},"type":"object","title":"AudioPatch"},"AudioRow":{"properties":{"dbId":{"type":"string","title":"Dbid"},"ord":{"type":"integer","title":"Ord"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"published":{"type":"boolean","title":"Published"}},"type":"object","required":["dbId","ord","title","url","published"],"title":"AudioRow"},"AutomationIn":{"properties":{"trading_account_id":{"type":"string","title":"Trading Account Id"},"recipes":{"items":{"type":"string"},"type":"array","title":"Recipes"},"volume":{"type":"number","title":"Volume","default":0.01},"enabled":{"type":"boolean","title":"Enabled","default":true},"connector":{"type":"string","title":"Connector","default":"metaapi"},"pause_when_hedged":{"type":"boolean","title":"Pause When Hedged","default":false},"sizing_mode":{"type":"string","title":"Sizing Mode","default":"fixed"},"risk_value":{"type":"number","title":"Risk Value","default":0.0},"atw_stop_rule":{"type":"string","title":"Atw Stop Rule","default":"shared"}},"type":"object","required":["trading_account_id","recipes"],"title":"AutomationIn"},"AutomationSchedule":{"properties":{"is_active":{"type":"boolean","title":"Is Active","default":false},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"days":{"items":{"type":"string"},"type":"array","title":"Days","default":[]},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"}},"type":"object","title":"AutomationSchedule"},"AutomationSetting":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"trading_account_id":{"type":"string","title":"Trading Account Id"},"account_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Ids","default":[]},"trading_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Name"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"},"entry_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Type"},"is_active":{"type":"boolean","title":"Is Active"},"risk_per_trade":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Per Trade"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Recovery Strategy Id"},"bias_controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Controller Id"},"cross_hedge_controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Controller Id"},"calculation_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Style","default":"fixed_lot"},"risk_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Cash"},"custom_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Custom Margin"},"gold_scalp_divisor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold Scalp Divisor","default":100.0},"sl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Distance","default":0.0},"max_active_positions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Active Positions"},"timeframes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Timeframes"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/AutomationSchedule"},{"type":"null"}]},"signal_tier_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Tier Filter","default":"any"},"trade_mode_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Mode Filter","default":"any"},"enable_cross_hedge":{"type":"boolean","title":"Enable Cross Hedge","default":false},"cross_hedge_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Indicator"},"cross_hedge_signal_type":{"type":"string","title":"Cross Hedge Signal Type","default":"any"},"cross_hedge_indicators":{"items":{"type":"string"},"type":"array","title":"Cross Hedge Indicators","default":[]},"tp1_action":{"type":"string","title":"Tp1 Action","default":"close_percent"},"tp1_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Close Percent","default":100},"tp1_move_sl_to_be":{"type":"boolean","title":"Tp1 Move Sl To Be","default":false},"tp1_activate_tsl":{"type":"boolean","title":"Tp1 Activate Tsl","default":false},"tp2_action":{"type":"string","title":"Tp2 Action","default":"close_percent"},"tp2_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Close Percent","default":100},"tp2_move_sl_to_be":{"type":"boolean","title":"Tp2 Move Sl To Be","default":false},"tp2_activate_tsl":{"type":"boolean","title":"Tp2 Activate Tsl","default":false},"tp3_action":{"type":"string","title":"Tp3 Action","default":"close_percent"},"tp3_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Close Percent","default":100},"tp3_move_sl_to_be":{"type":"boolean","title":"Tp3 Move Sl To Be","default":false},"tp3_activate_tsl":{"type":"boolean","title":"Tp3 Activate Tsl","default":false},"tp1_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Be Offset Pips","default":0.0},"tp1_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Tsl Distance","default":0.0},"tp1_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Tsl Activation","default":0.0},"tp2_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Be Offset Pips","default":0.0},"tp2_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Tsl Distance","default":0.0},"tp2_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Tsl Activation","default":0.0},"tp3_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Be Offset Pips","default":0.0},"tp3_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Tsl Distance","default":0.0},"tp3_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Tsl Activation","default":0.0},"tp1_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Override Pips","default":0.0},"tp2_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Override Pips","default":0.0},"tp3_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Override Pips","default":0.0},"be_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Be Pips","default":0.0},"be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Be Offset Pips","default":0.0},"tsl_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Distance Pips","default":0.0},"tsl_activation_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Activation Pips","default":0.0},"enable_hedge_recovery":{"type":"boolean","title":"Enable Hedge Recovery","default":false},"hedge_trigger_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Trigger Pips","default":200.0},"hedge_recovery_add_trigger":{"type":"string","title":"Hedge Recovery Add Trigger","default":"points"},"hedge_recovery_add_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Add Pips","default":200.0},"hedge_recovery_tsl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Tsl Pips","default":100.0},"hedge_recovery_close_trigger":{"type":"string","title":"Hedge Recovery Close Trigger","default":"any"},"hedge_recovery_max_rehedges":{"type":"integer","title":"Hedge Recovery Max Rehedges","default":2},"hedge_recovery_acceptable_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Acceptable Loss Pct","default":0.0},"hedge_recovery_stack_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedge Recovery Stack Indicator"},"hedge_recovery_stack_signal_tier":{"type":"string","title":"Hedge Recovery Stack Signal Tier","default":"any"},"cross_signal_tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Tp Pips","default":0.0},"cross_signal_tp_fixed_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Tp Fixed Price","default":0.0},"cross_signal_tp_mode":{"type":"string","title":"Cross Signal Tp Mode","default":"pips"},"cross_signal_sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Sl Pips","default":200.0},"cross_signal_use_sl_strategy":{"type":"boolean","title":"Cross Signal Use Sl Strategy","default":false},"cross_signal_sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Signal Sl Strategy Id"},"rapid_scalp_mode":{"type":"boolean","title":"Rapid Scalp Mode","default":false},"rapid_scalp_tp_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tp Points","default":1.5},"rapid_scalp_tsl_lock_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tsl Lock Points","default":1.0},"rapid_scalp_tsl_trail_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tsl Trail Points","default":0.5},"rapid_scalp_use_cross_exit":{"type":"boolean","title":"Rapid Scalp Use Cross Exit","default":false},"group_profit_target_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Group Profit Target Points","default":0.0},"stack_recovery_max_attempts":{"type":"integer","title":"Stack Recovery Max Attempts","default":2},"stack_recovery_tsl_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Tsl Points","default":0.5},"signal_queue_enabled":{"type":"boolean","title":"Signal Queue Enabled","default":false},"signal_queue_freshness_seconds":{"type":"integer","title":"Signal Queue Freshness Seconds","default":300},"auto_free_margin_on_block":{"type":"boolean","title":"Auto Free Margin On Block","default":false},"require_bias_aligned":{"type":"boolean","title":"Require Bias Aligned","default":true},"require_cross_aligned":{"type":"boolean","title":"Require Cross Aligned","default":true},"auto_entry_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Entry Mode","default":"analysis"},"controller_entry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Controller Entry","default":false},"max_locked_pairs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Locked Pairs","default":0},"min_bias_grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Bias Grade","default":"primed"},"entry_soft_cross_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Soft Cross Ok","default":false},"entry_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Trigger","default":"own_signal"},"overlay_bias_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Bias Enforce","default":false},"overlay_exhaustion_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Exhaustion Enforce","default":false},"overlay_zone_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Zone Enforce","default":false},"entry_block_opposing_divergence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Block Opposing Divergence","default":true},"entry_block_opposing_osc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Block Opposing Osc","default":true},"exhaustion_derisk_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Derisk Enabled","default":true},"exhaustion_tier3_counter_add":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier3 Counter Add","default":false},"exhaustion_tier1_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier1 Enabled","default":true},"exhaustion_tier2_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier2 Enabled","default":true},"exhaustion_tier3_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier3 Enabled","default":true},"exhaustion_require_confirm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Require Confirm","default":true},"exhaustion_override_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exhaustion Override Count","default":4},"bias_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Neutral Behavior","default":"pause"},"cross_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Neutral Behavior","default":"pause"},"trading_hours_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours Start"},"trading_hours_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours End"},"trading_hours_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours Timezone"},"loss_cooldown_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss Cooldown Minutes","default":0.0},"recovery_min_signal_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Min Signal Tier"},"tp1_partial_close_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Partial Close Pct","default":0.0},"tp1_move_be":{"type":"boolean","title":"Tp1 Move Be","default":false},"daily_profit_target_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Dollars","default":0.0},"daily_loss_limit_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Dollars","default":0.0},"hedge_confirmation_bars":{"type":"integer","title":"Hedge Confirmation Bars","default":0},"stack_size_progression":{"type":"string","title":"Stack Size Progression","default":"fixed"},"stack_progression_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Progression Multiplier","default":1.5},"recovery_progress_notifications":{"type":"boolean","title":"Recovery Progress Notifications","default":true},"roll_notifications":{"type":"boolean","title":"Roll Notifications","default":true},"recovery_target_equity":{"type":"number","title":"Recovery Target Equity","default":0},"min_margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Margin Pct","default":0.0},"max_total_lots":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Total Lots","default":0.0},"equity_stop_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Equity Stop Pct","default":0.0},"max_spread_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Spread Points","default":0.0},"min_margin_level_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Margin Level Pct","default":1100.0},"max_splits":{"type":"integer","title":"Max Splits","default":1},"stack_recovery_size_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Size Multiplier","default":1.5},"stack_recovery_pause_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Pause Pips","default":0.0},"stack_recovery_max_duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Max Duration Hours","default":0.0},"stack_recovery_velocity_alert":{"type":"boolean","title":"Stack Recovery Velocity Alert","default":true},"daily_profit_target_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Pct","default":0.0},"daily_loss_limit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Pct","default":0.0},"setup_complete":{"type":"boolean","title":"Setup Complete","default":false},"setup_health_score":{"type":"integer","title":"Setup Health Score","default":0},"recovery_max_duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Max Duration Hours","default":0.0},"skip_on_deviation":{"type":"boolean","title":"Skip On Deviation","default":true},"auto_deviation_from_tp":{"type":"boolean","title":"Auto Deviation From Tp","default":true},"max_entry_deviation_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Entry Deviation Points","default":0.0},"min_viable_tp_distance_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Viable Tp Distance Points","default":0.0},"controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Controller Id"},"signal_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Timeframe"},"bias_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Timeframe"},"cross_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Timeframe"},"bias_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Direction"},"bias_grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Grade"},"bias_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Mode"},"bias_last_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Last Direction"},"bias_ctrl_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Ctrl Neutral Behavior"},"bias_controller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Controller Name"},"bias_last_signal_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bias Last Signal At"},"cross_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Direction"},"cross_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Mode"},"cross_osc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Osc"},"cross_div_tfs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Div Tfs"},"cross_exh_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cross Exh Tier"},"cross_exh_tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Exh Tier Name"},"cross_exh_signals":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Exh Signals"},"cross_last_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Last Direction"},"cross_neutral_reversal_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Neutral Reversal Dir"},"cross_ctrl_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Ctrl Neutral Behavior"},"cross_controller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Controller Name"},"cross_last_signal_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cross Last Signal At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","trading_account_id","is_active","created_at","updated_at"],"title":"AutomationSetting"},"AutomationSettingCreate":{"properties":{"name":{"type":"string","title":"Name"},"trading_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Id"},"account_ids":{"items":{"type":"string"},"type":"array","title":"Account Ids","default":[]},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"},"entry_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Type"},"is_active":{"type":"boolean","title":"Is Active","default":true},"risk_per_trade":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Per Trade"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Recovery Strategy Id"},"bias_controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Controller Id"},"cross_hedge_controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Controller Id"},"calculation_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Style","default":"fixed_lot"},"risk_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Cash"},"custom_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Custom Margin"},"gold_scalp_divisor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold Scalp Divisor","default":100.0},"sl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Distance","default":0.0},"max_active_positions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Active Positions"},"timeframes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Timeframes"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/AutomationSchedule"},{"type":"null"}]},"signal_tier_filter":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Signal Tier Filter","default":"any"},"trade_mode_filter":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trade Mode Filter","default":"any"},"enable_cross_hedge":{"type":"boolean","title":"Enable Cross Hedge","default":false},"cross_hedge_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Indicator"},"cross_hedge_signal_type":{"type":"string","title":"Cross Hedge Signal Type","default":"any"},"cross_hedge_indicators":{"items":{"type":"string"},"type":"array","title":"Cross Hedge Indicators","default":[]},"tp1_action":{"type":"string","title":"Tp1 Action","default":"close_percent"},"tp1_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Close Percent","default":100},"tp1_move_sl_to_be":{"type":"boolean","title":"Tp1 Move Sl To Be","default":false},"tp1_activate_tsl":{"type":"boolean","title":"Tp1 Activate Tsl","default":false},"tp2_action":{"type":"string","title":"Tp2 Action","default":"close_percent"},"tp2_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Close Percent","default":100},"tp2_move_sl_to_be":{"type":"boolean","title":"Tp2 Move Sl To Be","default":false},"tp2_activate_tsl":{"type":"boolean","title":"Tp2 Activate Tsl","default":false},"tp3_action":{"type":"string","title":"Tp3 Action","default":"close_percent"},"tp3_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Close Percent","default":100},"tp3_move_sl_to_be":{"type":"boolean","title":"Tp3 Move Sl To Be","default":false},"tp3_activate_tsl":{"type":"boolean","title":"Tp3 Activate Tsl","default":false},"tp1_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Be Offset Pips","default":0.0},"tp1_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Tsl Distance","default":0.0},"tp1_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Tsl Activation","default":0.0},"tp2_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Be Offset Pips","default":0.0},"tp2_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Tsl Distance","default":0.0},"tp2_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Tsl Activation","default":0.0},"tp3_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Be Offset Pips","default":0.0},"tp3_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Tsl Distance","default":0.0},"tp3_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Tsl Activation","default":0.0},"tp1_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Override Pips","default":0.0},"tp2_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Override Pips","default":0.0},"tp3_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Override Pips","default":0.0},"be_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Be Pips","default":0.0},"be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Be Offset Pips","default":0.0},"tsl_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Distance Pips","default":0.0},"tsl_activation_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Activation Pips","default":0.0},"enable_hedge_recovery":{"type":"boolean","title":"Enable Hedge Recovery","default":false},"hedge_trigger_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Trigger Pips","default":200.0},"hedge_recovery_add_trigger":{"type":"string","title":"Hedge Recovery Add Trigger","default":"points"},"hedge_recovery_add_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Add Pips","default":200.0},"hedge_recovery_tsl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Tsl Pips","default":100.0},"hedge_recovery_close_trigger":{"type":"string","title":"Hedge Recovery Close Trigger","default":"any"},"hedge_recovery_max_rehedges":{"type":"integer","title":"Hedge Recovery Max Rehedges","default":2},"hedge_recovery_acceptable_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Acceptable Loss Pct","default":0.0},"hedge_recovery_stack_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedge Recovery Stack Indicator"},"hedge_recovery_stack_signal_tier":{"type":"string","title":"Hedge Recovery Stack Signal Tier","default":"any"},"cross_signal_tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Tp Pips","default":0.0},"cross_signal_tp_fixed_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Tp Fixed Price","default":0.0},"cross_signal_tp_mode":{"type":"string","title":"Cross Signal Tp Mode","default":"pips"},"cross_signal_sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Sl Pips","default":200.0},"cross_signal_use_sl_strategy":{"type":"boolean","title":"Cross Signal Use Sl Strategy","default":false},"cross_signal_sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Signal Sl Strategy Id"},"rapid_scalp_mode":{"type":"boolean","title":"Rapid Scalp Mode","default":false},"rapid_scalp_tp_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tp Points","default":1.5},"rapid_scalp_tsl_lock_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tsl Lock Points","default":1.0},"rapid_scalp_tsl_trail_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tsl Trail Points","default":0.5},"rapid_scalp_use_cross_exit":{"type":"boolean","title":"Rapid Scalp Use Cross Exit","default":false},"group_profit_target_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Group Profit Target Points","default":0.0},"stack_recovery_max_attempts":{"type":"integer","title":"Stack Recovery Max Attempts","default":2},"stack_recovery_tsl_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Tsl Points","default":0.5},"signal_queue_enabled":{"type":"boolean","title":"Signal Queue Enabled","default":false},"signal_queue_freshness_seconds":{"type":"integer","title":"Signal Queue Freshness Seconds","default":300},"auto_free_margin_on_block":{"type":"boolean","title":"Auto Free Margin On Block","default":false},"require_bias_aligned":{"type":"boolean","title":"Require Bias Aligned","default":true},"require_cross_aligned":{"type":"boolean","title":"Require Cross Aligned","default":true},"auto_entry_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Entry Mode","default":"analysis"},"controller_entry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Controller Entry","default":false},"max_locked_pairs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Locked Pairs","default":0},"min_bias_grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Bias Grade","default":"primed"},"entry_soft_cross_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Soft Cross Ok","default":false},"entry_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Trigger","default":"own_signal"},"overlay_bias_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Bias Enforce","default":false},"overlay_exhaustion_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Exhaustion Enforce","default":false},"overlay_zone_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Zone Enforce","default":false},"entry_block_opposing_divergence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Block Opposing Divergence","default":true},"entry_block_opposing_osc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Block Opposing Osc","default":true},"exhaustion_derisk_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Derisk Enabled","default":true},"exhaustion_tier3_counter_add":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier3 Counter Add","default":false},"exhaustion_tier1_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier1 Enabled","default":true},"exhaustion_tier2_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier2 Enabled","default":true},"exhaustion_tier3_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier3 Enabled","default":true},"exhaustion_require_confirm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Require Confirm","default":true},"exhaustion_override_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exhaustion Override Count","default":4},"bias_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Neutral Behavior","default":"pause"},"cross_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Neutral Behavior","default":"pause"},"trading_hours_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours Start"},"trading_hours_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours End"},"trading_hours_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours Timezone"},"loss_cooldown_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss Cooldown Minutes","default":0.0},"recovery_min_signal_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Min Signal Tier"},"tp1_partial_close_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Partial Close Pct","default":0.0},"tp1_move_be":{"type":"boolean","title":"Tp1 Move Be","default":false},"daily_profit_target_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Dollars","default":0.0},"daily_loss_limit_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Dollars","default":0.0},"hedge_confirmation_bars":{"type":"integer","title":"Hedge Confirmation Bars","default":0},"stack_size_progression":{"type":"string","title":"Stack Size Progression","default":"fixed"},"stack_progression_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Progression Multiplier","default":1.5},"recovery_progress_notifications":{"type":"boolean","title":"Recovery Progress Notifications","default":true},"roll_notifications":{"type":"boolean","title":"Roll Notifications","default":true},"recovery_target_equity":{"type":"number","title":"Recovery Target Equity","default":0},"min_margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Margin Pct","default":0.0},"max_total_lots":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Total Lots","default":0.0},"equity_stop_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Equity Stop Pct","default":0.0},"max_spread_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Spread Points","default":0.0},"min_margin_level_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Margin Level Pct","default":1100.0},"max_splits":{"type":"integer","title":"Max Splits","default":1},"stack_recovery_size_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Size Multiplier","default":1.5},"stack_recovery_pause_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Pause Pips","default":0.0},"stack_recovery_max_duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Max Duration Hours","default":0.0},"stack_recovery_velocity_alert":{"type":"boolean","title":"Stack Recovery Velocity Alert","default":true},"daily_profit_target_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Pct","default":0.0},"daily_loss_limit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Pct","default":0.0},"setup_complete":{"type":"boolean","title":"Setup Complete","default":false},"setup_health_score":{"type":"integer","title":"Setup Health Score","default":0},"recovery_max_duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Max Duration Hours","default":0.0},"skip_on_deviation":{"type":"boolean","title":"Skip On Deviation","default":true},"auto_deviation_from_tp":{"type":"boolean","title":"Auto Deviation From Tp","default":true},"max_entry_deviation_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Entry Deviation Points","default":0.0},"min_viable_tp_distance_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Viable Tp Distance Points","default":0.0},"signal_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Timeframe","default":""},"bias_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Timeframe","default":""},"cross_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Timeframe","default":""}},"type":"object","required":["name"],"title":"AutomationSettingCreate"},"AutomationSettingUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"trading_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Id"},"account_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Ids"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"},"entry_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Type"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"risk_per_trade":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Per Trade"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Recovery Strategy Id"},"bias_controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Controller Id"},"cross_hedge_controller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Controller Id"},"calculation_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Style"},"risk_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Cash"},"custom_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Custom Margin"},"gold_scalp_divisor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold Scalp Divisor","default":100.0},"sl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Distance"},"max_active_positions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Active Positions"},"timeframes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Timeframes"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/AutomationSchedule"},{"type":"null"}]},"signal_tier_filter":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Signal Tier Filter"},"trade_mode_filter":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trade Mode Filter"},"enable_cross_hedge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Cross Hedge"},"cross_hedge_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Indicator"},"cross_hedge_signal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Hedge Signal Type"},"cross_hedge_indicators":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cross Hedge Indicators"},"tp1_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tp1 Action"},"tp1_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Close Percent"},"tp1_move_sl_to_be":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp1 Move Sl To Be"},"tp1_activate_tsl":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp1 Activate Tsl"},"tp2_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tp2 Action"},"tp2_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Close Percent"},"tp2_move_sl_to_be":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp2 Move Sl To Be"},"tp2_activate_tsl":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp2 Activate Tsl"},"tp3_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tp3 Action"},"tp3_close_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Close Percent"},"tp3_move_sl_to_be":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp3 Move Sl To Be"},"tp3_activate_tsl":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp3 Activate Tsl"},"tp1_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Be Offset Pips"},"tp1_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Tsl Distance"},"tp1_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Tsl Activation"},"tp2_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Be Offset Pips"},"tp2_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Tsl Distance"},"tp2_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Tsl Activation"},"tp3_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Be Offset Pips"},"tp3_tsl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Tsl Distance"},"tp3_tsl_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Tsl Activation"},"tp1_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Override Pips"},"tp2_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2 Override Pips"},"tp3_override_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3 Override Pips"},"be_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Be Pips"},"be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Be Offset Pips"},"tsl_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Distance Pips"},"tsl_activation_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Activation Pips"},"enable_hedge_recovery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Hedge Recovery"},"hedge_trigger_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Trigger Pips"},"hedge_recovery_add_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedge Recovery Add Trigger"},"hedge_recovery_add_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Add Pips"},"hedge_recovery_tsl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Tsl Pips"},"hedge_recovery_close_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedge Recovery Close Trigger"},"hedge_recovery_max_rehedges":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hedge Recovery Max Rehedges"},"hedge_recovery_acceptable_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Recovery Acceptable Loss Pct"},"hedge_recovery_stack_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedge Recovery Stack Indicator"},"hedge_recovery_stack_signal_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedge Recovery Stack Signal Tier"},"cross_signal_tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Tp Pips"},"cross_signal_tp_fixed_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Tp Fixed Price"},"cross_signal_tp_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Signal Tp Mode"},"cross_signal_sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cross Signal Sl Pips"},"cross_signal_use_sl_strategy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cross Signal Use Sl Strategy"},"cross_signal_sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Signal Sl Strategy Id"},"rapid_scalp_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rapid Scalp Mode"},"rapid_scalp_tp_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tp Points"},"rapid_scalp_tsl_lock_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tsl Lock Points"},"rapid_scalp_tsl_trail_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rapid Scalp Tsl Trail Points"},"rapid_scalp_use_cross_exit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rapid Scalp Use Cross Exit"},"group_profit_target_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Group Profit Target Points"},"stack_recovery_max_attempts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stack Recovery Max Attempts"},"stack_recovery_tsl_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Tsl Points"},"signal_queue_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signal Queue Enabled"},"signal_queue_freshness_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Signal Queue Freshness Seconds"},"auto_free_margin_on_block":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Free Margin On Block"},"require_bias_aligned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Bias Aligned"},"require_cross_aligned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Cross Aligned"},"auto_entry_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Entry Mode"},"controller_entry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Controller Entry"},"max_locked_pairs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Locked Pairs"},"min_bias_grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Bias Grade"},"entry_soft_cross_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Soft Cross Ok"},"entry_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Trigger"},"overlay_bias_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Bias Enforce"},"overlay_exhaustion_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Exhaustion Enforce"},"overlay_zone_enforce":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overlay Zone Enforce"},"entry_block_opposing_divergence":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Block Opposing Divergence"},"entry_block_opposing_osc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entry Block Opposing Osc"},"exhaustion_derisk_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Derisk Enabled"},"exhaustion_tier3_counter_add":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier3 Counter Add"},"exhaustion_tier1_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier1 Enabled"},"exhaustion_tier2_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier2 Enabled"},"exhaustion_tier3_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Tier3 Enabled"},"exhaustion_require_confirm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exhaustion Require Confirm"},"exhaustion_override_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exhaustion Override Count"},"bias_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Neutral Behavior"},"cross_neutral_behavior":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Neutral Behavior"},"trading_hours_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours Start"},"trading_hours_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours End"},"trading_hours_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Hours Timezone"},"loss_cooldown_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss Cooldown Minutes"},"recovery_min_signal_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Min Signal Tier"},"tp1_partial_close_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1 Partial Close Pct"},"tp1_move_be":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tp1 Move Be"},"daily_profit_target_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Dollars"},"daily_loss_limit_dollars":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Dollars"},"hedge_confirmation_bars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hedge Confirmation Bars"},"stack_size_progression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Size Progression"},"stack_progression_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Progression Multiplier"},"recovery_progress_notifications":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recovery Progress Notifications"},"roll_notifications":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Roll Notifications"},"recovery_target_equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Target Equity"},"min_margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Margin Pct"},"max_total_lots":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Total Lots"},"equity_stop_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Equity Stop Pct"},"max_spread_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Spread Points"},"min_margin_level_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Margin Level Pct"},"max_splits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Splits"},"stack_recovery_size_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Size Multiplier"},"stack_recovery_pause_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Pause Pips"},"stack_recovery_max_duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stack Recovery Max Duration Hours"},"stack_recovery_velocity_alert":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stack Recovery Velocity Alert"},"daily_profit_target_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Pct"},"daily_loss_limit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Pct"},"setup_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Setup Complete"},"setup_health_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Setup Health Score"},"recovery_max_duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovery Max Duration Hours"},"skip_on_deviation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip On Deviation"},"auto_deviation_from_tp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Deviation From Tp"},"max_entry_deviation_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Entry Deviation Points"},"min_viable_tp_distance_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Viable Tp Distance Points"},"signal_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Timeframe"},"bias_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bias Timeframe"},"cross_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cross Timeframe"}},"type":"object","title":"AutomationSettingUpdate"},"AutomationTestRequest":{"properties":{"symbol":{"type":"string","title":"Symbol"},"action":{"type":"string","title":"Action"},"calculation_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Style"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Percent"},"risk_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Cash"},"custom_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Custom Margin"},"gold_scalp_divisor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold Scalp Divisor","default":100.0},"sl_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Distance","default":0.0},"risk_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Risk Settings"}},"type":"object","required":["symbol","action"],"title":"AutomationTestRequest"},"AvailableIndicatorsResponse":{"properties":{"indicators":{"items":{"type":"string"},"type":"array","title":"Indicators"}},"type":"object","required":["indicators"],"title":"AvailableIndicatorsResponse"},"BackfillIn":{"properties":{"content":{"additionalProperties":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},"type":"object","title":"Content"}},"type":"object","required":["content"],"title":"BackfillIn"},"BalanceLotsRequest":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"The internal database ID for the trading account."}},"type":"object","required":["account_id"],"title":"BalanceLotsRequest"},"BiasControllerCreate":{"properties":{"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol","default":"XAUUSD"},"timeframe":{"type":"string","title":"Timeframe","default":""},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"is_public":{"type":"boolean","title":"Is Public","default":false},"neutral_behavior":{"type":"string","title":"Neutral Behavior","default":"pause"}},"type":"object","required":["name"],"title":"BiasControllerCreate"},"BiasSeedModesRequest":{"properties":{"symbol":{"type":"string","title":"Symbol","default":"XAUUSD"},"neutral_behavior":{"type":"string","title":"Neutral Behavior","default":"pause"}},"type":"object","title":"BiasSeedModesRequest"},"BrokerUpsert":{"properties":{"name":{"type":"string","title":"Name"},"platform":{"type":"string","title":"Platform","default":"MetaTrader 5"},"mt5_live":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mt5 Live"},"mt5_demo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mt5 Demo"},"mt4_live":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mt4 Live"},"mt4_demo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mt4 Demo"},"enabled":{"type":"boolean","title":"Enabled","default":true},"sort":{"type":"integer","title":"Sort","default":0}},"type":"object","required":["name"],"title":"BrokerUpsert"},"CapIn":{"properties":{"account":{"type":"string","title":"Account"},"max_contracts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Contracts"}},"type":"object","required":["account"],"title":"CapIn"},"ChatRequest":{"properties":{"message":{"type":"string","title":"Message"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatTurn"},"type":"array"},{"type":"null"}],"title":"History"}},"type":"object","required":["message"],"title":"ChatRequest"},"ChatTurn":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatTurn"},"CheckinIn":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"eod_balance":{"type":"number","title":"Eod Balance"},"high_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High Balance"},"low_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Low Balance"},"realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Pnl"},"trades":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Trades"},"contracts":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Contracts"},"followed_plan":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Followed Plan"},"note":{"type":"string","title":"Note","default":""},"payout":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Payout"},"copy_to":{"items":{"type":"integer"},"type":"array","title":"Copy To","default":[]}},"type":"object","required":["day","eod_balance"],"title":"CheckinIn"},"CheckoutIn":{"properties":{"acknowledge_risk":{"type":"boolean","title":"Acknowledge Risk","default":false},"confirm_risk":{"type":"boolean","title":"Confirm Risk","default":false}},"type":"object","title":"CheckoutIn"},"CheckoutReq":{"properties":{"price_id":{"type":"string","title":"Price Id"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","required":["price_id"],"title":"CheckoutReq"},"CloneIn":{"properties":{"count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Count","default":1},"copy_checkins":{"type":"boolean","title":"Copy Checkins","default":true}},"type":"object","title":"CloneIn"},"CloseIn":{"properties":{"month":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"title":"Month"},"cohort_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Id"}},"type":"object","title":"CloseIn"},"CmdIn":{"properties":{"device_id":{"type":"integer","title":"Device Id"},"account":{"type":"string","title":"Account"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"stop_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Price"},"limit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Limit Price"}},"type":"object","required":["device_id","account"],"title":"CmdIn"},"Cohort":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"start_date":{"type":"string","title":"Start Date"},"schedule":{"additionalProperties":{"type":"integer"},"type":"object","title":"Schedule"},"is_active":{"type":"boolean","title":"Is Active"},"hedging_demo":{"type":"boolean","title":"Hedging Demo","default":false}},"type":"object","required":["id","name","start_date","schedule","is_active"],"title":"Cohort"},"CohortIn":{"properties":{"name":{"type":"string","title":"Name"},"start_date":{"type":"string","title":"Start Date"},"schedule":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Schedule"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"hedging_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedging Demo"}},"type":"object","required":["name","start_date"],"title":"CohortIn"},"CohortSetIn":{"properties":{"user_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"User Ids"},"cohort_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Id"}},"type":"object","required":["user_ids"],"title":"CohortSetIn"},"ConnectionRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["account_id"],"title":"ConnectionRequest"},"CreateControllerRequest":{"properties":{"controller_type":{"type":"string","title":"Controller Type"},"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol","default":"XAUUSD"},"mode_accounts":{"items":{"$ref":"#/components/schemas/ModeAccountPair"},"type":"array","title":"Mode Accounts"},"custom_signal_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Signal Timeframe"},"custom_bias_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Bias Timeframe"},"custom_cross_timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Cross Timeframe"}},"type":"object","required":["controller_type","name","mode_accounts"],"title":"CreateControllerRequest"},"CreateTokenRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"default_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Account Id"},"preset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset Id"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"calc_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calc Style"},"risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Value"}},"type":"object","title":"CreateTokenRequest"},"CreateTradingPresetRequest":{"properties":{"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default","default":false},"default_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Account Id"},"default_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Symbol"},"default_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Strategy Id"},"default_risk_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Risk Style"},"default_risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Risk Value"},"default_tp_levels":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Default Tp Levels"},"default_be_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Be Enabled"},"default_be_trigger_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Be Trigger Pips"},"default_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Be Offset Pips"},"default_tsl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Tsl Enabled"},"default_tsl_activation_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Tsl Activation Pips"},"default_tsl_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Tsl Distance Pips"},"default_hedge_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Hedge Style"},"default_hedge_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Hedge Value"},"default_tsl_activate_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Tsl Activate Mode"},"default_stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Stack Recovery Strategy Id"}},"type":"object","required":["name"],"title":"CreateTradingPresetRequest"},"CreateUserRequest":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Display Name"},"temp_password":{"type":"string","maxLength":128,"minLength":8,"title":"Temp Password"},"tier":{"type":"string","title":"Tier","default":"free"},"role":{"type":"string","title":"Role","default":"user"}},"type":"object","required":["email","temp_password"],"title":"CreateUserRequest"},"CrossHedgeControllerCreate":{"properties":{"name":{"type":"string","title":"Name"},"symbol":{"type":"string","title":"Symbol","default":"XAUUSD"},"timeframe":{"type":"string","title":"Timeframe","default":""},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"is_public":{"type":"boolean","title":"Is Public","default":false},"neutral_behavior":{"type":"string","title":"Neutral Behavior","default":"pause"}},"type":"object","required":["name"],"title":"CrossHedgeControllerCreate"},"DecideIn":{"properties":{"status":{"type":"string","title":"Status"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["status"],"title":"DecideIn"},"DecisionIn":{"properties":{"user_id":{"type":"string","maxLength":64,"title":"User Id"},"ready":{"type":"boolean","title":"Ready"},"feedback":{"type":"string","maxLength":4000,"title":"Feedback","default":""}},"type":"object","required":["user_id","ready"],"title":"DecisionIn"},"DeleteIndicatorResponse":{"properties":{"status":{"type":"string","title":"Status"},"indicator_name":{"type":"string","title":"Indicator Name"},"deleted_count":{"type":"integer","title":"Deleted Count"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","indicator_name","deleted_count","message"],"title":"DeleteIndicatorResponse"},"DeleteSubscriptionRequest":{"properties":{"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["endpoint"],"title":"DeleteSubscriptionRequest"},"DesignateIn":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"advisor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advisor Id"}},"type":"object","required":["user_id"],"title":"DesignateIn"},"DirectEnabledIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"DirectEnabledIn"},"DirectPasswordIn":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"DirectPasswordIn"},"DrillProgressIn":{"properties":{"lesson_id":{"type":"string","title":"Lesson Id"},"answers":{"additionalProperties":{"type":"string"},"type":"object","title":"Answers","default":{}},"done":{"type":"boolean","title":"Done","default":false},"pct":{"type":"integer","title":"Pct","default":0}},"type":"object","required":["lesson_id"],"title":"DrillProgressIn"},"DrillProgressOut":{"properties":{"lesson_id":{"type":"string","title":"Lesson Id"},"answers":{"additionalProperties":{"type":"string"},"type":"object","title":"Answers"},"done":{"type":"boolean","title":"Done"},"pct":{"type":"integer","title":"Pct"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["lesson_id","answers","done","pct","updated_at"],"title":"DrillProgressOut"},"EmailTestIn":{"properties":{"to_email":{"type":"string","title":"To Email"}},"type":"object","required":["to_email"],"title":"EmailTestIn"},"EnrollmentIn":{"properties":{"email":{"type":"string","title":"Email"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"cohort_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Id"},"payment_current":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payment Current"}},"type":"object","required":["email"],"title":"EnrollmentIn"},"EnrollmentRow":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"cohort_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Id"},"payment_current":{"type":"boolean","title":"Payment Current"}},"type":"object","required":["user_id","payment_current"],"title":"EnrollmentRow"},"ExecuteStrategyRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"symbol":{"type":"string","title":"Symbol"},"volume":{"type":"number","title":"Volume"},"is_buy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Buy"},"stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Recovery Strategy Id"}},"type":"object","required":["account_id","symbol","volume"],"title":"ExecuteStrategyRequest"},"FeedbackIn":{"properties":{"user_id":{"type":"string","title":"User Id"},"module":{"type":"string","title":"Module"},"feedback":{"type":"string","title":"Feedback"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"module_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Title"}},"type":"object","required":["user_id","module","feedback"],"title":"FeedbackIn"},"FeedbackReadIn":{"properties":{"module":{"type":"string","title":"Module"}},"type":"object","required":["module"],"title":"FeedbackReadIn"},"FirmIn":{"properties":{"rule_id":{"type":"integer","title":"Rule Id"}},"type":"object","required":["rule_id"],"title":"FirmIn"},"FounderClaimIn":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email"],"title":"FounderClaimIn"},"GlobalPreset":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"trading_style":{"type":"string","title":"Trading Style"},"risk_level":{"type":"string","title":"Risk Level"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["id","name","trading_style","risk_level","config"],"title":"GlobalPreset"},"GrantBundleRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"tier":{"type":"string","title":"Tier","default":"strategist"},"months":{"type":"integer","title":"Months","default":6},"indicators":{"items":{"type":"string"},"type":"array","title":"Indicators","default":["KCX Dashboard","KCX Signals Dashboard"]},"send_welcome":{"type":"boolean","title":"Send Welcome","default":false}},"type":"object","required":["user_id"],"title":"GrantBundleRequest"},"GroupModifyPositionsRequest":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"The internal database ID for the trading account."},"position_group_id":{"type":"string","title":"Position Group Id","description":"The ID of the group to modify."},"stop_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Loss","description":"Optional new virtual stop loss."},"take_profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Take Profit","description":"Optional new virtual take profit."},"close_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Close Percent","description":"Optional percentage (1-100) to partially close."},"close_all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Close All","description":"If true, close all positions in the group."}},"type":"object","required":["account_id","position_group_id"],"title":"GroupModifyPositionsRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandoutIn":{"properties":{"course":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course","default":"verdict"},"week":{"type":"integer","title":"Week","default":1},"title":{"type":"string","title":"Title"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"url":{"type":"string","title":"Url","default":""},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published","default":true},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","required":["title"],"title":"HandoutIn"},"HandoutPatch":{"properties":{"week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","title":"HandoutPatch"},"HandoutRow":{"properties":{"dbId":{"type":"string","title":"Dbid"},"week":{"type":"integer","title":"Week"},"title":{"type":"string","title":"Title"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"url":{"type":"string","title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"order":{"type":"integer","title":"Order"},"published":{"type":"boolean","title":"Published"},"course":{"type":"string","title":"Course","default":"verdict"},"cohort":{"type":"string","title":"Cohort","default":""}},"type":"object","required":["dbId","week","title","url","order","published"],"title":"HandoutRow"},"InstallmentSetIn":{"properties":{"email":{"type":"string","title":"Email"},"payments_made":{"type":"integer","title":"Payments Made","default":1},"total_payments":{"type":"integer","title":"Total Payments","default":3},"unlock_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unlock Tier"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"next_payment_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Payment At"},"tier":{"type":"string","title":"Tier","default":"strategist"}},"type":"object","required":["email"],"title":"InstallmentSetIn"},"JoinIn":{"properties":{"account_id":{"type":"string","title":"Account Id"},"start_balance":{"type":"number","maximum":10000000.0,"exclusiveMinimum":0.0,"title":"Start Balance"},"nickname":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Nickname"}},"type":"object","required":["account_id","start_balance"],"title":"JoinIn"},"JournalEntry":{"properties":{"account_id":{"type":"string","maxLength":64,"title":"Account Id"},"position_id":{"type":"string","maxLength":64,"title":"Position Id"},"note":{"type":"string","maxLength":2000,"title":"Note","default":""},"setup_tag":{"type":"string","maxLength":50,"title":"Setup Tag","default":""},"followed_rules":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Followed Rules"},"chart_url":{"type":"string","maxLength":500,"title":"Chart Url","default":""}},"type":"object","required":["account_id","position_id"],"title":"JournalEntry"},"LabApplyIn":{"properties":{"automation_id":{"type":"integer","title":"Automation Id"},"tp_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Points"},"tsl_lock_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Lock Points"},"tsl_trail_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tsl Trail Points"},"hedge_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Distance Pips"},"pause":{"type":"boolean","title":"Pause","default":false}},"type":"object","required":["automation_id"],"title":"LabApplyIn"},"LeadIn":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"first_name":{"type":"string","maxLength":60,"title":"First Name","default":""},"score":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Score","default":0}},"type":"object","required":["email"],"title":"LeadIn"},"LectureIn":{"properties":{"course":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course","default":"verdict"},"week":{"type":"integer","title":"Week","default":1},"title":{"type":"string","title":"Title"},"sessionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessiondate"},"lectureUrl":{"type":"string","title":"Lectureurl","default":""},"qaUrl":{"type":"string","title":"Qaurl","default":""},"agendaUrl":{"type":"string","title":"Agendaurl","default":""},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published","default":true},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","required":["title"],"title":"LectureIn"},"LecturePatch":{"properties":{"week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"sessionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessiondate"},"lectureUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lectureurl"},"qaUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qaurl"},"agendaUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agendaurl"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"cohort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort"}},"type":"object","title":"LecturePatch"},"LectureRow":{"properties":{"dbId":{"type":"string","title":"Dbid"},"week":{"type":"integer","title":"Week"},"title":{"type":"string","title":"Title"},"sessionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessiondate"},"lectureUrl":{"type":"string","title":"Lectureurl"},"qaUrl":{"type":"string","title":"Qaurl"},"agendaUrl":{"type":"string","title":"Agendaurl","default":""},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"order":{"type":"integer","title":"Order"},"published":{"type":"boolean","title":"Published"},"course":{"type":"string","title":"Course","default":"verdict"}},"type":"object","required":["dbId","week","title","lectureUrl","qaUrl","order","published"],"title":"LectureRow"},"LeftoversIn":{"properties":{"user_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"User Ids"}},"type":"object","required":["user_ids"],"title":"LeftoversIn"},"LessonVideoIn":{"properties":{"lesson":{"additionalProperties":true,"type":"object","title":"Lesson"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published","default":true},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","required":["lesson"],"title":"LessonVideoIn"},"LessonVideoPatch":{"properties":{"lesson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lesson"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","title":"LessonVideoPatch"},"LessonVideoRow":{"properties":{"dbId":{"type":"string","title":"Dbid"},"order":{"type":"integer","title":"Order"},"published":{"type":"boolean","title":"Published"},"lesson":{"additionalProperties":true,"type":"object","title":"Lesson"}},"type":"object","required":["dbId","order","published","lesson"],"title":"LessonVideoRow"},"MaterializeSlIn":{"properties":{"name":{"type":"string","title":"Name"},"risk_settings":{"additionalProperties":true,"type":"object","title":"Risk Settings","default":{}},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","default":{}}},"type":"object","required":["name"],"title":"MaterializeSlIn"},"MaxLotsDecisionRequest":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"The internal database ID for the trading account."},"recovery_group_id":{"type":"string","title":"Recovery Group Id","description":"recovery_group_id (or parent position id) that hit the max-lots cap."},"approve":{"type":"boolean","title":"Approve","description":"True = continue stacking (raise the cap one increment). False = stop; user intervenes."}},"type":"object","required":["account_id","recovery_group_id","approve"],"title":"MaxLotsDecisionRequest"},"MergeUsersRequest":{"properties":{"keeper":{"type":"string","maxLength":320,"title":"Keeper"},"duplicate":{"type":"string","maxLength":320,"title":"Duplicate"},"dry_run":{"type":"boolean","title":"Dry Run","default":true},"delete_login":{"type":"boolean","title":"Delete Login","default":true}},"type":"object","required":["keeper","duplicate"],"title":"MergeUsersRequest"},"MessageCreate":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"MessageCreate"},"MessageOut":{"properties":{"id":{"type":"string","title":"Id"},"ticket_id":{"type":"string","title":"Ticket Id"},"sender_id":{"type":"string","title":"Sender Id"},"is_admin":{"type":"boolean","title":"Is Admin"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"}},"type":"object","required":["id","ticket_id","sender_id","is_admin","body","created_at","read_at"],"title":"MessageOut"},"ModeAccountPair":{"properties":{"mode":{"type":"string","title":"Mode"},"trading_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Id"},"account_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Ids"},"risk_level":{"type":"string","title":"Risk Level","default":"normal"},"bias_enabled":{"type":"boolean","title":"Bias Enabled","default":false},"cross_enabled":{"type":"boolean","title":"Cross Enabled","default":false},"daily_profit_target_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Profit Target Pct"},"daily_loss_limit_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Loss Limit Pct"},"min_margin_level_pct":{"type":"number","title":"Min Margin Level Pct","default":1100},"rapid_scalp_acknowledged":{"type":"boolean","title":"Rapid Scalp Acknowledged","default":false}},"type":"object","required":["mode"],"title":"ModeAccountPair"},"MyAccess":{"properties":{"enrolled":{"type":"boolean","title":"Enrolled"},"cohort_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Name"},"payment_current":{"type":"boolean","title":"Payment Current"},"locked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locked Reason"},"precourse_block":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Precourse Block"},"units":{"additionalProperties":{"$ref":"#/components/schemas/UnitAccess"},"type":"object","title":"Units"}},"type":"object","required":["enrolled","payment_current","units"],"title":"MyAccess"},"NotificationSettings":{"properties":{"user_id":{"type":"string","title":"User Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"notification_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Email"},"signals_sms":{"type":"boolean","title":"Signals Sms","default":false},"signals_email":{"type":"boolean","title":"Signals Email","default":false},"trades_sms":{"type":"boolean","title":"Trades Sms","default":false},"trades_email":{"type":"boolean","title":"Trades Email","default":false},"app_sound":{"type":"boolean","title":"App Sound","default":false},"hedge_sms":{"type":"boolean","title":"Hedge Sms","default":false},"hedge_email":{"type":"boolean","title":"Hedge Email","default":false},"stack_sms":{"type":"boolean","title":"Stack Sms","default":false},"stack_email":{"type":"boolean","title":"Stack Email","default":false},"signals_push":{"type":"boolean","title":"Signals Push","default":false},"trades_push":{"type":"boolean","title":"Trades Push","default":false},"hedge_push":{"type":"boolean","title":"Hedge Push","default":false},"stack_push":{"type":"boolean","title":"Stack Push","default":false},"pending_fills_sms":{"type":"boolean","title":"Pending Fills Sms","default":false},"pending_fills_email":{"type":"boolean","title":"Pending Fills Email","default":false},"pending_fills_push":{"type":"boolean","title":"Pending Fills Push","default":false},"automated_trades_sms":{"type":"boolean","title":"Automated Trades Sms","default":false},"automated_trades_email":{"type":"boolean","title":"Automated Trades Email","default":false},"automated_trades_push":{"type":"boolean","title":"Automated Trades Push","default":false},"subscribed_indicators":{"items":{"type":"string"},"type":"array","title":"Subscribed Indicators","default":[]},"subscribed_timeframes":{"items":{"type":"string"},"type":"array","title":"Subscribed Timeframes","default":[]},"subscribed_statuses":{"items":{"type":"string"},"type":"array","title":"Subscribed Statuses","default":[]},"status_push":{"type":"boolean","title":"Status Push","default":false},"subscribed_presets":{"items":{"type":"string"},"type":"array","title":"Subscribed Presets","default":[]},"subscribed_combos":{"items":{"type":"string"},"type":"array","title":"Subscribed Combos","default":[]},"preset_push":{"type":"boolean","title":"Preset Push","default":false},"combo_push":{"type":"boolean","title":"Combo Push","default":false},"fallback_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Strategy Id"},"declared_mode":{"type":"string","title":"Declared Mode","default":"scalp"},"preferred_language":{"type":"string","title":"Preferred Language","default":"en"},"news_push":{"type":"boolean","title":"News Push","default":false},"news_sms":{"type":"boolean","title":"News Sms","default":false},"subscribed_news_colors":{"items":{"type":"string"},"type":"array","title":"Subscribed News Colors","default":[]},"subscribed_news_currencies":{"items":{"type":"string"},"type":"array","title":"Subscribed News Currencies","default":[]},"hedge_lock_reminder_hours":{"type":"integer","title":"Hedge Lock Reminder Hours","default":0},"hedge_lock_sr_alert":{"type":"boolean","title":"Hedge Lock Sr Alert","default":false}},"type":"object","required":["user_id"],"title":"NotificationSettings"},"Nt8AllowIn":{"properties":{"accounts":{"items":{"type":"string"},"type":"array","title":"Accounts"},"caps":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Caps"}},"type":"object","required":["accounts"],"title":"Nt8AllowIn"},"OcoArmIn":{"properties":{"trading_account_id":{"type":"string","title":"Trading Account Id"},"symbol":{"type":"string","title":"Symbol"},"volume":{"type":"number","title":"Volume"},"offset_pips":{"type":"number","title":"Offset Pips"},"sl_strategy_id":{"type":"string","title":"Sl Strategy Id"},"stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Recovery Strategy Id"}},"type":"object","required":["trading_account_id","symbol","volume","offset_pips","sl_strategy_id"],"title":"OcoArmIn"},"OrderIn":{"properties":{"device_id":{"type":"integer","title":"Device Id"},"account":{"type":"string","title":"Account"},"symbol":{"type":"string","title":"Symbol"},"action":{"type":"string","title":"Action"},"qty":{"type":"integer","title":"Qty","default":1},"order_type":{"type":"string","title":"Order Type","default":"market"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"sl_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Points"},"tp_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Points"}},"type":"object","required":["device_id","account","symbol","action"],"title":"OrderIn"},"OverrideIn":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"OverrideIn"},"PairIn":{"properties":{"code":{"type":"string","title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"addon_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon Version"}},"type":"object","required":["code"],"title":"PairIn"},"PanelTicket":{"properties":{"account_id":{"type":"string","title":"Account Id"},"action":{"type":"string","title":"Action","default":"buy"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"entry_type":{"type":"string","title":"Entry Type","default":"market"},"entry":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry"},"sl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl"},"tp":{"anyOf":[{},{"type":"null"}],"title":"Tp"},"lots":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lots"},"risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Percent"},"sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Pips"},"tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Pips"},"preset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset Id"},"calc_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calc Style"},"risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Value"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","default":"KCX panel"}},"type":"object","required":["account_id"],"title":"PanelTicket"},"PlayOut":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PlayOut"},"PositionAnalysis":{"properties":{"position_id":{"type":"string","title":"Position Id"},"strategy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Name"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"status":{"type":"string","title":"Status"},"rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rules"},"next_actions":{"items":{"type":"string"},"type":"array","title":"Next Actions","default":[]},"current_profit_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Profit Pips"}},"type":"object","required":["position_id","status"],"title":"PositionAnalysis"},"PositionCloseRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"position_id":{"type":"string","title":"Position Id"}},"type":"object","required":["account_id","position_id"],"title":"PositionCloseRequest"},"PositionStackingStrategy":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"default_sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Sl Strategy Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","user_id","name","config"],"title":"PositionStackingStrategy"},"PositionStackingStrategyCreate":{"properties":{"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"default_sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Sl Strategy Id"}},"type":"object","required":["name","config"],"title":"PositionStackingStrategyCreate"},"PositionStackingStrategyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"default_sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Sl Strategy Id"}},"type":"object","title":"PositionStackingStrategyUpdate"},"PreclaimIn":{"properties":{"email":{"type":"string","title":"Email"},"tv_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tv Username"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["email"],"title":"PreclaimIn"},"PrizesIn":{"properties":{"levels":{"items":{},"type":"array","title":"Levels","default":[]},"monthly":{"items":{"type":"string"},"type":"array","title":"Monthly","default":[]},"cohort":{"items":{"type":"string"},"type":"array","title":"Cohort","default":[]}},"type":"object","title":"PrizesIn"},"ProfileIn":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","title":"ProfileIn"},"PublicStrategy":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"is_global":{"type":"boolean","title":"Is Global","default":false},"clone_count":{"type":"integer","title":"Clone Count","default":0},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"published_by_label":{"type":"string","title":"Published By Label","default":"BettaTrader Team"},"already_cloned":{"type":"boolean","title":"Already Cloned","default":false}},"type":"object","required":["id","name"],"title":"PublicStrategy"},"PublishStrategyRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"is_global":{"type":"boolean","title":"Is Global","default":false}},"type":"object","title":"PublishStrategyRequest"},"PushSubscription":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"keys":{"additionalProperties":true,"type":"object","title":"Keys"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["endpoint","keys"],"title":"PushSubscription"},"QuickTradeRequest":{"properties":{"preset_id":{"type":"string","title":"Preset Id"},"action":{"type":"string","title":"Action"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"calculation_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Style"}},"type":"object","required":["preset_id","action"],"title":"QuickTradeRequest"},"ReEnableStrategiesRequest":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"The internal database ID for the trading account."},"position_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Group Id","description":"Optional: target a specific position group. If omitted, re-enables all manual-control positions on the account."},"resume_recovery":{"type":"boolean","title":"Resume Recovery","description":"If True, clear ONLY user_manual_control and KEEP the hedge/recovery tracking intact, so the recovery monitor resumes managing the existing hedge group (use this to undo a FALSE user-control flag on a position that is really still hedged). If False (default), the legacy behavior also drops hedge tracking — the user manages the trade.","default":false}},"type":"object","required":["account_id"],"title":"ReEnableStrategiesRequest"},"ReRegisterPositionRequest":{"properties":{"metaApiAccountId":{"type":"string","title":"Metaapiaccountid"},"positionId":{"type":"string","title":"Positionid"}},"type":"object","required":["metaApiAccountId","positionId"],"title":"ReRegisterPositionRequest"},"Recommendation":{"properties":{"preset_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Preset Id"},"no_trade":{"type":"boolean","title":"No Trade","default":false},"note":{"type":"string","maxLength":500,"title":"Note","default":""}},"type":"object","title":"Recommendation"},"RemindIn":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"all":{"type":"boolean","title":"All","default":false}},"type":"object","title":"RemindIn"},"ReportIn":{"properties":{"rule_id":{"type":"integer","title":"Rule Id"},"message":{"type":"string","maxLength":2000,"minLength":5,"title":"Message"},"url":{"type":"string","title":"Url","default":""}},"type":"object","required":["rule_id","message"],"title":"ReportIn"},"ResetAllConnectionsResponse":{"properties":{"circuit_breakers_reset":{"type":"integer","title":"Circuit Breakers Reset"},"connections_removed":{"type":"integer","title":"Connections Removed"},"reconnect_triggered":{"type":"boolean","title":"Reconnect Triggered"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["circuit_breakers_reset","connections_removed","reconnect_triggered","errors"],"title":"ResetAllConnectionsResponse"},"ResourceIn":{"properties":{"group":{"type":"string","title":"Group","default":"Guides"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url","default":""},"kind":{"type":"string","title":"Kind","default":"doc"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published","default":true},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"cohort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort","default":""},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility","default":"public"},"requiredIndicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requiredindicator"}},"type":"object","required":["title"],"title":"ResourceIn"},"ResourceLayout":{"properties":{"tabs":{"items":{"type":"string"},"type":"array","title":"Tabs","default":[]},"items":{"additionalProperties":true,"type":"object","title":"Items","default":{}}},"type":"object","title":"ResourceLayout"},"ResourcePatch":{"properties":{"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"requiredIndicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requiredindicator"}},"type":"object","title":"ResourcePatch"},"ResourceRow":{"properties":{"dbId":{"type":"string","title":"Dbid"},"group":{"type":"string","title":"Group"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"kind":{"type":"string","title":"Kind"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order":{"type":"integer","title":"Order"},"published":{"type":"boolean","title":"Published"},"visibility":{"type":"string","title":"Visibility","default":"public"},"requiredIndicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requiredindicator"}},"type":"object","required":["dbId","group","title","url","kind","order","published"],"title":"ResourceRow"},"RiskSettingCreate":{"properties":{"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"setting_type":{"type":"string","title":"Setting Type"},"limit_value":{"type":"number","title":"Limit Value"},"include_unrealized":{"type":"boolean","title":"Include Unrealized","default":true},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["setting_type","limit_value"],"title":"RiskSettingCreate"},"RiskSettingResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"setting_type":{"type":"string","title":"Setting Type"},"limit_value":{"type":"number","title":"Limit Value"},"include_unrealized":{"type":"boolean","title":"Include Unrealized"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","user_id","setting_type","limit_value","include_unrealized","is_active","created_at","updated_at"],"title":"RiskSettingResponse"},"RiskSettingUpdate":{"properties":{"limit_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Limit Value"},"include_unrealized":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Unrealized"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},"type":"object","title":"RiskSettingUpdate"},"RiskStateResponse":{"properties":{"setting_id":{"type":"string","title":"Setting Id"},"is_locked":{"type":"boolean","title":"Is Locked"},"locked_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locked Until"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"trailing_high_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trailing High Balance"},"trailing_floor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trailing Floor"},"current_period_pnl":{"type":"number","title":"Current Period Pnl","default":0},"last_checked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Checked At"}},"type":"object","required":["setting_id","is_locked"],"title":"RiskStateResponse"},"RiskStatusItem":{"properties":{"setting":{"$ref":"#/components/schemas/RiskSettingResponse"},"state":{"anyOf":[{"$ref":"#/components/schemas/RiskStateResponse"},{"type":"null"}]}},"type":"object","required":["setting"],"title":"RiskStatusItem","description":"Combined risk setting + its live state."},"RiskStatusListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RiskStatusItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RiskStatusListResponse"},"RuleIn":{"properties":{"firm":{"type":"string","title":"Firm"},"program":{"type":"string","title":"Program"},"phase":{"type":"string","title":"Phase"},"size_label":{"type":"string","title":"Size Label"},"account_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Account Size"},"start_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Balance"},"rules":{"additionalProperties":true,"type":"object","title":"Rules","default":{}},"source_urls":{"items":{"type":"string"},"type":"array","title":"Source Urls","default":[]},"verified":{"type":"boolean","title":"Verified","default":false},"active":{"type":"boolean","title":"Active","default":true},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["firm","program","phase","size_label"],"title":"RuleIn"},"SLStrategy":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"is_public":{"type":"boolean","title":"Is Public","default":false},"config":{"additionalProperties":true,"type":"object","title":"Config"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hedge_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedge Enabled","default":false},"hedge_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Distance Pips","default":200},"trading_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Style"},"risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},"type":"object","required":["id","user_id","name","config"],"title":"SLStrategy"},"SLStrategyIn":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_public":{"type":"boolean","title":"Is Public","default":false},"config":{"additionalProperties":true,"type":"object","title":"Config"},"hedge_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedge Enabled","default":false},"hedge_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hedge Distance Pips","default":200}},"type":"object","required":["name","config"],"title":"SLStrategyIn"},"SavedWorkIn":{"properties":{"user_id":{"type":"string","title":"User Id"},"content":{"additionalProperties":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},"type":"object","title":"Content"}},"type":"object","required":["user_id","content"],"title":"SavedWorkIn"},"ScheduledTrade":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"trading_account_id":{"type":"string","title":"Trading Account Id"},"trading_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Name"},"symbol":{"type":"string","title":"Symbol"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price"},"sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Pips"},"tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Pips"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"is_oco":{"type":"boolean","title":"Is Oco","default":false},"oco_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Oco Offset Pips"},"recurring":{"type":"boolean","title":"Recurring","default":false},"recur_days":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recur Days"}},"type":"object","required":["id","user_id","trading_account_id","symbol","scheduled_at","status","created_at","updated_at"],"title":"ScheduledTrade"},"ScheduledTradeCreate":{"properties":{"trading_account_id":{"type":"string","title":"Trading Account Id"},"symbol":{"type":"string","title":"Symbol"},"direction":{"type":"string","title":"Direction"},"volume":{"type":"number","title":"Volume"},"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price"},"sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Pips"},"tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Pips"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"is_oco":{"type":"boolean","title":"Is Oco","default":false},"oco_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Oco Offset Pips"},"recurring":{"type":"boolean","title":"Recurring","default":false},"recur_days":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recur Days"}},"type":"object","required":["trading_account_id","symbol","direction","volume","scheduled_at"],"title":"ScheduledTradeCreate"},"ScheduledTradeUpdate":{"properties":{"trading_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Account Id"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price"},"sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Pips"},"tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Pips"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"is_oco":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Oco"},"oco_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Oco Offset Pips"},"recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recurring"},"recur_days":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recur Days"}},"type":"object","title":"ScheduledTradeUpdate"},"SeedModesRequest":{"properties":{"symbol":{"type":"string","title":"Symbol","default":"XAUUSD"},"neutral_behavior":{"type":"string","title":"Neutral Behavior","default":"pause"}},"type":"object","title":"SeedModesRequest"},"SendNoteRequest":{"properties":{"user":{"type":"string","maxLength":320,"title":"User"},"email":{"type":"boolean","title":"Email","default":true},"sms":{"type":"boolean","title":"Sms","default":false},"subject":{"type":"string","maxLength":200,"title":"Subject","default":"A note from Kingdom X-Change"},"message":{"type":"string","maxLength":1600,"title":"Message","default":""},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["user"],"title":"SendNoteRequest"},"SendWelcomeIn":{"properties":{"email":{"type":"string","title":"Email"},"edition_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edition Label","default":"The Verdict — Strategist Edition"},"include_indicators":{"type":"boolean","title":"Include Indicators","default":true},"months":{"type":"integer","title":"Months","default":6}},"type":"object","required":["email"],"title":"SendWelcomeIn"},"SetAccountRequest":{"properties":{"default_account_id":{"type":"string","title":"Default Account Id"}},"type":"object","required":["default_account_id"],"title":"SetAccountRequest"},"SetDefaultsRequest":{"properties":{"preset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset Id"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"calc_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calc Style"},"risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Value"}},"type":"object","title":"SetDefaultsRequest"},"Signal":{"properties":{"id":{"type":"string","title":"Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"indicator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator Name"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"exchange":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange"},"timeframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeframe"},"entry_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Type"},"signal_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Tier"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"scoped_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scoped Mode"},"ch_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ch Trend"},"ch_divergence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ch Divergence"},"ch_div_vs_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ch Div Vs Trend"},"ch_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ch Action"},"exh_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exh Tier"},"exh_tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exh Tier Name"},"exh_signals":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exh Signals"},"regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime"},"verdict_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict Summary"},"setup":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup"},"setup_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Note"},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price"},"stop_loss_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Loss Price"},"take_profit_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Take Profit 1"},"take_profit_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Take Profit 2"},"take_profit_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Take Profit 3"},"strength":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strength"},"time_signal_received":{"type":"string","format":"date-time","title":"Time Signal Received"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"trail_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trail Distance"},"trail_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trail Activation"}},"type":"object","required":["id","time_signal_received"],"title":"Signal"},"SrDistanceReq":{"properties":{"account_id":{"type":"string","title":"Account Id"},"symbol":{"type":"string","title":"Symbol"},"timeframe":{"type":"string","title":"Timeframe","default":"1m"},"point_size":{"type":"number","title":"Point Size","default":1.0},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant"}},"type":"object","required":["account_id","symbol"],"title":"SrDistanceReq"},"StackRecoveryCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"symbol":{"type":"string","title":"Symbol","default":"XAUUSD"},"stack_trigger_pips":{"type":"number","title":"Stack Trigger Pips","default":200},"stack_tsl_pips":{"type":"number","title":"Stack Tsl Pips","default":800},"stack_max_attempts":{"type":"integer","title":"Stack Max Attempts","default":3},"stack_lot_multiplier":{"type":"number","title":"Stack Lot Multiplier","default":1.0},"stack_pause_pips":{"type":"number","title":"Stack Pause Pips","default":100},"stack_max_duration_hours":{"type":"number","title":"Stack Max Duration Hours","default":24},"acceptable_loss_pct":{"type":"number","title":"Acceptable Loss Pct","default":0},"recovery_mode":{"type":"string","title":"Recovery Mode","default":"ladder"},"stack_tsl_activation_pips":{"type":"number","title":"Stack Tsl Activation Pips","default":0},"stack_tsl_lock_pips":{"type":"number","title":"Stack Tsl Lock Pips","default":25},"stack_tsl_trail_pips":{"type":"number","title":"Stack Tsl Trail Pips","default":25},"stack_tsl_be_offset_pips":{"type":"number","title":"Stack Tsl Be Offset Pips","default":5},"hedge_stack_trigger_pips":{"type":"number","title":"Hedge Stack Trigger Pips","default":200},"position_stack_trigger_pips":{"type":"number","title":"Position Stack Trigger Pips","default":0},"roll_retrace_fraction":{"type":"number","title":"Roll Retrace Fraction","default":0.5},"roll_enabled":{"type":"boolean","title":"Roll Enabled","default":true},"add_trigger":{"type":"string","title":"Add Trigger","default":"any"},"confirming_signal_pct":{"type":"number","title":"Confirming Signal Pct","default":50},"max_concurrent_losing_stacks":{"type":"integer","title":"Max Concurrent Losing Stacks","default":3},"cross_hedge_block_seconds":{"type":"number","title":"Cross Hedge Block Seconds","default":90},"retrace_neutralize_cooldown_s":{"type":"number","title":"Retrace Neutralize Cooldown S","default":120},"balance_tolerance_lots":{"type":"number","title":"Balance Tolerance Lots","default":0},"max_balance_legs":{"type":"integer","title":"Max Balance Legs","default":5},"stack_recovery_min_margin_pct":{"type":"number","title":"Stack Recovery Min Margin Pct","default":400},"recovery_tolerance_enabled":{"type":"boolean","title":"Recovery Tolerance Enabled","default":true},"recovery_tolerance_pct":{"type":"number","title":"Recovery Tolerance Pct","default":2.0},"recovery_tolerance_cap_usd":{"type":"number","title":"Recovery Tolerance Cap Usd","default":10},"recovery_conditional_target_bank":{"type":"boolean","title":"Recovery Conditional Target Bank","default":false},"recovery_target_giveback_pct":{"type":"number","title":"Recovery Target Giveback Pct","default":20},"stack_progression_mode":{"type":"string","title":"Stack Progression Mode","default":"auto"},"recovery_max_gross_multiple":{"type":"number","title":"Recovery Max Gross Multiple","default":0},"max_net_tilt_lots":{"type":"number","title":"Max Net Tilt Lots","default":0},"recovery_full_attempts_before_accept":{"type":"integer","title":"Recovery Full Attempts Before Accept","default":2},"recovery_reverify_shortfall_usd":{"type":"number","title":"Recovery Reverify Shortfall Usd","default":0},"recovery_reverify_max_attempts":{"type":"integer","title":"Recovery Reverify Max Attempts","default":3},"recovery_min_profit_buffer_usd":{"type":"number","title":"Recovery Min Profit Buffer Usd","default":0},"recovery_held_backstop_pct":{"type":"number","title":"Recovery Held Backstop Pct","default":0.03},"recovery_held_margin_alert_pct":{"type":"number","title":"Recovery Held Margin Alert Pct","default":150},"recovery_held_stale_hours":{"type":"number","title":"Recovery Held Stale Hours","default":24},"roll_close_hedge_enabled":{"type":"boolean","title":"Roll Close Hedge Enabled","default":true},"roll_hedge_fraction":{"type":"number","title":"Roll Hedge Fraction","default":0.75},"roll_hedge_fraction_priceonly":{"type":"number","title":"Roll Hedge Fraction Priceonly","default":0.9},"roll_count_loss_side_failed":{"type":"boolean","title":"Roll Count Loss Side Failed","default":false},"divergence_derisk_mode":{"type":"string","title":"Divergence Derisk Mode","default":"net0"},"rebalance_drawdown_trigger":{"type":"number","title":"Rebalance Drawdown Trigger","default":0},"rebalance_drawdown_action":{"type":"string","title":"Rebalance Drawdown Action","default":"net0"},"recovery_direction_mode":{"type":"string","title":"Recovery Direction Mode","default":"auto"},"stack_tp1_pips":{"type":"number","title":"Stack Tp1 Pips","default":0},"stack_tp1_close_pct":{"type":"number","title":"Stack Tp1 Close Pct","default":0},"stack_tp2_pips":{"type":"number","title":"Stack Tp2 Pips","default":0},"stack_tp2_close_pct":{"type":"number","title":"Stack Tp2 Close Pct","default":0},"stack_tp3_pips":{"type":"number","title":"Stack Tp3 Pips","default":0},"stack_tp3_close_pct":{"type":"number","title":"Stack Tp3 Close Pct","default":0},"is_public":{"type":"boolean","title":"Is Public","default":false}},"type":"object","required":["name"],"title":"StackRecoveryCreate"},"StackingStrategyRequest":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"The internal database ID for the trading account."},"symbol":{"type":"string","title":"Symbol","description":"The symbol to trade (e.g., 'EURUSD')."},"volume":{"type":"number","exclusiveMinimum":0.0,"title":"Volume","description":"The lot size for each position in the stack."},"num_positions":{"type":"integer","exclusiveMinimum":0.0,"title":"Num Positions","description":"The number of pending orders to place."},"pip_interval":{"type":"integer","exclusiveMinimum":0.0,"title":"Pip Interval","description":"The distance in pips between each pending order."},"is_buy":{"type":"boolean","title":"Is Buy","description":"True for a buy stack (BUY_STOP), False for a sell stack (SELL_STOP)."},"advanced_rules":{"additionalProperties":true,"type":"object","title":"Advanced Rules","description":"A dictionary of advanced rules to apply to the stack.","default":{}},"levels":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Levels","description":"Optional list of dynamic levels (volume, activate_at) for dynamic mode."},"pip_units":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pip Units","description":"'standard_v1' = pip distances are standard pips (gold $0.10), as saved by the strategy editor; None = engine pips."}},"type":"object","required":["account_id","symbol","volume","num_positions","pip_interval","is_buy"],"title":"StackingStrategyRequest"},"StartTrialIn":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"override":{"type":"boolean","title":"Override","default":false}},"type":"object","required":["email"],"title":"StartTrialIn"},"StrategyPreviewRequest":{"properties":{"account_id":{"type":"string","title":"Account Id","description":"The ID of the trading account."},"symbol":{"type":"string","title":"Symbol","description":"The trading symbol."},"action":{"type":"string","title":"Action","description":"The trade action ('buy' or 'sell')."},"volume":{"type":"number","exclusiveMinimum":0.0,"title":"Volume","description":"The volume of the trade."},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id","description":"The ID of the SL/TP strategy to apply."},"sl_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Price","description":"The manual stop-loss price."},"tp_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Price","description":"The manual take-profit price."}},"type":"object","required":["account_id","symbol","action","volume"],"title":"StrategyPreviewRequest"},"StrategyPreviewResponse":{"properties":{"margin":{"type":"number","title":"Margin","description":"The required margin for the trade."},"profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit","description":"The potential profit if take-profit is hit."},"loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss","description":"The potential loss if stop-loss is hit."},"calculated_sl_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calculated Sl Price","description":"The calculated stop-loss price from the strategy."},"calculated_tp_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calculated Tp Price","description":"The calculated take-profit price from the strategy."},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Price","description":"The entry price used for calculation."},"sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Pips","description":"The distance to stop-loss in pips/points."},"tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Pips","description":"The distance to take-profit in pips/points."},"dynamic_rules":{"items":{"type":"string"},"type":"array","title":"Dynamic Rules","description":"Descriptions of dynamic rules applied."},"explain":{"items":{"type":"string"},"type":"array","title":"Explain","description":"Moving-level rules in plain words."},"path":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Path","description":"The strategy's trade path: one level per rule, `offset` = price distance from entry, positive toward profit."},"std_pip":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Std Pip","description":"Standard pip size of the symbol (gold $0.10)."},"money_per_unit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Money Per Unit","description":"Account money per 1.0 price move for this volume."}},"type":"object","required":["margin"],"title":"StrategyPreviewResponse"},"StreamTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"uid":{"type":"string","title":"Uid"},"customer":{"type":"string","title":"Customer"},"exp":{"type":"integer","title":"Exp"}},"type":"object","required":["token","uid","customer","exp"],"title":"StreamTokenResponse"},"SubmissionIn":{"properties":{"module":{"type":"string","title":"Module"},"answered":{"type":"integer","title":"Answered","default":0},"total":{"type":"integer","title":"Total","default":0},"gates":{"type":"integer","title":"Gates","default":0},"gate_total":{"type":"integer","title":"Gate Total","default":0},"module_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Title"},"student_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Name"},"answered_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answered Pct"},"answers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Answers"},"chart_links":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Chart Links"}},"type":"object","required":["module"],"title":"SubmissionIn"},"SubmitIn":{"properties":{"answers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Answers"}},"type":"object","required":["answers"],"title":"SubmitIn"},"SubscriptionAnomalyDetail":{"properties":{"user_id":{"type":"string","title":"User Id"},"issue":{"type":"string","title":"Issue"},"current_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Value"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},"type":"object","required":["user_id","issue"],"title":"SubscriptionAnomalyDetail"},"SubscriptionHealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"firestore_user_count":{"type":"integer","title":"Firestore User Count"},"postgres_user_count":{"type":"integer","title":"Postgres User Count"},"user_drift":{"type":"number","title":"User Drift"},"missing_plan_count":{"type":"integer","title":"Missing Plan Count"},"invalid_plan_count":{"type":"integer","title":"Invalid Plan Count"},"missing_status_count":{"type":"integer","title":"Missing Status Count"},"invalid_status_count":{"type":"integer","title":"Invalid Status Count"},"override_tier_count":{"type":"integer","title":"Override Tier Count"},"active_no_plan_count":{"type":"integer","title":"Active No Plan Count"},"tier_changes_24h":{"type":"integer","title":"Tier Changes 24H"},"last_tier_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Tier Change"},"anomaly_details":{"items":{"$ref":"#/components/schemas/SubscriptionAnomalyDetail"},"type":"array","title":"Anomaly Details","default":[]},"checked_at":{"type":"string","title":"Checked At"}},"type":"object","required":["status","firestore_user_count","postgres_user_count","user_drift","missing_plan_count","invalid_plan_count","missing_status_count","invalid_status_count","override_tier_count","active_no_plan_count","tier_changes_24h","checked_at"],"title":"SubscriptionHealthResponse"},"SubscriptionInfo":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["endpoint","user_agent","created_at"],"title":"SubscriptionInfo"},"TPLevel":{"properties":{"price":{"type":"number","title":"Price"},"close_percent":{"type":"number","title":"Close Percent"},"sl_action":{"type":"string","title":"Sl Action","default":"none"},"sl_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Value"},"entry_offset":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Offset"},"trailing_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trailing Distance"},"trailing_activation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trailing Activation"}},"type":"object","required":["price","close_percent"],"title":"TPLevel","description":"A single take-profit level with partial close and SL action config."},"TestNotificationRequest":{"properties":{"channel":{"type":"string","title":"Channel"}},"type":"object","required":["channel"],"title":"TestNotificationRequest"},"TicketCreate":{"properties":{"subject":{"type":"string","title":"Subject"},"category":{"type":"string","title":"Category","default":"general"},"body":{"type":"string","title":"Body"},"source":{"type":"string","title":"Source","default":"support-form"}},"type":"object","required":["subject","body"],"title":"TicketCreate"},"TicketDetail":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"subject":{"type":"string","title":"Subject"},"category":{"type":"string","title":"Category"},"status":{"type":"string","title":"Status"},"priority":{"type":"string","title":"Priority"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"messages":{"items":{"$ref":"#/components/schemas/MessageOut"},"type":"array","title":"Messages"}},"type":"object","required":["id","user_id","subject","category","status","priority","assigned_to","created_at","updated_at","resolved_at","messages"],"title":"TicketDetail"},"TicketRequest":{"properties":{"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"action":{"type":"string","title":"Action","default":"buy"},"position_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Id"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"entry_type":{"type":"string","title":"Entry Type","default":"market"},"entry":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry"},"sl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl"},"tp":{"anyOf":[{},{"type":"null"}],"title":"Tp"},"lots":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lots"},"risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Percent"},"calc_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calc Style"},"risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Value"},"sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Pips"},"sl_ticks":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sl Ticks"},"tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp Pips"},"preset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset Id"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"be":{"type":"boolean","title":"Be","default":false},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","default":"KCX ticket"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"force_execute":{"type":"boolean","title":"Force Execute","default":false}},"type":"object","title":"TicketRequest"},"TicketStatusUpdate":{"properties":{"status":{"type":"string","title":"Status"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},"type":"object","required":["status"],"title":"TicketStatusUpdate"},"TicketSummary":{"properties":{"id":{"type":"string","title":"Id"},"subject":{"type":"string","title":"Subject"},"category":{"type":"string","title":"Category"},"status":{"type":"string","title":"Status"},"priority":{"type":"string","title":"Priority"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"unread_count":{"type":"integer","title":"Unread Count","default":0}},"type":"object","required":["id","subject","category","status","priority","assigned_to","created_at","updated_at"],"title":"TicketSummary"},"TradeCopierPreset":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"name":{"type":"string","title":"Name","default":"My Preset"},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"source_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Account Id"},"destination_account_ids":{"items":{"type":"string"},"type":"array","title":"Destination Account Ids","default":[]},"lot_sizing_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot Sizing Strategy"},"multiplier_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Multiplier Value"},"proportional_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proportional By"},"proportional_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proportional Percentage"},"fixed_lot_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fixed Lot Size"},"risk_percentage_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Percentage Value"},"sl_tp_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Tp Strategy"},"fixed_sl_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fixed Sl Pips"},"fixed_tp_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fixed Tp Pips"},"exclude_buy_market":{"type":"boolean","title":"Exclude Buy Market","default":false},"exclude_sell_market":{"type":"boolean","title":"Exclude Sell Market","default":false},"exclude_buy_limit":{"type":"boolean","title":"Exclude Buy Limit","default":false},"exclude_sell_limit":{"type":"boolean","title":"Exclude Sell Limit","default":false},"exclude_buy_stop":{"type":"boolean","title":"Exclude Buy Stop","default":false},"exclude_sell_stop":{"type":"boolean","title":"Exclude Sell Stop","default":false},"exclude_close_delete":{"type":"boolean","title":"Exclude Close Delete","default":false},"exclude_modify_market":{"type":"boolean","title":"Exclude Modify Market","default":false},"min_lot_size_filter":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lot Size Filter"},"max_lot_size_filter":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Lot Size Filter"},"symbol_filter_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol Filter Mode"},"symbol_filter_list":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Symbol Filter List"},"magic_filter_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Magic Filter Mode"},"magic_filter_numbers":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Magic Filter Numbers"},"comment_filter_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment Filter Mode"},"comment_filter_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Comment Filter Keywords"},"symbol_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Symbol Mapping"},"emergency_stop_equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Emergency Stop Equity"},"emergency_stop_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Emergency Stop Percentage"},"comment_handling":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment Handling"},"custom_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Comment"},"disallowed_days":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Disallowed Days"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"order_lifetime_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Lifetime Minutes"},"reverse_copy":{"type":"boolean","title":"Reverse Copy","default":false}},"type":"object","title":"TradeCopierPreset"},"TradeIn":{"properties":{"action":{"type":"string","title":"Action"}},"type":"object","required":["action"],"title":"TradeIn"},"TradeRequest":{"properties":{"trading_account_id":{"type":"string","title":"Trading Account Id"},"symbol":{"type":"string","title":"Symbol"},"action":{"type":"string","title":"Action"},"volume":{"type":"number","title":"Volume"},"stop_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Loss"},"take_profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Take Profit"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"sl_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sl Strategy Id"},"stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Recovery Strategy Id"},"order_type":{"type":"string","title":"Order Type","default":"market"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"stop_limit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Limit Price"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"risk_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Risk Settings"},"pip_units":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pip Units"},"rapid_scalp":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rapid Scalp"},"calculation_style":{"type":"string","title":"Calculation Style","default":"fixed_lot"},"risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Percent"},"risk_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Cash"},"custom_margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Custom Margin"},"gold_scalp_divisor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold Scalp Divisor","default":100.0},"tp_levels":{"anyOf":[{"items":{"$ref":"#/components/schemas/TPLevel"},"type":"array"},{"type":"null"}],"title":"Tp Levels"},"acknowledge_override":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Acknowledge Override","default":false}},"type":"object","required":["trading_account_id","symbol","action","volume"],"title":"TradeRequest"},"TradingAccount":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"broker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Broker"},"server":{"type":"string","title":"Server"},"login":{"type":"string","title":"Login"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"reliability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reliability"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"magic":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Magic"},"meta_api_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Api Account Id"},"status":{"type":"string","title":"Status"},"connectionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectionstatus"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"},"direct_password_saved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Direct Password Saved"},"direct_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Direct Enabled"},"prop_firm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prop Firm"},"direct_live":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Direct Live"},"direct_warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direct Warning"},"notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notice"}},"type":"object","required":["id","user_id","name","server","login","status"],"title":"TradingAccount"},"TradingAccountCreate":{"properties":{"name":{"type":"string","title":"Name"},"server":{"type":"string","title":"Server"},"login":{"type":"string","title":"Login"},"password":{"type":"string","title":"Password"},"platform":{"type":"string","title":"Platform"},"magic":{"type":"integer","title":"Magic"},"is_demo":{"type":"boolean","title":"Is Demo","default":true},"resource_slots":{"type":"integer","title":"Resource Slots","default":1}},"type":"object","required":["name","server","login","password","platform","magic"],"title":"TradingAccountCreate"},"TradingAccountUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","title":"TradingAccountUpdate"},"TradingPreset":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default","default":false},"default_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Account Id"},"default_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Symbol"},"default_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Strategy Id"},"default_risk_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Risk Style"},"default_risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Risk Value"},"default_tp_levels":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Default Tp Levels"},"default_be_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Be Enabled"},"default_be_trigger_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Be Trigger Pips"},"default_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Be Offset Pips"},"default_tsl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Tsl Enabled"},"default_tsl_activation_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Tsl Activation Pips"},"default_tsl_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Tsl Distance Pips"},"default_hedge_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Hedge Style"},"default_hedge_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Hedge Value"},"default_tsl_activate_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Tsl Activate Mode"},"default_stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Stack Recovery Strategy Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"is_global":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Global","default":false},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"starred":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Starred","default":false}},"type":"object","required":["name"],"title":"TradingPreset"},"TrailingStopRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"position_id":{"type":"string","title":"Position Id"},"mode":{"type":"string","title":"Mode","default":"pips"},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance"},"activate_at":{"type":"number","title":"Activate At","default":0.0},"timeframe":{"type":"string","title":"Timeframe","default":"1m"},"sr_variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sr Variant"},"buffer_pips":{"type":"number","title":"Buffer Pips","default":2.0},"left_bars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Left Bars"},"right_bars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Right Bars"}},"type":"object","required":["account_id","position_id"],"title":"TrailingStopRequest"},"TvTestGrantIn":{"properties":{"username":{"type":"string","title":"Username"},"indicator":{"type":"string","title":"Indicator","default":"KCX Dashboard"},"action":{"type":"string","title":"Action","default":"grant"},"expiration_iso":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Iso"}},"type":"object","required":["username"],"title":"TvTestGrantIn"},"TvUsernameIn":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"TvUsernameIn"},"UnitAccess":{"properties":{"unlocked":{"type":"boolean","title":"Unlocked"},"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"}},"type":"object","required":["unlocked"],"title":"UnitAccess"},"UpdateSettingsRequest":{"properties":{"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"notification_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Email"},"signals_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signals Sms"},"signals_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signals Email"},"trades_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trades Sms"},"trades_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trades Email"},"app_sound":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"App Sound"},"hedge_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedge Sms"},"hedge_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedge Email"},"stack_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stack Sms"},"stack_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stack Email"},"signals_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signals Push"},"trades_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trades Push"},"hedge_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedge Push"},"stack_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stack Push"},"pending_fills_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pending Fills Sms"},"pending_fills_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pending Fills Email"},"pending_fills_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pending Fills Push"},"automated_trades_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated Trades Sms"},"automated_trades_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated Trades Email"},"automated_trades_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated Trades Push"},"subscribed_indicators":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Indicators"},"subscribed_timeframes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Timeframes"},"subscribed_statuses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Statuses"},"status_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Status Push"},"subscribed_presets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Presets"},"subscribed_combos":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Combos"},"preset_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Preset Push"},"combo_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Combo Push"},"fallback_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Strategy Id"},"declared_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declared Mode"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language"},"news_push":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"News Push"},"news_sms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"News Sms"},"subscribed_news_colors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed News Colors"},"subscribed_news_currencies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed News Currencies"},"hedge_lock_reminder_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":0.0},{"type":"null"}],"title":"Hedge Lock Reminder Hours"},"hedge_lock_sr_alert":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hedge Lock Sr Alert"}},"type":"object","title":"UpdateSettingsRequest"},"UpdateTierRequest":{"properties":{"userId":{"type":"string","title":"Userid"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"addOns":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Addons"}},"type":"object","required":["userId"],"title":"UpdateTierRequest"},"UpdateTradingPresetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"default_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Account Id"},"default_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Symbol"},"default_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Strategy Id"},"default_risk_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Risk Style"},"default_risk_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Risk Value"},"default_tp_levels":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Default Tp Levels"},"default_be_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Be Enabled"},"default_be_trigger_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Be Trigger Pips"},"default_be_offset_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Be Offset Pips"},"default_tsl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Tsl Enabled"},"default_tsl_activation_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Tsl Activation Pips"},"default_tsl_distance_pips":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Tsl Distance Pips"},"default_hedge_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Hedge Style"},"default_hedge_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Hedge Value"},"default_tsl_activate_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Tsl Activate Mode"},"default_stack_recovery_strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Stack Recovery Strategy Id"}},"type":"object","title":"UpdateTradingPresetRequest"},"UploadIn":{"properties":{"course":{"type":"string","title":"Course","default":"verdict"},"cohort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort","default":""},"filename":{"type":"string","title":"Filename"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenttype","default":"video/mp4"}},"type":"object","required":["filename"],"title":"UploadIn"},"UploadOut":{"properties":{"ref":{"type":"string","title":"Ref"},"url":{"type":"string","title":"Url"}},"type":"object","required":["ref","url"],"title":"UploadOut"},"UserFavorites":{"properties":{"symbols":{"items":{"type":"string"},"type":"array","title":"Symbols","default":[]},"accounts":{"items":{"type":"string"},"type":"array","title":"Accounts","default":[]},"brokers":{"items":{"type":"string"},"type":"array","title":"Brokers","default":[]}},"type":"object","title":"UserFavorites"},"UserPermissions":{"properties":{"role":{"type":"string","title":"Role"},"subscription_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Tier"},"is_trial":{"type":"boolean","title":"Is Trial"},"trial_days_remaining":{"type":"integer","title":"Trial Days Remaining"},"has_stripe_customer":{"type":"boolean","title":"Has Stripe Customer"},"subscription_add_ons":{"additionalProperties":true,"type":"object","title":"Subscription Add Ons","default":{}},"live_signals_level":{"type":"integer","title":"Live Signals Level"},"allowed_indicators":{"items":{"type":"string"},"type":"array","title":"Allowed Indicators"},"trade_copier_level":{"type":"integer","title":"Trade Copier Level"},"can_copy_trades":{"type":"boolean","title":"Can Copy Trades"},"scheduled_trades_level":{"type":"integer","title":"Scheduled Trades Level"},"can_use_strategy_hub":{"type":"boolean","title":"Can Use Strategy Hub"},"strategy_limit":{"type":"integer","title":"Strategy Limit"},"can_schedule_trades":{"type":"boolean","title":"Can Schedule Trades"},"scheduled_trades_account_limit":{"type":"integer","title":"Scheduled Trades Account Limit"},"can_execute_from_hub":{"type":"boolean","title":"Can Execute From Hub"},"live_signal_automation_limit":{"type":"integer","title":"Live Signal Automation Limit"},"can_automate_signals":{"type":"boolean","title":"Can Automate Signals"},"can_view_logs":{"type":"boolean","title":"Can View Logs"},"can_view_signal_history":{"type":"boolean","title":"Can View Signal History"},"can_execute_manual_trades":{"type":"boolean","title":"Can Execute Manual Trades"},"max_trading_accounts":{"type":"integer","title":"Max Trading Accounts"},"max_trading_presets":{"type":"integer","title":"Max Trading Presets"},"max_risk_rules":{"type":"integer","title":"Max Risk Rules"},"can_access_strategy_lab":{"type":"boolean","title":"Can Access Strategy Lab","default":false},"can_use_hedging":{"type":"boolean","title":"Can Use Hedging","default":false},"can_hedge":{"type":"boolean","title":"Can Hedge","default":false},"hedging_demo_only":{"type":"boolean","title":"Hedging Demo Only","default":false},"hedging_access_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedging Access Source"},"hedging_access_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hedging Access Until"},"can_view_my_analytics":{"type":"boolean","title":"Can View My Analytics","default":false},"can_publish_strategies":{"type":"boolean","title":"Can Publish Strategies","default":false},"can_access_prop_firm_course":{"type":"boolean","title":"Can Access Prop Firm Course","default":false},"can_access_otd_course":{"type":"boolean","title":"Can Access Otd Course","default":false}},"type":"object","required":["role","subscription_tier","is_trial","trial_days_remaining","has_stripe_customer","live_signals_level","allowed_indicators","trade_copier_level","can_copy_trades","scheduled_trades_level","can_use_strategy_hub","strategy_limit","can_schedule_trades","scheduled_trades_account_limit","can_execute_from_hub","live_signal_automation_limit","can_automate_signals","can_view_logs","can_view_signal_history","can_execute_manual_trades","max_trading_accounts","max_trading_presets","max_risk_rules"],"title":"UserPermissions"},"UserPreset":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_id","name","config","created_at"],"title":"UserPreset"},"UserPresetCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["name","config"],"title":"UserPresetCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkbookKVIn":{"properties":{"key":{"type":"string","title":"Key"},"value":{"title":"Value"},"rev":{"type":"integer","title":"Rev","default":0}},"type":"object","required":["key","value"],"title":"WorkbookKVIn"},"app__apis__course_leaderboard__PrefsIn":{"properties":{"nickname":{"type":"string","maxLength":30,"title":"Nickname","default":""},"hidden":{"type":"boolean","title":"Hidden","default":false},"public_ok":{"type":"boolean","title":"Public Ok","default":false}},"type":"object","title":"PrefsIn"},"app__apis__market_prep__PrefsIn":{"properties":{"email_on":{"type":"boolean","title":"Email On"}},"type":"object","required":["email_on"],"title":"PrefsIn"},"app__apis__prop_readiness__SettingsIn":{"properties":{"opted_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Opted Out"},"reset":{"type":"boolean","title":"Reset","default":false}},"type":"object","title":"SettingsIn"},"app__apis__recovery_group__SettingsIn":{"properties":{"account_id":{"type":"string","title":"Account Id"},"enabled":{"type":"boolean","title":"Enabled"},"rehedge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rehedge"},"rehedge_pts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rehedge Pts"},"basket":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Basket"}},"type":"object","required":["account_id","enabled"],"title":"SettingsIn"},"app__apis__talia_review__PrefsIn":{"properties":{"email_on":{"type":"boolean","title":"Email On"}},"type":"object","required":["email_on"],"title":"PrefsIn"}}}}