{"openapi":"3.1.0","info":{"title":"Trading Intelligence API","version":"1.0"},"paths":{"/v1/gateway/search/tavily":{"post":{"tags":["gateway"],"summary":"Gateway Tavily Search","description":"Web search via Tavily. Agent pays x402, we proxy to Tavily.\n\nBody: {\"query\": \"...\", \"search_depth\": \"basic\", \"max_results\": 5, ...}\nAll Tavily params supported. We inject our API key server-side.","operationId":"gateway_tavily_search_v1_gateway_search_tavily_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/gateway/search/brave":{"get":{"tags":["gateway"],"summary":"Gateway Brave Search","description":"Web search via Brave. Agent pays x402, we proxy to Brave.\n\nQuery params: ?q=search+query&count=10","operationId":"gateway_brave_search_v1_gateway_search_brave_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gateway/execute/e2b":{"post":{"tags":["gateway"],"summary":"Gateway E2B Execute","description":"Code execution via E2B sandbox. Agent pays x402, we run the code.\n\nBody: {\"code\": \"print('hello')\", \"language\": \"python\", \"timeout\": 30}","operationId":"gateway_e2b_execute_v1_gateway_execute_e2b_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/gateway/search":{"get":{"tags":["gateway"],"summary":"Gateway Fused Search","description":"Fused web search — queries both Brave and Tavily in parallel,\ndeduplicates by URL, and returns merged ranked results.\n\nGET: ?q=search+query&max_results=10\nPOST: {\"query\": \"...\", \"max_results\": 10}\n\nThis is the value-add over calling each API directly.","operationId":"gateway_fused_search_v1_gateway_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["gateway"],"summary":"Gateway Fused Search","description":"Fused web search — queries both Brave and Tavily in parallel,\ndeduplicates by URL, and returns merged ranked results.\n\nGET: ?q=search+query&max_results=10\nPOST: {\"query\": \"...\", \"max_results\": 10}\n\nThis is the value-add over calling each API directly.","operationId":"gateway_fused_search_v1_gateway_search_post","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/gateway/info":{"get":{"tags":["gateway"],"summary":"Gateway Info","description":"Available gateway services and pricing. Free endpoint.","operationId":"gateway_info_v1_gateway_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Landing","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/docs":{"get":{"summary":"Docs","operationId":"docs_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/yield":{"get":{"summary":"Divigent Page","operationId":"divigent_page_yield_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/divigent":{"get":{"summary":"Divigent Page","operationId":"divigent_page_divigent_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog":{"get":{"summary":"Blog Index","operationId":"blog_index_blog_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/blog/{slug}":{"get":{"summary":"Blog Post","operationId":"blog_post_blog__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/402index-verify.txt":{"get":{"summary":"Verify 402Index","operationId":"verify_402index__well_known_402index_verify_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/x402-resources":{"get":{"summary":"X402 Discovery","description":"x402 service discovery — lets agents auto-discover paid endpoints.","operationId":"x402_discovery_x402_resources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/x402-resources":{"get":{"summary":"X402 Discovery","description":"x402 service discovery — lets agents auto-discover paid endpoints.","operationId":"x402_discovery__well_known_x402_resources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/x402":{"get":{"summary":"X402 Discovery","description":"x402 service discovery — lets agents auto-discover paid endpoints.","operationId":"x402_discovery__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/robots.txt":{"get":{"summary":"Robots","operationId":"robots_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/openapi.yaml":{"get":{"summary":"Openapi Spec","operationId":"openapi_spec_openapi_yaml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/openapi.json":{"get":{"summary":"Openapi Json","description":"OpenAPI 3.0.3 machine-readable spec for agent and tooling discovery.","operationId":"openapi_json_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","operationId":"sitemap_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/health":{"get":{"summary":"Health","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pricing":{"get":{"summary":"Pricing","description":"Current pricing info — free endpoint.","operationId":"pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/signal/batch":{"get":{"summary":"Get Signal Batch","description":"Fused signals for multiple assets.\nQuery param: ?symbols=BTC,ETH,SOL (default: all assets, max 10)","operationId":"get_signal_batch_v1_signal_batch_get","parameters":[{"name":"symbols","in":"query","required":false,"schema":{"type":"string","default":"","title":"Symbols"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signal/{symbol}":{"get":{"summary":"Get Signal","description":"Fused directional signal for a single asset.","operationId":"get_signal_v1_signal__symbol__get","parameters":[{"name":"symbol","in":"path","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"}}}}}}},"/v1/sentiment/{symbol}":{"get":{"summary":"Get Sentiment","description":"Raw social sentiment for a single asset.","operationId":"get_sentiment_v1_sentiment__symbol__get","parameters":[{"name":"symbol","in":"path","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"}}}}}}},"/v1/regime/preview":{"get":{"summary":"Get Regime Preview","description":"Free regime preview — regime + confidence only, no reasoning. Lets agents validate format before paying.","operationId":"get_regime_preview_v1_regime_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/regime":{"get":{"summary":"Get Regime","description":"Current macro regime classification.","operationId":"get_regime_v1_regime_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/credits/buy":{"post":{"summary":"Buy Credits","description":"Buy a credit pack via x402 payment.\nNOT covered by x402 middleware (dynamic pricing per pack + epoch).\nHandles its own 402→payment→verify flow.","operationId":"buy_credits_v1_credits_buy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBuyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credits/balance":{"get":{"summary":"Check Balance","description":"Check credit balance for a token. Free endpoint, rate limited.","operationId":"check_balance_v1_credits_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/credits/trial":{"post":{"summary":"Free Trial","description":"Claim 5 free trial credits. One per wallet, one per IP. Ever.\nReturns a credit token for immediate use.","operationId":"free_trial_v1_credits_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/push/sentiment":{"post":{"summary":"Push Sentiment","description":"Receive bulk sentiment state from Mac Mini.","operationId":"push_sentiment_internal_push_sentiment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/push/macro":{"post":{"summary":"Push Macro","description":"Receive macro regime state from Mac Mini.","operationId":"push_macro_internal_push_macro_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/before-payment":{"post":{"summary":"Divigent Before Payment","operationId":"divigent_before_payment_divigent_event_before_payment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/after-payment":{"post":{"summary":"Divigent After Payment","operationId":"divigent_after_payment_divigent_event_after_payment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/payment-failure":{"post":{"summary":"Divigent Payment Failure","operationId":"divigent_payment_failure_divigent_event_payment_failure_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/idle-deposit":{"post":{"summary":"Divigent Idle Deposit","operationId":"divigent_idle_deposit_divigent_event_idle_deposit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/non-fatal-error":{"post":{"summary":"Divigent Non Fatal Error","operationId":"divigent_non_fatal_error_divigent_event_non_fatal_error_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/sweep-failure":{"post":{"summary":"Divigent Sweep Failure","operationId":"divigent_sweep_failure_divigent_event_sweep_failure_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/manual-deposit":{"post":{"summary":"Divigent Manual Deposit","operationId":"divigent_manual_deposit_divigent_event_manual_deposit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/manual-withdraw":{"post":{"summary":"Divigent Manual Withdraw","operationId":"divigent_manual_withdraw_divigent_event_manual_withdraw_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/divigent/event/snapshot":{"post":{"summary":"Divigent Snapshot","description":"Position snapshot pushed periodically by the sidecar.","operationId":"divigent_snapshot_divigent_event_snapshot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/divigent/admin/event/{event_id}":{"delete":{"summary":"Divigent Admin Delete Event","description":"Hard-delete a single divigent event row. Internal auth required.","operationId":"divigent_admin_delete_event_v1_divigent_admin_event__event_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/divigent/state":{"get":{"summary":"Divigent State","description":"Public state for the yield page: position, totals, and recent events.\n\nCached for 5s in-process and 5s at the Cloudflare edge to absorb the\n/divigent page poll (every 10s × N viewers) without hammering SQLite.","operationId":"divigent_state_v1_divigent_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/credits":{"get":{"summary":"Admin Credits","operationId":"admin_credits_v1_admin_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/revenue":{"get":{"summary":"Admin Revenue","operationId":"admin_revenue_v1_admin_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/revoke":{"post":{"summary":"Admin Revoke","operationId":"admin_revoke_v1_admin_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/arena/{strategy_id}/{symbol}":{"get":{"summary":"Arena Signal","description":"Get a signal from a specific strategy agent. x402 gated — payment goes\nto that strategy's wallet. Called by the trading agent, not visitors.","operationId":"arena_signal_v1_arena__strategy_id___symbol__get","parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"symbol","in":"path","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"}}}}}}},"/v1/arena/leaderboard":{"get":{"summary":"Arena Leaderboard","description":"Live strategy arena leaderboard. Free — no payment required.","operationId":"arena_leaderboard_v1_arena_leaderboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/push/arena":{"post":{"summary":"Push Arena","description":"Receive arena state (leaderboard) from Mac Mini.","operationId":"push_arena_internal_push_arena_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/push/arena_context":{"post":{"summary":"Push Arena Context","description":"Receive market context for arena assets from Mac Mini.","operationId":"push_arena_context_internal_push_arena_context_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"CreditBuyRequest":{"properties":{"pack":{"type":"string","title":"Pack"}},"type":"object","required":["pack"],"title":"CreditBuyRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TrialRequest":{"properties":{"wallet":{"type":"string","title":"Wallet"}},"type":"object","required":["wallet"],"title":"TrialRequest"},"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"}}}}