{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/health-check":{"get":{"summary":"Health Check","operationId":"health_check_health_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/holidays/{year}":{"get":{"summary":"Get Holidays","operationId":"get_holidays_holidays__year__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"string","title":"Year","description":"The year you you'd like NYSE holidays for. Only supports current year and current year + 1"},"description":"The year you you'd like NYSE holidays for. Only supports current year and current year + 1"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/iv-mp/{symbol}":{"get":{"summary":"Get Iv Mp","operationId":"get_iv_mp_iv_mp__symbol__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Stock Symbol","description":"Stock symbol to add a price trigger to. SPX is currently only supported."},"description":"Stock symbol to add a price trigger to. SPX is currently only supported."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IvMpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-power/{symbol}":{"get":{"summary":"Get Market Power","operationId":"get_market_power_market_power__symbol__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Stock Symbol","description":"Stock symbol to add a price trigger to. SPX is currently only supported."},"description":"Stock symbol to add a price trigger to. SPX is currently only supported."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketPowerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suggested-trades/{symbol}":{"get":{"summary":"Get Suggested Trades","operationId":"get_suggested_trades_suggested_trades__symbol__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Symbol"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedTradesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suggested-trades-debug/{symbol}/{option_type}":{"get":{"summary":"Get Suggested Trades Debug","operationId":"get_suggested_trades_DEBUG_suggested_trades_debug__symbol___option_type__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Symbol"}},{"name":"option_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OptionType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-trigger/{symbol}":{"get":{"summary":"Get Price Trigger","operationId":"get_price_trigger_price_trigger__symbol__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Stock Symbol","description":"Stock symbol to add a price trigger to. SPX is currently only supported."},"description":"Stock symbol to add a price trigger to. SPX is currently only supported."},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email","description":"User email to lookup triggers by"},"description":"User email to lookup triggers by"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPriceTriggersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Price Trigger","operationId":"delete_price_trigger_price_trigger__symbol__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Stock Symbol","description":"Stock symbol to add a price trigger to. SPX is currently only supported."},"description":"Stock symbol to add a price trigger to. SPX is currently only supported."},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email","description":"User email that matches the trigger to delete"},"description":"User email that matches the trigger to delete"},{"name":"price","in":"query","required":true,"schema":{"type":"string","title":"Price","description":"Integer price that matches the trigger to delete"},"description":"Integer price that matches the trigger to delete"},{"name":"expiration","in":"query","required":true,"schema":{"type":"string","title":"Expiration","description":"Expiration that matches the trigger to delete. Date expressed in ISO 8601 (example, 2021-01-31) "},"description":"Expiration that matches the trigger to delete. Date expressed in ISO 8601 (example, 2021-01-31) "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePriceTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Price Trigger","operationId":"create_price_trigger_price_trigger__symbol__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Stock Symbol","description":"Stock symbol to add a price trigger to. SPX is currently only supported."},"description":"Stock symbol to add a price trigger to. SPX is currently only supported."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceTrigger"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-notification":{"post":{"summary":"Create Price Trigger","operationId":"create_price_trigger_test_notification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestNotification"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestNotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/settings/iv_plus_modifier":{"get":{"summary":"Get Price Trigger","operationId":"get_price_trigger_settings_iv_plus_modifier_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIvPlusResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"summary":"Set Iv Plus","operationId":"set_iv_plus_settings_iv_plus_modifier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetIvPlus"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetIvPlusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"CreatePriceTrigger":{"properties":{"email":{"type":"string","title":"Email","description":"Email of user. This MUST match the email used in OneSignal"},"price":{"type":"integer","title":"Price","description":"Price the trigger will activate at"},"expiration":{"type":"string","format":"date","title":"Trigger Expiration","description":"The date to expire the price trigger. Expiration occurs at end of day,so if you want a price trigger to only persist for the current day,set expiration to today. Date expressed in ISO 8601 (example, 2021-01-31 for January 31st, 2021) "}},"type":"object","title":"CreatePriceTrigger"},"CreatePriceTriggerResponse":{"properties":{"success":{"type":"boolean","title":"Success flag","description":"True if price trigger successfully created"}},"type":"object","title":"CreatePriceTriggerResponse"},"DeletePriceTriggerResponse":{"properties":{"success":{"type":"boolean","title":"Success flag","description":"True if price trigger successfully deleted"}},"type":"object","title":"DeletePriceTriggerResponse"},"GetIvPlusResponse":{"properties":{"iv_plus":{"type":"number","title":"IV Plus Modifier","description":"IV plus modifier is used during mpi calculations. Default is 0.025 when we're using Intrinio"}},"type":"object","required":["iv_plus"],"title":"GetIvPlusResponse"},"GetPriceTriggersResponse":{"properties":{"active_triggers":{"items":{"$ref":"#/components/schemas/PriceTriggersResponse"},"type":"array","title":"Active Triggers"}},"type":"object","required":["active_triggers"],"title":"GetPriceTriggersResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IvMpResponse":{"properties":{"iv_mp":{"type":"number","title":"IV MP","description":"Current IV MP number"},"symbol":{"type":"string","title":"Symbol","description":"IV MP symbol"},"success":{"type":"boolean","title":"Success","description":"True if successfully pulled data"},"last_sync_utc":{"type":"integer","title":"Last Sync UTC","description":"Last time the IV MP was calculated. This is in UTC. If too long has past between thecurrent UTC time and this value, we should alert users in the UI"}},"type":"object","title":"IvMpResponse"},"MarketPowerResponse":{"properties":{"market_power_day":{"type":"boolean","title":"Market Power Day","description":"True if its a Market Power Day. Once this is true, we consider the rest of theday a Market Power Day"},"market_power_triggered":{"type":"boolean","title":"Market Power Triggered","description":"True if the current MP IV is in the Market Power range. This can be false even afterits a Market Power Day. If this value is false, suggested trades are NOT returned by the API"},"symbol":{"type":"string","title":"Symbol","description":"IV MP symbol"},"success":{"type":"boolean","title":"Success","description":"True if successfully pulled data"}},"type":"object","title":"MarketPowerResponse"},"OptionType":{"type":"string","enum":["call","put"],"title":"OptionType"},"PriceTriggersResponse":{"properties":{"price":{"type":"integer","title":"Price","description":"Price the trigger will activate at"},"expiration":{"type":"string","format":"date","title":"Trigger Expiration","description":"The the trigger expires. Expiration occurs at end of day. Date expressed in ISO 8601 (example: 2021-01-31 for January 31st, 2021) "}},"type":"object","title":"PriceTriggersResponse"},"SetIvPlus":{"properties":{"iv_plus":{"type":"number","title":"IV Plus Modifier","description":"IV plus modifier is used during mpi calculations. Default is 0.025 when we're using Intrinio","default":0.025}},"type":"object","title":"SetIvPlus"},"SetIvPlusResponse":{"properties":{"iv_plus":{"type":"number","title":"IV Plus Modifier","description":"IV plus modifier is used during mpi calculations. Default is 0.025 when we're using Intrinio"}},"type":"object","required":["iv_plus"],"title":"SetIvPlusResponse"},"SuggestedTradesResponse":{"properties":{"suggested_trades":{"items":{},"type":"array","title":"Suggested Trades","description":"Array of suggested trades. Will only return if market_power_triggered is true (see /market-power/{symbol})"},"last_sync_utc":{"type":"integer","title":"Last Sync UTC","description":"Last time the suggested trades was calculated. This is in UTC. If too long has past between thecurrent UTC time and this value, we should alert users in the UI. NOTE this depends on IV MP as well, so we want to look at the last_sync_utc values from both endpoints"}},"type":"object","title":"SuggestedTradesResponse"},"TestNotification":{"properties":{"email":{"type":"string","title":"Email address","description":"Email address for notification testing. Note this mustbe an email thats associated with a user's installedapplication email account, as it needs to be registered withOneSignal."}},"type":"object","title":"TestNotification"},"TestNotificationResponse":{"properties":{"success":{"type":"boolean","title":"Success flag","description":"True if test notification was sent","default":false}},"type":"object","title":"TestNotificationResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"OptionGenius-API-Key"}}}}