{"openapi":"3.1.0","info":{"title":"bottomUP API v1.1.0","description":"\n\n### Status Codes\n#### Success Status Codes\n\n- 200    OK\n- 201    Created\n- 202    Accepted\n- 204    No Content\n\nGeneral response structures:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"string\",\n  \"data\": null\n}\n```\n\nfor list response:\n\n```json\n{\n  \"total_count\": 0,\n  \"start\": 0,\n  \"limit\": 0,\n  \"draw\": 0,\n  \"data\": [\n    null\n  ]\n}\n```\n\n### General Error Status Codes\n\n- 302    The item was moved\n- 400    Bad Request\n- 401    Unauthorized\n- 402    Payment Required\n- 403    Forbidden\n- 404    Not Found\n- 422    Unprocessable Entity\n\nGeneral response error structure:\n\n```json\n{\n  \"status\": \"error\",\n  \"message\": \"string\",\n  \"data\": \"string\",\n  \"action\": \"string\",\n  \"visible\": true,\n  \"title\": \"string\",\n  \"messages\": [\n    \"string\"\n  ]\n}\n\n```\n    ","termsOfService":"https://www.bottomup.app","contact":{"name":"BottomUP Tech","url":"https://www.bottomup.app/","email":"info@bottomup.app"},"version":"v1"},"paths":{"/auth/web/qr/init":{"post":{"tags":["Authentication"],"summary":"Web Qr Init","description":"Web side: Generates a QR session. The QR code should only contain the qr_id.","operationId":"web_qr_init_auth_web_qr_init_post","parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebQrInitResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/web/qr/status":{"get":{"tags":["Authentication"],"summary":"Web Qr Status","description":"Web side: performs polling.\n- If pending/approved, no token is returned.\n- If approved, the server generates a token and sets the session to 'consumed' (single use).","operationId":"web_qr_status_auth_web_qr_status_get","parameters":[{"name":"qr_id","in":"query","required":true,"schema":{"type":"string","minLength":10,"description":"QR session id","title":"Qr Id"},"description":"QR session id"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebQrStatusResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/web/qr/approve":{"post":{"tags":["Authentication"],"summary":"Web Qr Approve","description":"Mobile side (logged in): Confirms the QR code and links the UID to the QR session.","operationId":"web_qr_approve_auth_web_qr_approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"qr_id","in":"query","required":true,"schema":{"type":"string","minLength":10,"description":"QR session id","title":"Qr Id"},"description":"QR session id"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/web/qr/cancel":{"post":{"tags":["Authentication"],"summary":"Web Qr Cancel","description":"Web side: Cancels QR session (optional).","operationId":"web_qr_cancel_auth_web_qr_cancel_post","parameters":[{"name":"qr_id","in":"query","required":true,"schema":{"type":"string","minLength":10,"description":"QR session id","title":"Qr Id"},"description":"QR session id"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/signin":{"post":{"tags":["Authentication"],"summary":"Signin","operationId":"signin_auth_signin_post","deprecated":true,"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/email/signin":{"post":{"tags":["Authentication"],"summary":"Signin","operationId":"signin_auth_email_signin_post","parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/login":{"post":{"tags":["Authentication"],"summary":"Login","operationId":"login_auth_login_post","deprecated":true,"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_auth_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/email/login":{"post":{"tags":["Authentication"],"summary":"Login","operationId":"login_auth_email_login_post","parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_auth_email_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/password_update":{"post":{"tags":["Authentication"],"summary":"Password Update","operationId":"password_update_auth_password_update_post","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/email/password/update":{"post":{"tags":["Authentication"],"summary":"Password Update","operationId":"password_update_auth_email_password_update_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/send_password_reset_email":{"get":{"tags":["Authentication"],"summary":"Send Password Reset Email","operationId":"send_password_reset_email_auth_send_password_reset_email_get","deprecated":true,"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/email/password/reset-code/send":{"get":{"tags":["Authentication"],"summary":"Send Password Reset Email","operationId":"send_password_reset_email_auth_email_password_reset_code_send_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify_password_reset_code":{"post":{"tags":["Authentication"],"summary":"Verify Password Reset Code","description":"Complete a password reset.\n\n**Body only, no query alias (Phase 79 CR-04).** `reset_code` and\n`new_password` used to be bare `str` parameters, which FastAPI binds from\nthe query string — both secrets were therefore written into access logs,\nAPM transaction URLs and browser history on every reset.\n\nThe cutover is deliberately HARD rather than a one-release dual-accept: a\ndeprecated query alias would keep the leak live for the whole transition\nand keep the `KNOWN_QUERY_CREDENTIAL_ROUTES` allowlist populated, which is\nexactly what the regression lock exists to forbid. It also breaks nobody —\nthe only caller in this workspace, `trader-web`\n(`src/app/modules/auth/core/_requests.ts:124`), already POSTs\n`{reset_code, new_password}` as a JSON **body** and was therefore being\nrejected with a validation error by the query form. Mobile does not call\nthese routes at all (its auth is OTP-based) and neither does the console.\nSo this change repairs the one live client rather than migrating it.\n\nThe historical exposure is not undone by this fix — retained access logs\nstill contain past reset codes and passwords and need scrubbing/rotation\nseparately (see the resolved todo).","operationId":"verify_password_reset_code_auth_verify_password_reset_code_post","deprecated":true,"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetVerify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/email/password/reset-code/verify":{"post":{"tags":["Authentication"],"summary":"Verify Password Reset Code","description":"Complete a password reset.\n\n**Body only, no query alias (Phase 79 CR-04).** `reset_code` and\n`new_password` used to be bare `str` parameters, which FastAPI binds from\nthe query string — both secrets were therefore written into access logs,\nAPM transaction URLs and browser history on every reset.\n\nThe cutover is deliberately HARD rather than a one-release dual-accept: a\ndeprecated query alias would keep the leak live for the whole transition\nand keep the `KNOWN_QUERY_CREDENTIAL_ROUTES` allowlist populated, which is\nexactly what the regression lock exists to forbid. It also breaks nobody —\nthe only caller in this workspace, `trader-web`\n(`src/app/modules/auth/core/_requests.ts:124`), already POSTs\n`{reset_code, new_password}` as a JSON **body** and was therefore being\nrejected with a validation error by the query form. Mobile does not call\nthese routes at all (its auth is OTP-based) and neither does the console.\nSo this change repairs the one live client rather than migrating it.\n\nThe historical exposure is not undone by this fix — retained access logs\nstill contain past reset codes and passwords and need scrubbing/rotation\nseparately (see the resolved todo).","operationId":"verify_password_reset_code_auth_email_password_reset_code_verify_post","parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetVerify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/send_email_verification":{"post":{"tags":["Authentication"],"summary":"Send Email Verification","operationId":"send_email_verification_auth_send_email_verification_post","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/email/verify/send":{"post":{"tags":["Authentication"],"summary":"Send Email Verification","operationId":"send_email_verification_auth_email_verify_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify_token":{"post":{"tags":["Authentication"],"summary":"Verify Token","operationId":"verify_token_auth_verify_token_post","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"token","in":"header","required":false,"schema":{"type":"string","title":"Token"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/email/verify/token":{"post":{"tags":["Authentication"],"summary":"Verify Token","operationId":"verify_token_auth_email_verify_token_post","security":[{"Bearer":[]}],"parameters":[{"name":"token","in":"header","required":false,"schema":{"type":"string","title":"Token"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh Token","operationId":"refresh_token_auth_refresh_post","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/token/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh Token","operationId":"refresh_token_auth_token_refresh_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/renew_token":{"post":{"tags":["Authentication"],"summary":"Renew Token","operationId":"renew_token_auth_renew_token_post","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/token/renew":{"post":{"tags":["Authentication"],"summary":"Renew Token","operationId":"renew_token_auth_token_renew_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sessions":{"get":{"tags":["Authentication"],"summary":"List Sessions","operationId":"list_sessions_auth_sessions_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_SessionInfo_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/revoke":{"post":{"tags":["Authentication"],"summary":"Logout Session","operationId":"logout_session_auth_revoke_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/sessions/logout":{"post":{"tags":["Authentication"],"summary":"Logout Session","operationId":"logout_session_auth_sessions_logout_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/sessions/{session_id}/logout":{"post":{"tags":["Authentication"],"summary":"Logout Session By Id","operationId":"logout_session_by_id_auth_sessions__session_id__logout_post","security":[{"Bearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/sessions/logout-all":{"post":{"tags":["Authentication"],"summary":"Logout All Sessions","operationId":"logout_all_sessions_auth_sessions_logout_all_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/auth/otp/send":{"post":{"tags":["Authentication"],"summary":"Send Sms Verification","description":"Send SMS verification code to the given phone number","operationId":"send_sms_verification_auth_otp_send_post","deprecated":true,"parameters":[{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Phone number in international format","title":"Phone"},"description":"Phone number in international format"},{"name":"AttestationChallenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Challenge to verify","title":"Attestationchallenge"},"description":"Challenge to verify"},{"name":"AttestationKeyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Key ID to verify","title":"Attestationkeyid"},"description":"Key ID to verify"},{"name":"AttestationToken","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Attestation data to verify","title":"Attestationtoken"},"description":"Attestation data to verify"},{"name":"AttestationBundleId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated; application identity is configured server-side","title":"Attestationbundleid"},"description":"Deprecated; application identity is configured server-side"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/phone/otp/send":{"post":{"tags":["Authentication"],"summary":"Send Sms Verification","description":"Send SMS verification code to the given phone number","operationId":"send_sms_verification_auth_phone_otp_send_post","parameters":[{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Phone number in international format","title":"Phone"},"description":"Phone number in international format"},{"name":"AttestationChallenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Challenge to verify","title":"Attestationchallenge"},"description":"Challenge to verify"},{"name":"AttestationKeyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Key ID to verify","title":"Attestationkeyid"},"description":"Key ID to verify"},{"name":"AttestationToken","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Attestation data to verify","title":"Attestationtoken"},"description":"Attestation data to verify"},{"name":"AttestationBundleId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated; application identity is configured server-side","title":"Attestationbundleid"},"description":"Deprecated; application identity is configured server-side"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/phone/otp/resend":{"post":{"tags":["Authentication"],"summary":"Resend Sms Verification","description":"Resend SMS verification code with per-phone cooldown (5 minutes).\nDoes not require attestation since initial send already verified the device.","operationId":"resend_sms_verification_auth_phone_otp_resend_post","parameters":[{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Phone number in international format","title":"Phone"},"description":"Phone number in international format"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/otp/verify":{"post":{"tags":["Authentication"],"summary":"Verify Sms Code","description":"Verify SMS verification code","operationId":"verify_sms_code_auth_otp_verify_post","deprecated":true,"parameters":[{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DEPRECATED (CRED-01): send `phone` in the JSON body instead. Query values are recorded verbatim by reverse-proxy access logs, browser history and APM transaction URLs, none of which the API can scrub.","deprecated":true,"title":"Phone"},"description":"DEPRECATED (CRED-01): send `phone` in the JSON body instead. Query values are recorded verbatim by reverse-proxy access logs, browser history and APM transaction URLs, none of which the API can scrub.","deprecated":true},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DEPRECATED (CRED-01): send `code` in the JSON body instead — a one-time code in the URL leaks to every access log on the path.","deprecated":true,"title":"Code"},"description":"DEPRECATED (CRED-01): send `code` in the JSON body instead — a one-time code in the URL leaks to every access log on the path.","deprecated":true},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOtp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/phone/otp/verify":{"post":{"tags":["Authentication"],"summary":"Verify Sms Code","description":"Verify SMS verification code","operationId":"verify_sms_code_auth_phone_otp_verify_post","parameters":[{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DEPRECATED (CRED-01): send `phone` in the JSON body instead. Query values are recorded verbatim by reverse-proxy access logs, browser history and APM transaction URLs, none of which the API can scrub.","deprecated":true,"title":"Phone"},"description":"DEPRECATED (CRED-01): send `phone` in the JSON body instead. Query values are recorded verbatim by reverse-proxy access logs, browser history and APM transaction URLs, none of which the API can scrub.","deprecated":true},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DEPRECATED (CRED-01): send `code` in the JSON body instead — a one-time code in the URL leaks to every access log on the path.","deprecated":true,"title":"Code"},"description":"DEPRECATED (CRED-01): send `code` in the JSON body instead — a one-time code in the URL leaks to every access log on the path.","deprecated":true},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOtp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/attest/challenge":{"get":{"tags":["Authentication"],"summary":"Attest Challenge","operationId":"attest_challenge_auth_attest_challenge_get","parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/attest/verify":{"post":{"tags":["Authentication"],"summary":"Attest Verify","operationId":"attest_verify_auth_attest_verify_post","parameters":[{"name":"AttestationChallenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Challenge to verify","title":"Attestationchallenge"},"description":"Challenge to verify"},{"name":"AttestationKeyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Key ID to verify","title":"Attestationkeyid"},"description":"Key ID to verify"},{"name":"AttestationToken","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Attestation data to verify","title":"Attestationtoken"},"description":"Attestation data to verify"},{"name":"AttestationBundleId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated; application identity is configured server-side","title":"Attestationbundleid"},"description":"Deprecated; application identity is configured server-side"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link/phone/send":{"post":{"tags":["Authentication"],"summary":"Link Phone Send","description":"Send verification code to link phone number to existing account.\nUser must be logged in with email (not phone).","operationId":"link_phone_send_auth_link_phone_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPhoneSend"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link/phone/verify":{"post":{"tags":["Authentication"],"summary":"Link Phone Verify","description":"Verify phone code and link to existing account.","operationId":"link_phone_verify_auth_link_phone_verify_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPhoneVerify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link/email/send":{"post":{"tags":["Authentication"],"summary":"Link Email Send","description":"Send verification link to link email to existing account.\nUser must be logged in with phone (not email).","operationId":"link_email_send_auth_link_email_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkEmailSend"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link/email/verify":{"post":{"tags":["Authentication"],"summary":"Link Email Verify","description":"Verify email/password and link to existing account.","operationId":"link_email_verify_auth_link_email_verify_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkEmailVerify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sso/trader-handoff":{"post":{"tags":["Authentication"],"summary":"Trader Handoff","operationId":"trader_handoff_auth_sso_trader_handoff_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderSsoCode"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sso/trader-redeem":{"post":{"tags":["Authentication"],"summary":"Trader Redeem","operationId":"trader_redeem_auth_sso_trader_redeem_post","parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderSsoRedeem"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/me":{"get":{"tags":["User"],"summary":"About Me","description":"Allowed: Customer, Trader, Admin\n\nUser gets his/her information.","operationId":"About_Me_user_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["User"],"summary":"Update Personal Info","description":"Allowed: Customer, Trader, Admin\n\nUser updates his/her information","operationId":"Update_Personal_Info_user_me_patch","security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["User"],"summary":"Delete Personal Account","description":"Allowed: User, Customer, Trader, Admin\n\nUser deletes his/her account. Money-critical engagements (open copy\npositions, open setups, active shops, pending withdrawals, active\ncrypto loans) block the deletion with a 409 checklist and NO side\neffects; otherwise the account is torn down and anonymized.","operationId":"Delete_Personal_Account_user_me_delete","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/trader-earnings":{"get":{"tags":["User"],"summary":"Trader Earnings Detail","operationId":"Trader_Earnings_Detail_user_me_trader_earnings_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"period_year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period Year"}},{"name":"period_month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period Month"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"include_pool","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Pool"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_TraderEarningItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/trader-earnings/summary":{"get":{"tags":["User"],"summary":"Trader Earnings Summary","operationId":"Trader_Earnings_Summary_user_me_trader_earnings_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}},{"name":"period_year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period Year"}},{"name":"period_month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period Month"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderEarningSummary"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/subscription-earnings/summary":{"get":{"tags":["User"],"summary":"Subscription Earnings Summary","operationId":"Subscription_Earnings_Summary_user_admin_subscription_earnings_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"To Date"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminEarningsSummary"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/deleted-identities":{"get":{"tags":["User"],"summary":"List Deleted-Identity Ledger","description":"OPS-01: superuser read of the campaign-abuse identity ledger.\n\nNewest-first (`deleted_at` desc), hashed-only (no plaintext PII is stored\nor re-derived — T-53-04-V8), optionally narrowed by `former_user_id`.\nThe ledger is an append-only tombstone, so there is deliberately NO\n`is_deleted` filter here (`is_deleted` is never set True on this table).\nPage size is capped at `le=200` (DoS defense).","operationId":"List_Deleted_Identity_Ledger_user_admin_deleted_identities_get","security":[{"Bearer":[]}],"parameters":[{"name":"former_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Former User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_DeletedIdentityOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/pending-firebase-teardowns":{"get":{"tags":["User"],"summary":"List Pending Firebase Teardowns","description":"OPS-02: superuser read of the Firebase-teardown reconciliation queue.\n\nOnly still-pending rows (`is_deleted == False` — the reconciler hard-\ndeletes on success). Oldest-first with never-attempted (NULL\n`last_attempt_at`) rows on top, using a SQLite+Postgres-portable\nNULLS-FIRST expression with `created_at` as a stable tie-breaker.\nFilterable by `alerted` (bool → `alerted_at IS [NOT] NULL`) and\n`min_attempts` (int → `attempts >= n`). Page size capped at `le=200`.","operationId":"List_Pending_Firebase_Teardowns_user_admin_pending_firebase_teardowns_get","security":[{"Bearer":[]}],"parameters":[{"name":"alerted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alerted"}},{"name":"min_attempts","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Min Attempts"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_PendingFirebaseTeardownOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/deletion-check":{"get":{"tags":["User"],"summary":"Account Deletion Check","description":"Allowed: User, Customer, Trader, Admin\n\nSurfaces the pre-deletion checklist: money-critical blockers that must\nbe resolved before the account can be deleted, plus informational\nwarnings that are auto-cleaned on deletion.","operationId":"Account_Deletion_Check_user_me_deletion_check_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionCheck"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/image":{"patch":{"tags":["User"],"summary":"Update Personal Image","operationId":"Update_Personal_Image_user_me_image_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_Update_Personal_Image_user_me_image_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/registration-token":{"patch":{"tags":["User"],"summary":"Update Registration Token","description":"Allowed: Customer, Trader, Admin\n\nUser updates device and registration token","operationId":"update_registration_token_user_me_registration_token_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegistrationToken"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/referral_code":{"patch":{"tags":["User"],"summary":"Set Referral Code Of Customer","description":"Allowed: User, Customer\n\nUser sets his/her referral code.","operationId":"Set_Referral_Code_of_Customer_user_me_referral_code_patch","security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["User"],"summary":"Remove Referral Code Of Customer","description":"Allowed: User, Customer\n\nUser unsets his/her referral code.","operationId":"Remove_Referral_Code_of_Customer_user_me_referral_code_delete","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/promo_code":{"patch":{"tags":["User"],"summary":"Use Promo Code For Subscription","description":"Allowed: User, Customer\n\nUser sets his/her referral code.","operationId":"Use_Promo_Code_for_subscription_user_me_promo_code_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCode","description":"Promo Code","examples":[{"code":"1234"}]}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/market_uid":{"patch":{"tags":["User"],"summary":"Set Market Uid Of Customer","description":"Allowed: User, Customer\n\nError message codes\n- copied_setup_exist\n- non_referred_account\n- invalid_market\n- invalid_uid\n- Not allowed\n\nUser sets own market uid","operationId":"Set_Market_UID_of_Customer_user_me_market_uid_patch","security":[{"Bearer":[]}],"parameters":[{"name":"uid","in":"query","required":true,"schema":{"type":"string","minLength":5,"maxLength":30,"description":"UID of customer","title":"Uid"},"description":"UID of customer"},{"name":"market","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MarketEnum","description":"Market Name"},"description":"Market Name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["User"],"summary":"Get Market Uid Of Customer","description":"Allowed: User, Customer\n\nError message codes\n    identity_missing\n\nUser gets own infos.","operationId":"Get_Market_UID_of_Customer_user_me_market_uid_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["User"],"summary":"Remove Uid Of Customer","description":"Allowed: User, Customer\n\nError message codes\n- market_already_configured\n\nUser unsets own market uid","operationId":"Remove_UID_of_Customer_user_me_market_uid_delete","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/check_market_uid":{"get":{"tags":["User"],"summary":"Check My Market Uid Of Customer","description":"Allowed: User, Customer\n\nError message codes\n    identity_missing","operationId":"Check_My_Market_UID_of_Customer_user_me_check_market_uid_get","security":[{"Bearer":[]}],"parameters":[{"name":"uid","in":"query","required":true,"schema":{"type":"string","minLength":5,"maxLength":30,"title":"Uid"}},{"name":"market","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MarketEnum","default":"Okx"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/subscription":{"get":{"tags":["User"],"summary":"Get Current Subscription","description":"Allowed: User, Customer\n\nUser gets own current subscription.","operationId":"get_current_subscription_user_me_subscription_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionBase"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/subscriptions":{"get":{"tags":["User"],"summary":"Get Subscriptions","description":"Allowed: User, Customer\n\nUser gets own subscriptions.","operationId":"get_subscriptions_user_me_subscriptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootModel_List_SubscriptionBase__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/validate_purchase":{"post":{"tags":["User"],"summary":"Validate Purchase","description":"Allowed: User, Customer, Trader, Admin\n\nUser validate and load his/her purchased product.\n\n    (\n        status_code=200,\n        message=\"first_subscription\",\n        data=\"First Subscription of User\",\n    ),\n    (\n        status_code=200,\n        message=\"user_resubscribed\",\n        data=\"User Subscribed Again\"\n    ),\n    (\n        status_code=200,\n        message=\"active_transaction\",\n        data=\"Active Transaction\",\n    ),\n    (\n        status_code=200,\n        message=\"inactive_transaction\",\n        data=\"Inactive Transaction, User has a new one\",\n    ),\n    (\n        status_code=200,\n        message=\"in_grace_period\",\n        data=\"Renewing Subscription Period\",\n    ),\n    (\n        status_code=400,\n        message=\"subscription_expired\",\n        data=\"User Subscription Expired\",\n    ),\n    (\n        status_code=400,\n        message=\"invalid_transaction\",\n        data=\"Invalid Transaction\"\n    ),\n\n    (\n        status_code=404,\n        message=\"product_not_found\",\n        data=\"Product not found\"\n    ),\n    (\n        status_code=400,\n        message=\"service_connection_error\",\n        data=\"Service Connection Error\",\n    )\n\n    (\n        status_code=409,\n        detail=\"Multiple Usage\",\n    ),\n    (\n        status_code=500,\n        message=\"Database error\",\n    ),\n    (\n        status_code=500,\n        message=\"unknown_error\",\n    )","operationId":"validate_purchase_user_me_validate_purchase_post","security":[{"Bearer":[]}],"parameters":[{"name":"market","in":"query","required":true,"schema":{"type":"string","pattern":"google|apple","title":"Market"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Receipt Data","title":"Receipt"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"string","title":"Response 201 Validate Purchase User Me Validate Purchase Post"}}}},"226":{"description":"I'm used","content":{"application/json":{"schema":{"type":"string","title":"Response 226 Validate Purchase User Me Validate Purchase Post"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}},"description":"Bad Request"},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Multiple user usage request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/blocks":{"get":{"tags":["User"],"summary":"Blocked Traders","description":"Allowed: Customer, Trader, Admin\n\nUser get a list of his/her followed trader.","operationId":"Blocked_Traders_user_me_blocks_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/follows":{"get":{"tags":["User"],"summary":"Followed Traders","description":"Allowed: Customer, Trader, Admin\n\nUser get a list of his/her followed trader.","operationId":"Followed_Traders_user_me_follows_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/followers":{"get":{"tags":["User"],"summary":"Get Followers Of A Trader","description":"Allowed: any registered (active) user.\n\nUser get a list of his/her followers. Marketplace pivot: a follower list is\nnot a paid feature — dropped the legacy platform-membership (paid) gate; any\nauthenticated user may read it. See\n.planning/seeds/marketplace-access-model-migration.md.","operationId":"Get_Followers_of_A_Trader_user_me_followers_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/archive":{"get":{"tags":["User"],"summary":"Archived Setup List","description":"Allowed: Customer, Trader, Admin\n\nget archived setups.","operationId":"Archived_Setup_List_user_me_archive_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail","description":"newest / oldest / popular / success / fail","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/notifications":{"get":{"tags":["User"],"summary":"Notification List","description":"Allowed: Customer, Trader, Admin\n\nUser get a list of his/her followed trader.\n\nPhase 110 (D-01/D-03): reads notification_delivery(channel='in_app')\nUNIONed with legacy-only user_notification rows. The trader join is an\nOUTER join on both legs (D-03's fix) — a null trader_id must never make\na row invisible, whichever table it comes from.\n\nPhase 113 plan 09 (D-21) ended 110-01's in-app dual-write — no\nbottomup-api sender writes user_notification any more. The legacy leg\nbelow stays until the M2 setup migration, because notification-service\n(services/database_manager.py:102) still inserts setup in-app rows\nthere directly.","operationId":"Notification_List_user_me_notifications_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_UserNotification_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["User"],"summary":"Notification Set Read","description":"Allowed: Customer, Trader, Admin\n\nUser notifications update.\n\nPhase 110 (D-05): the supplied ids may name either a\nnotification_delivery row (the retargeted read surface) or a legacy\nuser_notification row (still visible through the UNION on the GET side,\nkept until the M2 setup migration — Phase 113 plan 09 ended only the\nin-app dual-write, D-21) — both tables are updated so a client cannot\ntell the two apart. The combined predicate — id IN the supplied list\nAND user_id equals the authenticated caller — is preserved verbatim in\nshape on each table; that second clause is the whole access control\n(ASVS V4).","operationId":"Notification_Set_Read_user_me_notifications_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotificationUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/me/suggestion":{"get":{"tags":["User"],"summary":"Suggestion","description":"Allowed: User, Customer, Trader, Admin","operationId":"Suggestion_user_me_suggestion_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/{user_id}/follows":{"get":{"tags":["User","Admin"],"summary":"Admin: User Followed Traders","description":"Allowed: Admin\n\nList followed traders for a specific user.","operationId":"Admin__User_Followed_Traders_user__user_id__follows_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/{user_id}/followers":{"get":{"tags":["User","Admin"],"summary":"Admin: User Followers","description":"Allowed: Admin\n\nList followers for a specific user.","operationId":"Admin__User_Followers_user__user_id__followers_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/{user_id}/devices":{"get":{"tags":["User","Admin"],"summary":"Admin: User Devices","description":"Allowed: Admin\n\nThe sessions behind a person's push delivery, newest first — see\n`apps.user.service.list_user_devices` for what the flags mean and why\nrevoked rows are kept.","operationId":"Admin__User_Devices_user__user_id__devices_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_UserDeviceInfo_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/{user_id}/notifications":{"get":{"tags":["User","Admin"],"summary":"Admin: User Notifications","description":"Allowed: Admin\n\nList notification history for a specific user.","operationId":"Admin__User_Notifications_user__user_id__notifications_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_UserNotification_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/traders":{"post":{"tags":["User"],"summary":"use /trader/search","description":"Allowed: Public\n\nUsers get a list of traders.","operationId":"Trader_List_user_traders_post","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"name|name_desc|rate|rate_desc|follower|follower_desc|risk_score|risk_score_desc","description":"name / name_desc / rate / rate_desc / follower / follower_desc","default":"name","title":"Order By"},"description":"name / name_desc / rate / rate_desc / follower / follower_desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderFilter","description":"can be set only name and email"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/traders/{trader_id}":{"get":{"tags":["User"],"summary":"Use /trader/detail/{trader_id}","description":"Allowed: Public\n\nUsers get detail of a trader.","operationId":"Trader_Info_user_traders__trader_id__get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderInfo"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/traders/{trader_id}/follow":{"put":{"tags":["User"],"summary":"Trader Follow","description":"Allowed: Customer, Trader, Admin\n\nUser follows a trader.","operationId":"Trader_Follow_user_traders__trader_id__follow_put","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["User"],"summary":"Trader Unfollow","description":"Allowed: Customer, Trader, Admin\n\nUser unfollows a trader.","operationId":"Trader_UnFollow_user_traders__trader_id__follow_delete","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/traders/{trader_id}/block":{"put":{"tags":["User"],"summary":"Trader Block","description":"Allowed: Customer, Trader, Admin\n\nUser can block a trader.","operationId":"Trader_Block_user_traders__trader_id__block_put","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["User"],"summary":"Trader Unblock","description":"Allowed: Customer, Trader, Admin\n\nUser cancels a block request.","operationId":"Trader_UnBlock_user_traders__trader_id__block_delete","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/traders/{trader_id}/report":{"post":{"tags":["User"],"summary":"Trader Report","description":"Allowed: Customer\n\nUsers can report a setup.","operationId":"Trader_Report_user_traders__trader_id__report_post","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","title":"Content"}}}},"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user":{"get":{"tags":["User","Admin"],"summary":"List Users","description":"Allowed: Admin\n\nUser gets a list of users.","operationId":"list_users_user_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["User","Admin"],"summary":"Create Record","description":"Allowed: Admin\n\nUser creates a user.","operationId":"create_record_user_put","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/search":{"post":{"tags":["User","Admin"],"summary":"Search Users","description":"Allowed: Admin\n\nUser searches in users.\n\nSEC-F03: this route was always documented and tagged as admin-only, but it\nwas guarded by `get_current_active_user` — so any authenticated account\ncould enumerate the whole user table. On 2026-08-01 an attacker harvested\n538 real user records through it (email, phone, Firebase uid, device_id,\npush token), and used the `is_admin` filter to list the administrators.\nThe guard now matches the documented contract.","operationId":"search_users_user_search_post","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFilter"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_UserInDB_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/{user_id}":{"patch":{"tags":["User","Admin"],"summary":"Update Record","description":"Allowed: Admin\n\nUser updates a user.","operationId":"update_record_user__user_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAdminUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["User","Admin"],"summary":"Get User Record","description":"Allowed: Admin, Own Profile\n\nAdmin can view any user's detail.\nNon-admin users can only view their own profile.","operationId":"get_user_record_user__user_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["User","Admin"],"summary":"Delete User Record","description":"Allowed: Admin\n\nDelete a user via the ledger-aware admin teardown (ADM-04): reuses the\nexact Phase 52/54 checklist-gate + `execute_account_deletion` path.\n`force=true` bypasses money-critical blockers (audited). `reason` is\nOPTIONAL — the live bottomup-console \"Delete\" button sends no body.","operationId":"delete_user_record_user__user_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminLifecycleForceRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/admin/users/{user_id}/disable":{"post":{"tags":["User","Admin"],"summary":"Disable User Record","description":"Allowed: Admin\n\nBan a user (ADM-04): fail-open Firebase disable + is_active=False + real\nsession revocation, delegating into admin_disable_user. `reason` is\nOPTIONAL.","operationId":"disable_user_record_user_admin_users__user_id__disable_post","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminLifecycleRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/users/{user_id}/enable":{"post":{"tags":["User","Admin"],"summary":"Enable User Record","description":"Allowed: Admin\n\nReactivate a user (ADM-04): fail-open Firebase enable + is_active=True +\nthe unified three-representation suspension clear, delegating into\nadmin_enable_user. `reason` is OPTIONAL.","operationId":"enable_user_record_user_admin_users__user_id__enable_post","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminLifecycleRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/roles/{user_id}":{"patch":{"tags":["User","Admin"],"summary":"Set Claim","description":"Allowed: Admin\n\nUser sets claim for a user.","operationId":"set_claim_user_roles__user_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"User Id"}},{"name":"admin","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Admin"}},{"name":"trader","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Trader"}},{"name":"customer","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Customer"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/users/migrate":{"post":{"tags":["User","Admin"],"summary":"Migrate User","description":"Allowed: Admin only\n\nMigrate user data from one account to another.\n- Moves credits, subscriptions from 'from' user to 'to' user\n- Disables 'from' user and marks as deleted\n- Disables 'from' Firebase account","operationId":"migrate_user_user_admin_users_migrate_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateUserResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/suspensions":{"get":{"tags":["User","Admin"],"summary":"List Suspensions","description":"Allowed: Admin\n\nList trader suspensions with filtering, sorting, and pagination.","operationId":"list_suspensions_user_admin_suspensions_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(newest|oldest)$","default":"newest","title":"Order By"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(active|expired|all)$","default":"all","title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","title":"Search"}},{"name":"rule_type","in":"query","required":false,"schema":{"type":"string","title":"Rule Type"}},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date-time","title":"Date To"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_TraderSuspensionListItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/suspensions/{suspension_id}/reinstate":{"post":{"tags":["User","Admin"],"summary":"Reinstate Suspension","description":"Allowed: Admin\n\nReinstate a suspended trader. Thin delegating wrapper over\n`admin_enable_user` (ADM-04) — same net effect (Firebase enable + local\nreactivate + three-representation suspension clear) as calling the\nshared primitive directly. `reason` is OPTIONAL — the live\nbottomup-console \"Reinstate\" button sends no body.","operationId":"reinstate_suspension_user_admin_suspensions__suspension_id__reinstate_post","security":[{"Bearer":[]}],"parameters":[{"name":"suspension_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Suspension Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminLifecycleRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/trader-applications":{"post":{"tags":["User","Trader Application"],"summary":"Create Trader Application","description":"User applies to become a trader.","operationId":"create_trader_application_user_trader_applications_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderApplicationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderApplicationOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/trader-applications/me":{"get":{"tags":["User","Trader Application"],"summary":"My Trader Applications","description":"List current user's trader applications.","operationId":"my_trader_applications_user_trader_applications_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_TraderApplicationOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/trader-applications":{"get":{"tags":["User","Admin"],"summary":"List Trader Applications Admin","description":"Admin: list all trader applications.","operationId":"list_trader_applications_admin_user_admin_trader_applications_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"pending","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_TraderApplicationOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/trader-applications/{application_id}/approve":{"post":{"tags":["User","Admin"],"summary":"Approve Trader Application","description":"Admin: approve a trader application.","operationId":"approve_trader_application_user_admin_trader_applications__application_id__approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Application Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderApplicationReview","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderApplicationOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/user/admin/trader-applications/{application_id}/reject":{"post":{"tags":["User","Admin"],"summary":"Reject Trader Application","description":"Admin: reject a trader application.","operationId":"reject_trader_application_user_admin_trader_applications__application_id__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Application Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderApplicationReview","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderApplicationOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/referral_code":{"get":{"tags":["Trader","Trader"],"summary":"Get Trader Invitation Code","description":"Allowed: Trader\n\nTrader gets his/her invitation code.","operationId":"Get_Trader_invitation_code_trader_me_referral_code_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCodeBase"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/followers":{"get":{"tags":["Trader","Trader"],"summary":"Get Followers Of A Trader","description":"Allowed: Customer, Trader, Admin\n\nUser get a list of his/her followers.","operationId":"Get_Followers_of_A_Trader_trader_me_followers_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/earnings":{"get":{"tags":["Trader","Trader"],"summary":"Trader Earnings","description":"Allowed: Public\n\nUsers get a list of traders.","operationId":"Trader_Earnings_trader_me_earnings_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"name|name_desc|rate|rate_desc|follower|follower_desc","description":"name / name_desc / rate / rate_desc / follower / follower_desc","default":"name","title":"Order By"},"description":"name / name_desc / rate / rate_desc / follower / follower_desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/search":{"post":{"tags":["Trader","Trader"],"summary":"Trader List","description":"Allowed: Public\n\nUsers get a list of traders.","operationId":"Trader_List_trader_search_post","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"name|name_desc|rate|rate_desc|follower|follower_desc|random|trending|pnl|weekly_pnl|win_rate|total_pnl|total_win_rate","description":"name / name_desc / rate / rate_desc / follower / follower_desc / random / trending / pnl / weekly_pnl / win_rate / total_pnl / total_win_rate","default":"name","title":"Order By"},"description":"name / name_desc / rate / rate_desc / follower / follower_desc / random / trending / pnl / weekly_pnl / win_rate / total_pnl / total_win_rate"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderFilter","description":"can be set only name and email"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/lookup":{"get":{"tags":["Trader","Trader"],"summary":"Trader Lookup List","description":"Allowed: Public\n\nUsers get a list of traders.","operationId":"Trader_Lookup_List_trader_lookup_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10,"title":"Limit"}},{"name":"trader_name","in":"query","required":false,"schema":{"type":"string","description":"Trader name","title":"Trader Name"},"description":"Trader name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderLookupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/detail/{trader_id}":{"get":{"tags":["Trader","Trader"],"summary":"Trader Detail","description":"Allowed: Public\n\nUsers get detail of a trader.","operationId":"Trader_Detail_trader_detail__trader_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderInfo"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me":{"get":{"tags":["Trader"],"summary":"About Me","description":"Allowed: Trader\n\nTrader gets his/her information.","operationId":"About_Me_trader_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Trader"],"summary":"Update Trader Personal Info","description":"Allowed: Trader\n\nTrader updates his/her information","operationId":"Update_Trader_Personal_Info_trader_me_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/invitations":{"get":{"tags":["Trader"],"summary":"Invitations And Earnings","description":"Allowed: Trader\n\nTrader gets his/her information.","operationId":"Invitations_and_Earnings_trader_me_invitations_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","format":"date","title":"To Date"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderInvitationList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/invitations/summary":{"get":{"tags":["Trader"],"summary":"Summary Of Earnings","description":"Allowed: Trader\n\nhttps://trader.bottomup.app/\n\nTrader gets his/her information.","operationId":"Summary_of_Earnings_trader_me_invitations_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"day_filter","in":"query","required":false,"schema":{"type":"string","pattern":"all|last30|this-mount|next-mount|prev-mount","default":"this-mount","title":"Day Filter"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderInvitationSummary"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/referrals":{"get":{"tags":["Trader"],"summary":"Users Referred By This Trader","description":"Subscribers stamped on user_subscription.trader_id (referral at purchase).\n\nfrom_date / to_date are UTC dates as sent by the client (to_date exclusive).","operationId":"Users_referred_by_this_trader_trader_me_referrals_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_date","in":"query","required":false,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","format":"date","title":"To Date"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferredUserList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/profile_links":{"get":{"tags":["Trader","Trader"],"summary":"Available Links","description":"Allowed: Public","operationId":"Available_Links_trader_profile_links_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/profile/{trader_id}":{"get":{"tags":["Trader","Trader"],"summary":"Trader Profile","description":"Allowed: Public\n\nUsers get profile of a trader.","operationId":"Trader_Profile_trader_profile__trader_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderProfileDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/profile/code/{code}":{"get":{"tags":["Trader","Trader"],"summary":"Trader Profile By Code","description":"Allowed: Public\n\nUsers get profile of a trader.","operationId":"Trader_Profile_by_Code_trader_profile_code__code__get","security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderProfileDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/profile/{trader_id}/content":{"get":{"tags":["Trader","Trader"],"summary":"Trader Profile Content","description":"Allowed: Public\n\nUsers get profile of a trader.","operationId":"Trader_Profile_Content_trader_profile__trader_id__content_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/profile/{trader_id}/performance":{"get":{"tags":["Trader","Trader"],"summary":"Trader Profile Performance Time Series","description":"Allowed: Public\n\nTrader profilde grafikte göstermek için haftalık/aylık PnL, ROI, winrate time-series döner.\nEkstra:\n- mode=gross|net\n- fill_gaps: boş period'ları 0 ile doldurma\n- cumulative_pnl: kümülatif pnl\n\nGET /trader/profile/<TRADER_ID>/performance?category=futures&mode=net&fill_gaps=true&weekly_limit=26&monthly_limit=12\n\nGET /trader/profile/<TRADER_ID>/performance?mode=gross&fill_gaps=false","operationId":"Trader_Profile_Performance_Time_Series_trader_profile__trader_id__performance_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"description":"Optional: futures / spot. If empty, returns all categories.","title":"Category"},"description":"Optional: futures / spot. If empty, returns all categories."},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"gross|net","description":"gross: pnl+pnl_rate, net: estimated_pnl+estimated_pnl_rate","default":"net","title":"Mode"},"description":"gross: pnl+pnl_rate, net: estimated_pnl+estimated_pnl_rate"},{"name":"fill_gaps","in":"query","required":false,"schema":{"type":"boolean","description":"true ise son N period için boş haftalar/aylar 0 ile doldurulur.","default":true,"title":"Fill Gaps"},"description":"true ise son N period için boş haftalar/aylar 0 ile doldurulur."},{"name":"weekly_limit","in":"query","required":false,"schema":{"type":"integer","maximum":260,"minimum":1,"description":"Max weekly points","default":52,"title":"Weekly Limit"},"description":"Max weekly points"},{"name":"monthly_limit","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":1,"description":"Max monthly points","default":24,"title":"Monthly Limit"},"description":"Max monthly points"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderPerformanceTimeSeriesResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/profile/image":{"patch":{"tags":["Trader"],"summary":"Update Profile Image","operationId":"Update_Profile_Image_trader_me_profile_image_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_Update_Profile_Image_trader_me_profile_image_patch"}}}},"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/me/profile/content":{"patch":{"tags":["Trader"],"summary":"Update Profile Content","operationId":"Update_Profile_Content_trader_me_profile_content_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"requestBody":{"content":{"text/plain":{"schema":{"title":"Content","type":"string"}}},"required":true}}},"/trader/me/profile/links":{"patch":{"tags":["Trader"],"summary":"Update Profile Links","operationId":"Update_Profile_Links_trader_me_profile_links_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TraderProfileLink"},"title":"Links"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderProfile"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader/referral-codes":{"get":{"tags":["Trader","Admin"],"summary":"Get Referral Codes","description":"Admin endpoint to get all referral codes","operationId":"get_referral_codes_trader_referral_codes_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","default":"newest","title":"Order By"}},{"name":"trader_name","in":"query","required":false,"schema":{"type":"string","title":"Trader Name"}},{"name":"trader_email","in":"query","required":false,"schema":{"type":"string","title":"Trader Email"}},{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReferralCodeInfo"},"title":"Response Get Referral Codes Trader Referral Codes Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/trader-payouts/report":{"get":{"tags":["Trader Payouts"],"summary":"Admin Trader Payout Report","operationId":"admin_trader_payout_report_admin_trader_payouts_report_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trader/payouts/me/current":{"get":{"tags":["Trader Payouts"],"summary":"Trader Payout Current","operationId":"trader_payout_current_trader_payouts_me_current_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trader/payouts/me":{"get":{"tags":["Trader Payouts"],"summary":"Trader Payout History","operationId":"trader_payout_history_trader_payouts_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/growth/report":{"get":{"tags":["Growth"],"summary":"Admin Growth Report","operationId":"admin_growth_report_admin_growth_report_get","security":[{"Bearer":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/setup/service/foxy-pro":{"put":{"tags":["Setup","Service"],"summary":"Create Foxy Pro Setup","description":"Create the trader's setup for a Foxy Pro signal (201), or return the\nsetup this signal already has (200).","operationId":"create_foxy_pro_setup_setup_service_foxy_pro_put","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyProSetupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/service/foxy-pro/{setup_id}/adopt":{"post":{"tags":["Setup","Service"],"summary":"Adopt Foxy Pro Setup","description":"Let the bridge manage a setup the trader shared in the app.\n\nOnly the trader's own setup: ``trader_id`` must be its owner (403), and an\nunknown or deleted setup is a 404. Writes the link the other routes check,\nwith ``foxy_signal_id`` ``bu:<setup id>``. Idempotent: a setup already\nlinked (adopted, or made by the bridge) is returned as it is. Nothing about\nthe setup changes here; the app's rules still run on every later change.","operationId":"adopt_foxy_pro_setup_setup_service_foxy_pro__setup_id__adopt_post","parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyProSetupAdopt"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/service/foxy-pro/{setup_id}":{"patch":{"tags":["Setup","Service"],"summary":"Update Foxy Pro Setup","description":"Move the setup's levels as its trader would in the app.","operationId":"update_foxy_pro_setup_setup_service_foxy_pro__setup_id__patch","parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyProSetupLevels"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Setup","Service"],"summary":"Cancel Foxy Pro Setup","description":"Cancel an incoming setup, as the trader would in the app. Answers 200\nwith the setup (not the app route's empty 204: the caller parses JSON); an\nalready cancelled setup is returned as it is.","operationId":"cancel_foxy_pro_setup_setup_service_foxy_pro__setup_id__delete","parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/service/foxy-pro/{setup_id}/partial-close":{"patch":{"tags":["Setup","Service"],"summary":"Partial Close Foxy Pro Setup","description":"Close ``percent`` of what is left, as the trader would in the app.","operationId":"partial_close_foxy_pro_setup_setup_service_foxy_pro__setup_id__partial_close_patch","parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupPartialCloseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/service/foxy-pro/{setup_id}/close":{"patch":{"tags":["Setup","Service"],"summary":"Close Foxy Pro Setup","description":"Close the setup at market, as the trader would in the app. A setup that\nis already over (closed, target or stop hit) is returned as it is.","operationId":"close_foxy_pro_setup_setup_service_foxy_pro__setup_id__close_patch","parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/tags":{"get":{"tags":["Setup"],"summary":"List Tags","description":"Allowed: Customer, Trader, Admin\n\nUsers can get a list of tags.","operationId":"list_tags_setup_tags_get","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/tags/{tag}":{"get":{"tags":["Setup"],"summary":"Filter By Tag","description":"Allowed: Customer, Trader, Admin\n\nUsers can get setups by tag.","operationId":"filter_by_tag_setup_tags__tag__get","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"only_incoming","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Incoming"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail|trader_name","description":"newest / oldest / popular / success / fail / trader_name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail / trader_name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/trader/{trader_id}":{"get":{"tags":["Setup"],"summary":"Filter By Trader","description":"Allowed: Customer, Trader, Admin\n\nUsers can get setups of a trader.","operationId":"filter_by_trader_setup_trader__trader_id__get","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"only_incoming","in":"query","required":false,"schema":{"type":"boolean","deprecated":true,"default":false,"title":"Only Incoming"},"deprecated":true},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail|trader_name","description":"newest / oldest / popular / success / fail / trader_name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail / trader_name"},{"name":"state","in":"query","required":false,"schema":{"type":"string","pattern":"all|incoming|active|archived","description":"all / incoming / active / archived","default":"all","title":"State"},"description":"all / incoming / active / archived"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/trader/{trader_id}/pnl":{"get":{"tags":["Setup"],"summary":"Get Pnlsetup Of Trader","description":"Allowed: Trader\n\nTrader can get own success setups","operationId":"get_pnlsetup_of_trader_setup_trader__trader_id__pnl_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest","description":"newest / oldest","default":"newest","title":"Order By"},"description":"newest / oldest"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlSetupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup":{"get":{"tags":["Setup"],"summary":"List Setups","description":"Allowed: Public\n\nUsers can get setups list.","operationId":"list_setups_setup_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"only_followed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Only Followed"}},{"name":"only_incoming","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Incoming"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail|trader_name","description":"newest / oldest / popular / success / fail / trader_name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail / trader_name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["Setup"],"summary":"Create Setup","description":"Allowed: Trader\n\nTraders can create a setup.","operationId":"create_setup_setup_put","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_setup_setup_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/search":{"post":{"tags":["Setup"],"summary":"Search Records","description":"Allowed: Public\n\nUsers can get setups list.","operationId":"search_records_setup_search_post","security":[{"Bearer":[]}],"parameters":[{"name":"only_followed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Only Followed"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail|trader_name","description":"newest / oldest / popular / success / fail / trader_name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail / trader_name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupSearch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/stats":{"get":{"tags":["Setup"],"summary":"Get Setup Stats","description":"Allowed: Superuser only\n\nReturns setup counts grouped by status.","operationId":"get_setup_stats_setup_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupStats"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}":{"patch":{"tags":["Setup"],"summary":"Update Setup","description":"Allowed: Trader\n\nTraders can update a setup.","operationId":"update_setup_setup__setup_id__patch","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_setup_setup__setup_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Setup"],"summary":"Get Setup","description":"Allowed: User, Customer, Trader, Admin\n\nUsers can get setups.","operationId":"get_setup_setup__setup_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Setup"},{"$ref":"#/components/schemas/SetupPreview"}],"title":"Response Get Setup Setup  Setup Id  Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Setup"],"summary":"Cancel Setup","description":"Allowed: Trader\n\nTraders can cancel a setup.","operationId":"cancel_setup_setup__setup_id__delete","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/success_image":{"patch":{"tags":["Setup"],"summary":"Update Success Image","description":"Allowed: Trader\n\nTraders can update a setup.","operationId":"update_success_image_setup__setup_id__success_image_patch","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_success_image_setup__setup_id__success_image_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/my-purchases":{"get":{"tags":["Setup"],"summary":"List My Purchases","description":"Allowed: User, Customer, Trader, Admin\n\nList setups purchased by the current user.","operationId":"list_my_purchases_setup_my_purchases_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest","description":"newest / oldest","default":"newest","title":"Order By"},"description":"newest / oldest"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/close":{"patch":{"tags":["Setup"],"summary":"Close Setup","description":"Allowed: Trader\n\nTrader can close own setup.","operationId":"close_setup_setup__setup_id__close_patch","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"423":{"description":"The item has already been closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/partial-close":{"patch":{"tags":["Setup"],"summary":"Partial Close Setup","description":"Allowed: Trader / Admin\n\nOKX-style partial market close: reduce ``percent`` of *remaining* size at market.\npercent=100 follows the full close path (no partial_closed notify/webhook).","operationId":"partial_close_setup_setup__setup_id__partial_close_patch","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupPartialCloseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"423":{"description":"Setup not active or already closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/clap":{"put":{"tags":["Setup"],"summary":"Clap Setup","description":"Allowed: Customer, Trader, Admin\n\nUsers can clap a setup.","operationId":"clap_setup_setup__setup_id__clap_put","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/unclap":{"delete":{"tags":["Setup"],"summary":"Unclap Setup","description":"Allowed: Customer, Trader, Admin\n\nUsers can remove his/her clap from a setup.","operationId":"unclap_setup_setup__setup_id__unclap_delete","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/report":{"post":{"tags":["Setup"],"summary":"Report Setup","description":"Allowed: Customer\n\nUsers can report a setup.","operationId":"report_setup_setup__setup_id__report_post","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","title":"Content"}}}},"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/previous_values":{"get":{"tags":["Setup"],"summary":"Get Previous Values","description":"Allowed: Customer\n\nUsers can get a list of updated values.","operationId":"get_previous_values_setup__setup_id__previous_values_get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"field_name","in":"query","required":false,"schema":{"type":"string","pattern":"entry_value|entry_value_end|stop_value|profit_taking_1|profit_taking_2|profit_taking_3","title":"Field Name"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SetupValueHistory"},"title":"Response Get Previous Values Setup  Setup Id  Previous Values Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/check-position":{"get":{"tags":["Setup"],"summary":"Check Position","description":"Allowed: the setup's owner or an admin may call with `simulate=true`.\nOnly an admin may call with `simulate=false`.\n\n`simulate=false` makes the checker replay the setup's price history and\nPERSIST the corrected state back over `PATCH /internal/setups/{id}/status`\n(status, activation_date, activated_stop_value, is_tpN and the date\ncolumns) — it mutates state despite the GET verb, so it is restricted to\nadmins as an ops tool rather than a trader feature.","operationId":"Check_Position_setup__setup_id__check_position_get","security":[{"Bearer":[]},{"ApiKey":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"simulate","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Simulate"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/pnl/{setup_id}":{"get":{"tags":["Setup"],"summary":"Get Pnl Setup By Id","description":"Allowed: Customer, Trader, Admin\n\nUsers can get setups of a trader.","operationId":"get_pnl_setup_by_id_setup_pnl__setup_id__get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlSetup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/pnl":{"get":{"tags":["Setup"],"summary":"Get Pnl Setup By Id","description":"Allowed: Customer, Trader, Admin\n\nUsers can get setups of a trader.","operationId":"get_pnl_setup_by_id_setup__setup_id__pnl_get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlSetup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/pnl/":{"get":{"tags":["Setup"],"summary":"List Pnl Setups","description":"Allowed: Public\n\nUsers can get setups list.","operationId":"list_pnl_setups_setup_pnl__get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest","description":"newest / oldest","default":"newest","title":"Order By"},"description":"newest / oldest"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlSetupList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/setup/{setup_id}/purchase":{"post":{"tags":["Setup"],"summary":"Purchase Setup","description":"Purchase access to a premium (positively priced) setup.\nChecks: setup exists, is not practice-kind, has a price, user not already\nsubscribed to shop, not already purchased.","operationId":"purchase_setup_setup__setup_id__purchase_post","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupPurchaseResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team":{"get":{"tags":["Copy Trade"],"summary":"Team - Detail","description":"Get team detail","operationId":"get_team_copy_trade_team_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Copy Trade"],"summary":"Team - Update","description":"Update team's name","operationId":"update_team_copy_trade_team_patch","security":[{"Bearer":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/trader":{"put":{"tags":["Copy Trade"],"summary":"Team - Add analyst","description":"Add an analyst to your team","operationId":"add_trader_to_team_copy_trade_team_trader_put","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"208":{"description":"The item has already been added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"406":{"description":"Limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Copy Trade"],"summary":"Team - Remove analyst","description":"Remove an analyst from your team","operationId":"remove_trader_from_team_copy_trade_team_trader_delete","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/stats":{"get":{"tags":["Copy Trade"],"summary":"Team - Stats","description":"Provides a detailed overview of the authenticated user's team, including members and performance metrics.","operationId":"get_team_stats_copy_trade_team_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","examples":["daily","weekly","monthly","all"],"enum":["daily","weekly","monthly","all"],"default":"daily","title":"Period"}},{"name":"market_type","in":"query","required":false,"schema":{"type":"string","examples":["spot","futures","all"],"enum":["spot","futures","all"],"default":"futures","title":"Market Type"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamStatsModel"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/trader/{trader_id}/balance":{"get":{"tags":["Copy Trade"],"summary":"Team - Trader Balance","description":"Get a followed trader's balance information","operationId":"get_trader_balance_copy_trade_team_trader__trader_id__balance_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderBalanceResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/suggestions/preferences":{"get":{"tags":["Copy Trade"],"summary":"Team - Read suggestion preferences","description":"Return the caller's stored suggestion preferences.\n\nAllowed: Customer\n\n404 when no row exists -- deliberately, not a 200-with-defaults and not a\n204. The console's first-run chooser is driven by this 404; a 204 is read\nas \"returned with an undefined profile\" and renders `Profile: undefined`,\nthen PUTs a body missing three required fields.\n\nIDOR guard: the user id comes only from the authenticated request.","operationId":"get_team_suggestion_preferences_copy_trade_team_suggestions_preferences_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSuggestionPreference"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["Copy Trade"],"summary":"Team - Replace suggestion preferences","description":"Create or fully replace the caller's suggestion preferences.\n\nAllowed: Customer\n\nA full replace, not a patch: all four fields are required. Returns the\ncomplete stored body, because the console writes this response straight\ninto its query cache.\n\nTouches only the four suggestion columns -- an absent row is created with\nthe model's own defaults for the generic notification fields (quiet hours,\ngeneric push/in-app), which this surface has no business setting.\n\nIDOR guard: the user id comes only from the authenticated request.","operationId":"put_team_suggestion_preferences_copy_trade_team_suggestions_preferences_put","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSuggestionPreference"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSuggestionPreference"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/suggestions":{"get":{"tags":["Copy Trade"],"summary":"Team - Suggestions","description":"Allowed: Customer\n\n``profile`` now defaults to the caller's saved ``risk_profile`` instead of\na hardcoded ``balanced``. Resolved BEFORE the rollout gate, because the\ngate's enabled-profiles check reads it.","operationId":"get_team_suggestions_copy_trade_team_suggestions_get","security":[{"Bearer":[]}],"parameters":[{"name":"profile","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"conservative|balanced|aggressive"},{"type":"null"}],"title":"Profile"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","pattern":"futures|spot","default":"futures","title":"Category"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/suggestions/{recommendation_id}/view":{"post":{"tags":["Copy Trade"],"summary":"Team - View suggestion","description":"Allowed: Customer","operationId":"view_suggestion_copy_trade_team_suggestions__recommendation_id__view_post","security":[{"Bearer":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recommendation Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/suggestions/{recommendation_id}/accept":{"post":{"tags":["Copy Trade"],"summary":"Team - Accept suggestion","description":"Allowed: Customer","operationId":"accept_suggestion_copy_trade_team_suggestions__recommendation_id__accept_post","security":[{"Bearer":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recommendation Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/team/suggestions/{recommendation_id}/dismiss":{"post":{"tags":["Copy Trade"],"summary":"Team - Dismiss suggestion","description":"Allowed: Customer","operationId":"dismiss_suggestion_copy_trade_team_suggestions__recommendation_id__dismiss_post","security":[{"Bearer":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recommendation Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/setup":{"get":{"tags":["Copy Trade"],"summary":"Copy trades - List","description":"Allowed: Public\n\nUsers can get a list of copied setups\n\n**`needs_attention` is ADDITIVE (Phase 81 / COPY-05 / D-81-34).** It is a\nfourth tab listing the caller's copies whose copy trade is in the `error`\nstate — rows the base query used to exclude outright, which is why a failed\ncopy rendered as *never copied*. The three historical values\n(`limit` / `active` / `archived`) answer exactly as they did before: their\nfilter branches are unchanged and none of them admits an `error` row.\n\nEvery row on this surface now also carries the normalized failure block\n(`copy_error_code`, `copy_error_message_key`, `copy_error_reason`,\n`copy_error_action`, `copy_retryable`, `copy_next_retry_at`) plus\n`copy_attempt_no`. `copy_retryable` is the ACTIONABLE-only verdict that\n`POST /copy_trade/setup/retry` returns, never the classifier's wider flag,\nso the affordance this list implies and the answer that endpoint gives can\nnever disagree. It is NOT a live eligibility check — the retry endpoint\nre-decides through `run_retry_preflight`. Raw provider text is never\nprojected.","operationId":"get_copy_trade_setups_copy_trade_setup_get","security":[{"Bearer":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","pattern":"limit|active|archived|needs_attention","description":"limit / active / archived / needs_attention","default":"limit","title":"State"},"description":"limit / active / archived / needs_attention"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail","description":"newest / oldest / popular / success / fail","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyTradeList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["Copy Trade"],"summary":"Copy trades - Make copy trade","description":"Allowed: User (subscribers copy all setups; non-subscribers can copy\npublic or purchased setups with reduced credit earning ratio)\n\nMake copy trade for the selected setup","operationId":"copy_trade_setup_copy_trade_setup_put","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Copy Trade"],"summary":"Copy trades - Update orders","description":"Allowed: Service\n\nUpdate orders of a copy trade","operationId":"update_copy_trade_state_copy_trade_setup_patch","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyTradeUpdate-Input"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"208":{"description":"The item has already been added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Copy Trade"],"summary":"Copy trades - Cancel","description":"Allowed: Customer\n\nCancel copied trade order","operationId":"cancel_copy_trade_copy_trade_setup_delete","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/setup/retry":{"post":{"tags":["Copy Trade"],"summary":"Copy trades - Retry","description":"Allowed: Customer\n\nRetry a copy that failed for a reason the copier can act on (COPY-06).\n\nThe decision is made SERVER-SIDE by ``retry.run_retry_preflight``: six\nordered checks (active session, nothing in flight, setup still eligible,\nno live remote copy, an actionable root error, cooldown elapsed). A\nrefusal names one of seven closed reasons and writes nothing but the\nevidence of the ask. An acceptance records the next ordered attempt and\nits durable outbox command in ONE transaction, and only then enqueues\ndelivery.\n\n**Authorization shape copied from ``cancel_copy_trade`` exactly, not\napproximated.** The copier is ``request.user.id`` and nothing else: no\nuser identifier is accepted from a query parameter, a body field or a\nheader, because this endpoint can spend a user's funds (T-79-24). A\nrequest naming a setup this copier has no intent for — someone else's or\na nonexistent one — gets the SAME 404, so the endpoint cannot be used to\nenumerate which setups a given user copies (T-79-25).","operationId":"retry_copy_trade_copy_trade_setup_retry_post","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/all-setups":{"delete":{"tags":["Copy Trade"],"summary":"Copy trades - Cancel All","description":"Allowed: Customer\n\nCancel all copied trade orders","operationId":"cancel_all_setups_copy_trade_all_setups_delete","security":[{"Bearer":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","pattern":"limit|active|orders|positions","description":"limit / active / orders / positions","default":"limit","title":"State"},"description":"limit / active / orders / positions"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/setup-unreleased-pnl":{"get":{"tags":["Copy Trade"],"summary":"Get Unreleased Pnl Values","description":"Allowed: Customer\n\nUsers can get unreleased PnL values of copied setups","operationId":"get_unreleased_pnl_copy_trade_setup_unreleased_pnl_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlValue"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/setup-status":{"get":{"tags":["Copy Trade"],"summary":"Get status of setups","description":"Allowed: Service\n\nGet status of setups","operationId":"get_setup_status_copy_trade_setup_status_get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setup"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/setup-conflicts":{"get":{"tags":["Copy Trade"],"summary":"Get conflicts of setups","description":"Allowed: Service\n\nGet conflicts of setups","operationId":"get_setup_conflicts_copy_trade_setup_conflicts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":[]}]}},"/copy_trade/market/configure":{"patch":{"tags":["Copy Trade"],"summary":"Market - Set Configurations","description":"Error message codes\n\n    invalid_market\n    copied_setup_exist\n    invalid_api_key_or_secret\n    invalid_account_level\n    missing_permission_read_only\n    missing_permission_trade\n    invalid_permission_withdraw\n    invalid_ip_address\n    invalid_account_balance\n    insufficient_account_balance\n    already_used_account\n\nReconnect is governed by the shared active-trades guard (CONN-03, Phase\n100 plan 100-03) — a caller holding an active copy-trade on the\nsubmitted market gets `copied_setup_exist`, the same code the\ndisconnect doors already return. A different-market switch with no\nactive copies now succeeds; this door's prior different-market refusal\ncode is retired (D-100-5).\n\nAllowed: Customer","operationId":"update_market_config_copy_trade_market_configure_patch","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfigState"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Copy Trade"],"summary":"Market - Get configuration","description":"Error message codes\n\n    invalid_api_key_or_secret\n    invalid_account_level\n    missing_permission_read_only\n    missing_permission_trade\n    invalid_permission_withdraw\n    invalid_ip_address\n    invalid_account_balance\n    insufficient_account_balance\n    already_used_account\n\nAllowed: Customer","operationId":"get_market_config_state_copy_trade_market_configure_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfigResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Copy Trade"],"summary":"Market - Remove Configuration","description":"Allowed: Customer","operationId":"delete_market_config_copy_trade_market_configure_delete","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"market","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The exchange to disconnect. Omitting it falls back to the user's effective market (an active connection, real-wins-over-paper, else the legacy copy_trade_market column) — the shape mobile and the console send today.","title":"Market"},"description":"The exchange to disconnect. Omitting it falls back to the user's effective market (an active connection, real-wins-over-paper, else the legacy copy_trade_market column) — the shape mobile and the console send today."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/market/balance":{"patch":{"tags":["Copy Trade"],"summary":"Market - Set Balance","description":"Error message codes\n\n    invalid_balance\n    invalid_max_total_risk\n    invalid_api_key_or_secret\n    invalid_account_level\n    missing_permission_read_only\n    missing_permission_trade\n    invalid_permission_withdraw\n    invalid_ip_address\n    invalid_account_balance\n    insufficient_account_balance\n    already_used_account\n\nAllowed: Customer","operationId":"update_market_balance_copy_trade_market_balance_patch","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfigBalance"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfigResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/market/pause":{"patch":{"tags":["Copy Trade"],"summary":"Market - Set Pause State","description":"Allowed: Customer","operationId":"update_market_pause_state_copy_trade_market_pause_patch","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfigPause"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMe"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/traders/{trader_id}/performance/summary":{"get":{"tags":["Copy Trade"],"summary":"Trader Performance Summary","description":"Provides a summary of the trader's performance over a specified period.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": {\n          \"pnl_usdt\": -37.866,\n          \"roe_pct\": -60.9689,\n          \"win_rate_pct\": 50,\n          \"profit_factor\": 0.3603,\n          \"sharpe_ratio\": null,\n          \"max_drawdown_pct\": null,\n          \"min_pnl\": -23.6301,\n          \"max_pnl\": 9.256,\n          \"average_win\": 5.332,\n          \"average_loss\": -14.7985,\n          \"max_consecutive_wins\": 3,\n          \"max_consecutive_losses\": 3,\n          \"trade_count\": 13,\n          \"average_position_duration_minutes\": null\n        },\n        \"meta\": {\n          \"period\": \"yearly\",\n          \"from\": \"2025-02-24\",\n          \"to\": \"2026-02-24\",\n          \"calculated_at\": \"2026-02-24T12:11:27.1886560Z\",\n          \"cursor\": null\n        }\n      }\n    ]","operationId":"Trader_Performance_Summary_copy_trade_analytics_traders__trader_id__performance_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/traders/{trader_id}/performance/timeseries":{"get":{"tags":["Copy Trade"],"summary":"Analytics Traders Performance Timeseries","description":"Provides a timeseries of the trader's performance over a specified period.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": [\n          {\n            \"date\": \"2026-02-04\",\n            \"cumulative_pnl\": -6.8513,\n            \"trade_count\": 1,\n            \"win_rate_pct\": 0\n          },\n          {\n            \"date\": \"2026-02-23\",\n            \"cumulative_pnl\": -18.7213,\n            \"trade_count\": 3,\n            \"win_rate_pct\": 33.3333\n          }\n        ],\n        \"meta\": {\n          \"period\": null,\n          \"from\": \"2025-02-24\",\n          \"to\": \"2026-02-24\",\n          \"calculated_at\": \"2026-02-24T12:13:20.2964440Z\",\n          \"cursor\": null\n        }\n      }\n    ]","operationId":"Analytics_Traders_Performance_Timeseries_copy_trade_analytics_traders__trader_id__performance_timeseries_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (ISO)","title":"From"},"description":"Start date (ISO)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (ISO)","title":"To"},"description":"End date (ISO)"},{"name":"interval","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IntervalEnum","description":"1h|1d|1w","default":"1d"},"description":"1h|1d|1w"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/traders/compare":{"get":{"tags":["Copy Trade"],"summary":"Analytics Traders Compare","description":"Compares the performance of multiple traders over a specified period.\n\nThis endpoint fetches analytics data related to the performance of multiple traders\nfor a specified period.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": {\n          \"traders\": [\n            {\n              \"trader_id\": \"217bb1a9-5e2f-4b69-88d2-e61204aa85c3\",\n              \"metrics\": {\n                \"pnl_usdt\": 9710.069,\n                \"roe_pct\": 121.4526,\n                \"win_rate_pct\": 28.5714,\n                \"profit_factor\": 6.5419,\n                \"sharpe_ratio\": null,\n                \"max_drawdown_pct\": null,\n                \"min_pnl\": -633.7885,\n                \"max_pnl\": 8159.0979,\n                \"average_win\": 1432.772,\n                \"average_loss\": -87.6053,\n                \"max_consecutive_wins\": 7,\n                \"max_consecutive_losses\": 14,\n                \"trade_count\": 40,\n                \"average_position_duration_minutes\": null\n              }\n            },\n            ...\n          ]\n        },\n        \"meta\": {\n          \"period\": \"weekly\",\n          \"from\": \"2026-02-17\",\n          \"to\": \"2026-02-24\",\n          \"calculated_at\": \"2026-02-24T12:37:27.2998600Z\",\n          \"cursor\": null\n        }\n      }\n    ]","operationId":"Analytics_Traders_Compare_copy_trade_analytics_traders_compare_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated list of trader IDs","title":"Trader Ids"},"description":"Comma-separated list of trader IDs"},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/traders/ranking":{"get":{"tags":["Copy Trade"],"summary":"Analytics Traders Ranking","description":"Retrieves the ranking information of traders within a specified period.\n\nThis endpoint fetches analytics data related to the ranking of a specific\ntrader over a given timeframe. The ranking is determined by analysis on the\ntrader's performance and other related metrics. The data is processed by\na market service specific to the authenticated user.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": {\n          \"rankings\": [\n            {\n              \"trader_id\": \"e1937eca-5a72-49b5-b6fc-99da87b0352a\",\n              \"rank\": 1,\n              \"score\": 0.375,\n              \"sharpe_ratio\": null,\n              \"win_rate_pct\": 50,\n              \"profit_factor\": 1675.8025,\n              \"max_drawdown_pct\": null,\n              \"trade_count\": 5\n            },\n            {\n              \"trader_id\": \"aa672ace-7007-4291-88e7-eaebcd188548\",\n              \"rank\": 2,\n              \"score\": 0.25,\n              \"sharpe_ratio\": null,\n              \"win_rate_pct\": 100,\n              \"profit_factor\": null,\n              \"max_drawdown_pct\": null,\n              \"trade_count\": 13\n            },\n            ...\n          ]\n        },\n        \"meta\": {\n          \"period\": \"yearly\",\n          \"from\": \"2025-02-24\",\n          \"to\": \"2026-02-24\",\n          \"calculated_at\": \"2026-02-24T12:42:02.5292230Z\",\n          \"cursor\": null\n        }\n      }\n    ]\n\n:param request: The HTTP request object.\n:type request: Request\n:param user_id: The unique identifier of the user to fetch ranking data for.\n:type user_id: str\n:param period: The time period for the ranking query. Can be one of\n    *daily*, *weekly*, *monthly*, or *yearly*. Default is *weekly*.\n:type period: PeriodEnum\n:param db: A database session dependency for querying data.\n:type db: Session\n:param current_user: The information about the currently authenticated user.\n:type current_user: ContextModel\n:return: The ranking information of the trader for the specified period.\n:rtype: Any","operationId":"Analytics_Traders_Ranking_copy_trade_analytics_traders_ranking_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/portfolio/{user_id}/summary":{"get":{"tags":["Copy Trade"],"summary":"Analytics Portfolio Summary","description":"Retrieve the portfolio analytics summary for a specific user within a given date range and time period.\n\nThis function allows querying of portfolio performance analytics for a particular\nuser ID. It requires a valid date range and a specified time aggregation period\n(daily, weekly, monthly, or yearly). The function relies on the market service\nto calculate summaries based on the authenticated user's access context.\n\n     [\n      true,\n      {\n        \"success\": true,\n        \"data\": {\n          \"start_balance\": 2406.1127,\n          \"end_balance\": 2362.1257,\n          \"pnl_usdt\": -43.987,\n          \"roi_pct\": -1.8281,\n          \"twr\": -1.8281,\n          \"mwr\": -1.8281,\n          \"peak_balance\": 2497.9134,\n          \"peak_balance_date\": \"2026-02-21\",\n          \"current_drawdown_pct\": -5.436,\n          \"max_drawdown_pct\": 7.2129,\n          \"max_drawdown_start_date\": \"2026-02-21\",\n          \"max_drawdown_end_date\": \"2026-02-23\",\n          \"max_drawdown_recovery_days\": null,\n          \"volatility\": 2.9926,\n          \"sharpe_ratio\": -1.4842,\n          \"calmar_ratio\": -8.5664,\n          \"consistency_score\": 0,\n          \"best_day_pnl\": 126.2118,\n          \"worst_day_pnl\": -92.9008\n        },\n        \"meta\": {\n          \"period\": \"weekly\",\n          \"from\": \"2026-02-17\",\n          \"to\": \"2026-02-24\",\n          \"calculated_at\": \"2026-02-24T12:10:33.8204180Z\",\n          \"cursor\": null\n        }\n      }\n    ]","operationId":"Analytics_Portfolio_Summary_copy_trade_analytics_portfolio__user_id__summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/portfolio/{user_id}/growth":{"get":{"tags":["Copy Trade"],"summary":"Analytics Portfolio Growth","description":"Handles the retrieval of portfolio growth analytics for a specific user over a defined\ntime frame and interval. This endpoint processes the request to analyze portfolio\ngrowth metrics and returns the analytics result.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": [\n          {\n            \"date\": \"2025-01-01\",\n            \"balance\": 0,\n            \"cumulative_pnl\": 0,\n            \"cumulative_roi_pct\": 0,\n            \"drawdown_pct\": 0\n          },\n          ...\n          {\n            \"date\": \"2026-01-01\",\n            \"balance\": 4738.4133,\n            \"cumulative_pnl\": 4738.4133,\n            \"cumulative_roi_pct\": 0,\n            \"drawdown_pct\": -8.1941\n          }\n        ],\n        \"meta\": {\n          \"period\": null,\n          \"from\": \"2025-01-01\",\n          \"to\": \"2026-01-01\",\n          \"calculated_at\": \"2026-02-24T11:48:27.1666030Z\",\n          \"cursor\": null\n        }\n      }\n    ]\n\n\n:param request: The HTTP request instance.\n:param user_id: The identifier of the user whose portfolio analytics is requested.\n:param from_date: The start date (ISO format) for the portfolio growth analytics.\n:param to_date: The end date (ISO format) for the portfolio growth analytics.\n:param interval: Specifies the interval at which portfolio growth should be analyzed.\n:param db: The database session dependency used to interact with the database.\n:param current_user: The currently authenticated user invoking the endpoint.\n:return: Portfolio growth analytics for the specified user.","operationId":"Analytics_Portfolio_Growth_copy_trade_analytics_portfolio__user_id__growth_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (ISO)","title":"From"},"description":"Start date (ISO)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (ISO)","title":"To"},"description":"End date (ISO)"},{"name":"interval","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IntervalEnum","description":"1h|1d|1w","default":"1d"},"description":"1h|1d|1w"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/portfolio/{user_id}/drawdown":{"get":{"tags":["Copy Trade"],"summary":"Analytics Portfolio Drawdown","description":"Fetches the portfolio drawdown analytics within the specified date range for a given\nuser ID. This endpoint is used to analyze the drawdown of a user's portfolio, calculated\nbased on market data. Drawdown metrics help assess the investment risk by measuring the\ndeclines from a peak in the portfolio's value over time.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": [\n          {\n            \"date\": \"2025-01-01\",\n            \"drawdown_pct\": 0,\n            \"is_recovering\": false,\n            \"days_in_drawdown\": 0\n          },\n          ...\n          {\n            \"date\": \"2026-01-01\",\n            \"drawdown_pct\": -8.1941,\n            \"is_recovering\": false,\n            \"days_in_drawdown\": 2\n          }\n        ],\n        \"meta\": {\n          \"period\": null,\n          \"from\": \"2025-01-01\",\n          \"to\": \"2026-01-01\",\n          \"calculated_at\": \"2026-02-24T11:47:28.5570800Z\",\n          \"cursor\": null\n        }\n      }\n    ]\n\n:param request: The HTTP request object containing metadata about the request.\n:type request: Request\n:param user_id: The identifier of the user whose portfolio drawdown is being analyzed.\n:type user_id: str\n:param from_date: The starting date of the analysis period in ISO 8601 format.\n:type from_date: datetime.date\n:param to_date: The ending date of the analysis period in ISO 8601 format.\n:type to_date: datetime.date\n:param db: The database session used to interact with persistence storage via dependency injection.\n:type db: Session\n:param current_user: The currently authenticated user object resolved from the authentication context.\n:type current_user: ContextModel\n:return: Portfolio drawdown analytics data as calculated based on market data.\n:rtype: Any","operationId":"Analytics_Portfolio_Drawdown_copy_trade_analytics_portfolio__user_id__drawdown_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (ISO)","title":"From"},"description":"Start date (ISO)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (ISO)","title":"To"},"description":"End date (ISO)"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/portfolio/{user_id}/attribution":{"get":{"tags":["Copy Trade"],"summary":"Analytics Portfolio Attribution","description":"Handles attribution analytics for a user's portfolio within a specified date range.\nThis endpoint retrieves analytical data related to portfolio performance, grouped\nbased on the specified time period.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": {\n          \"traders\": [\n            {\n              \"trader_id\": \"217bb1a9-5e2f-4b69-88d2-e61204aa85c3\",\n              \"pnl_contribution_usdt\": 168.481,\n              \"pnl_contribution_pct\": 323.5775,\n              \"trade_count\": 1,\n              \"best_trade\": 168.481,\n              \"worst_trade\": 168.481\n            },\n            ...\n          ],\n          \"timeseries\": [\n            {\n              \"date\": \"2025-12-26\",\n              \"contributions\": {\n                \"4b5e906a-5a8e-42fa-8c7f-57de447146bf\": -81.1925\n              }\n            },\n            {\n              \"date\": \"2025-12-27\",\n              \"contributions\": {\n                \"4b5e906a-5a8e-42fa-8c7f-57de447146bf\": -71.9342,\n                \"217bb1a9-5e2f-4b69-88d2-e61204aa85c3\": 168.481,\n                \"d548b6a6-192a-4924-8a85-ad4748406e08\": 22.6257\n              }\n            },\n            ...\n          ]\n        },\n        \"meta\": {\n          \"period\": \"weekly\",\n          \"from\": \"2025-01-01\",\n          \"to\": \"2026-01-01\",\n          \"calculated_at\": \"2026-02-24T11:46:00.4023220Z\",\n          \"cursor\": null\n        }\n      }\n    ]\n\n:param request: The HTTP request object containing metadata about the request.\n:type request: Request\n:param user_id: The unique identifier of the user whose portfolio analytics is being requested.\n:type user_id: str\n:param from_date: The starting date for the analytics period in ISO format.\n:type from_date: datetime.date\n:param to_date: The ending date for the analytics period in ISO format.\n:type to_date: datetime.date\n:param period: The time period granularity for analytics, such as daily, weekly, monthly, or yearly.\n:type period: PeriodEnum\n:param db: The database session dependency used to interact with the database.\n:type db: Session\n:param current_user: The currently authenticated user making the request.\n:type current_user: ContextModel\n:return: Analytical portfolio attribution data for the specified user, date range,\n    and period.\n:rtype: Any","operationId":"Analytics_Portfolio_Attribution_copy_trade_analytics_portfolio__user_id__attribution_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (ISO)","title":"From"},"description":"Start date (ISO)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (ISO)","title":"To"},"description":"End date (ISO)"},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/portfolio/{user_id}/benchmark":{"get":{"tags":["Copy Trade"],"summary":"Analytics Portfolio Benchmark","description":"Retrieve analytics portfolio benchmark for a user.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": {\n          \"portfolio_roi_pct\": 0,\n          \"benchmarks\": [\n            {\n              \"name\": \"BTC\",\n              \"start_value\": 86398.1,\n              \"end_value\": 88034,\n              \"roi_pct\": 1.8934\n            },\n            {\n              \"name\": \"ETH\",\n              \"start_value\": 2181.71,\n              \"end_value\": 2989.81,\n              \"roi_pct\": 37.0398\n            },\n            {\n              \"name\": \"USDT_YIELD\",\n              \"start_value\": 0,\n              \"end_value\": 0,\n              \"roi_pct\": 0\n            }\n          ]\n        },\n        \"meta\": {\n          \"period\": null,\n          \"from\": \"2025-01-01\",\n          \"to\": \"2026-01-01\",\n          \"calculated_at\": \"2026-02-24T11:45:33.4868590Z\",\n          \"cursor\": null\n        }\n      }\n    ]","operationId":"Analytics_Portfolio_Benchmark_copy_trade_analytics_portfolio__user_id__benchmark_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (ISO)","title":"From"},"description":"Start date (ISO)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (ISO)","title":"To"},"description":"End date (ISO)"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/portfolio/{user_id}/periods":{"get":{"tags":["Copy Trade"],"summary":"Analytics Portfolio Periods","description":"Retrieve analytics portfolio periods for a user.\n\n    [\n      true,\n      {\n        \"success\": true,\n        \"data\": [\n          {\n            \"start_date\": \"2025-12-26\",\n            \"end_date\": \"2025-12-31\",\n            \"opening_balance\": 4913.1892,\n            \"closing_balance\": 4948.8692,\n            \"pnl_usdt\": 35.68,\n            \"pnl_pct\": 0.7262,\n            \"max_drawdown_pct\": 4.1165,\n            \"best_day_pnl\": 382.9212,\n            \"worst_day_pnl\": -190.1936,\n            \"trade_count\": 0\n          },\n          {\n            \"start_date\": \"2026-01-01\",\n            \"end_date\": \"2026-01-31\",\n            \"opening_balance\": 4738.4133,\n            \"closing_balance\": 3207.5337,\n            \"pnl_usdt\": -1530.8796,\n            \"pnl_pct\": -32.3079,\n            \"max_drawdown_pct\": 35.6815,\n            \"best_day_pnl\": 176.3353,\n            \"worst_day_pnl\": -279.5578,\n            \"trade_count\": 0\n          },\n          {\n            \"start_date\": \"2026-02-01\",\n            \"end_date\": \"2026-02-24\",\n            \"opening_balance\": 3127.1972,\n            \"closing_balance\": 2362.1257,\n            \"pnl_usdt\": -765.0715,\n            \"pnl_pct\": -24.4651,\n            \"max_drawdown_pct\": 25.8843,\n            \"best_day_pnl\": 126.2118,\n            \"worst_day_pnl\": -150.1534,\n            \"trade_count\": 0\n          }\n        ],\n        \"meta\": {\n          \"period\": \"monthly\",\n          \"from\": null,\n          \"to\": null,\n          \"calculated_at\": \"2026-02-24T11:43:59.5605840Z\",\n          \"cursor\": null\n        }\n      }\n    ]","operationId":"Analytics_Portfolio_Periods_copy_trade_analytics_portfolio__user_id__periods_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/subscriber/portfolio/summary":{"get":{"tags":["Copy Trade"],"summary":"Subscriber Portfolio Summary (local SQL)","description":"Kullanicinin kapatilmis copy trade'lerinden yerel SQL ile hesaplanan\nportfolio ozeti. Faz 07 — Trading Service'e bagimsiz.","operationId":"analytics_subscriber_portfolio_summary_copy_trade_analytics_subscriber_portfolio_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"24h | 7d | 30d | 90d | 1y | all","default":"30d","title":"Period"},"description":"24h | 7d | 30d | 90d | 1y | all"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/subscriber/portfolio/by-trader":{"get":{"tags":["Copy Trade"],"summary":"Subscriber Portfolio By Trader (local SQL)","description":"Kullanicinin copy trade'lerini trader bazinda gruplar.\nHangi trader'dan ne kadar PnL geldigi attribution analizi.","operationId":"analytics_subscriber_portfolio_by_trader_copy_trade_analytics_subscriber_portfolio_by_trader_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"24h | 7d | 30d | 90d | 1y | all","default":"30d","title":"Period"},"description":"24h | 7d | 30d | 90d | 1y | all"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/analytics/subscriber/portfolio/by-coin":{"get":{"tags":["Copy Trade"],"summary":"Subscriber Portfolio By Coin (local SQL)","description":"Kullanicinin copy trade'lerini coin bazinda gruplar.\nHangi coin'den ne kadar PnL geldigi dagilimi.","operationId":"analytics_subscriber_portfolio_by_coin_copy_trade_analytics_subscriber_portfolio_by_coin_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"24h | 7d | 30d | 90d | 1y | all","default":"30d","title":"Period"},"description":"24h | 7d | 30d | 90d | 1y | all"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/decision-steps":{"post":{"tags":["Copy Trade"],"summary":"Copy decision-funnel step ingest (Plan 20-02 — real persistence)","description":"Allowed: Funnel emitter (SolutionTradeOKX, Phase 21).\n\nPersists each step via `emit_decision_step` inside an individual\nSAVEPOINT (per D-12). Per-step failures (RetryExhausted,\nIntegrityError, CheckConstraint violation, UnknownDecisionStep) are\ncaptured in the `rejected` array; the endpoint returns HTTP 200 even\nwhen some steps fail — partial-success semantics per D-12.\n\nReturns\n-------\nJSON envelope:\n    {\n        \"accepted\": int,\n        \"skipped_duplicates\": int,\n        \"rejected\": [{\"index\": i, \"reason\": str}, ...],\n        \"events\": [{\"index\": i, \"event_id\": str, \"attempt\": int}, ...]\n    }","operationId":"ingest_decision_step_copy_trade_decision_steps_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionStepBatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":[]}]}},"/copy_trade/decision-steps/readiness":{"get":{"tags":["Copy Trade"],"summary":"Copy decision-funnel order_rejected vocab readiness (Phase 36 / EMIT-04)","description":"Read-only boot-time readiness canary for SolutionTradeOKX's\n`OrderRejectIngestReadinessProbe` (Plan 04).\n\nIntrospects the LIVE `copy_decision_step` CHECK-constraint definitions via\n`pg_get_constraintdef` and reports whether the Phase 36\n`order_rejected` / `execution_reject` vocabulary is present — WITHOUT\nwriting any row. No INSERT, no FK, no seed/sentinel data, no smoke rows.\n\nThis is strictly better than the prior insert-based smoke probe: it gives an\nUNAMBIGUOUS answer (the tolerant ingest coerces an unknown step to `other`,\nso a POST could never distinguish \"vocab live\" from \"vocab coerced\"), and it\nleaves zero footprint in production tables.\n\nThe probe MUST treat a non-2xx response, a transport failure, or\n`ready == false` as the (still ALERT-ONLY) \"36a0 not live\" alarm. The emit\npath is NEVER gated on this endpoint.\n\nAuth: `get_current_funnel_emitter` — same shared secret as the ingest POST.\n\nReturns\n-------\nJSON envelope:\n    {\n        \"ready\": bool,            # both vocab tokens present\n        \"order_rejected\": bool,   # 'order_rejected' in ck_..._step\n        \"execution_reject\": bool  # 'execution_reject' in ck_..._category\n    }","operationId":"decision_step_readiness_copy_trade_decision_steps_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}},"security":[{"Bearer":[]}]}},"/copy_trade/admin/trace/{trace_id}":{"get":{"tags":["Copy Trade","Admin","Tracing"],"summary":"Get all events for a trace ID","description":"Bir trace_id icin tum olaylari getir:\n- Setup bilgisi\n- CopyTrades kayitlari\n- CopyTradeOrder kayitlari","operationId":"get_trace_events_copy_trade_admin_trace__trace_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/copy_trade/setups/{setup_id}/copiers/{user_id}/decision-trail":{"get":{"tags":["Copy Trade","Funnel","Copy Trade"],"summary":"Copier decision trail for a setup","description":"D-03: raw shape — do NOT wrap in ResponseMessage.\n\nCanonical path: GET /copy_trade/setups/{setup_id}/copiers/{user_id}/decision-trail\n(copy_trade router mounted at /copy_trade in apps/endpoints.py — GAP-5).\n\nReturns the ordered step timeline for a single copier / setup pair.\nAuth (D-04): caller must be the copier (user_id), the setup's owning trader,\nor a superuser. Any other caller receives 403.","operationId":"decision_trail_copy_trade_setups__setup_id__copiers__user_id__decision_trail_get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/copy_trade/setups/{setup_id}/copy-summary":{"get":{"tags":["Copy Trade","Funnel","Copy Trade"],"summary":"Copy decision summary for a setup","description":"D-03: raw shape — do NOT wrap in ResponseMessage.\n\nReturns per-setup breakdown: total_copiers, filled, rejected,\nbreakdown_by_reason (step → fail count), breakdown_by_category (category → fail count).\nAuth (D-05): owning-trader OR superuser; copier cannot access summary.\nCache: copy_funnel:summary:{setup_id} TTL 60s (D-07).\n\nGAP-3: total_copiers counts ONLY terminal-state copiers — i.e. those in the filled\nset OR the rejected set.  In-flight copiers (have rows but no terminal outcome yet)\nare intentionally excluded so that filled + rejected == total_copiers always holds.\nFull \"invisible copiers\" reconciliation is deferred per CONTEXT.md.\nResponse shape is locked (D-03): {total_copiers, filled, rejected,\nbreakdown_by_reason, breakdown_by_category} — no new fields.","operationId":"copy_summary_copy_trade_setups__setup_id__copy_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/copy_trade/me/funnel-insights":{"get":{"tags":["Copy Trade"],"summary":"Copier actionable missed trades with CTA enrichment (Phase 29 / INSIGHT-01 + INSIGHT-02)","description":"Return the authenticated copier's recent actionable missed trades.\n\nSteps (in order):\n1. Resolve user_id from the auth token ONLY (IDOR guard).\n2. Preference gate: if in_app_enabled=False, return [] immediately — no DB\n   read and no cache write (RESEARCH Pitfall 5).\n3. Cache-aside GET: hit within 60s returns the cached JSON result.\n4. On miss: run the parameterized staleness query (D-04 setup JOIN + D-05\n   NOT EXISTS anti-join + D-06 7-day lookback).\n5. Enrich each row: reason_label, nested cta {label, target, params}, ts.\n6. Cache-aside SET: cache the result for 60s.","operationId":"get_funnel_insights_copy_trade_me_funnel_insights_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/me/performance/summary":{"get":{"tags":["Copy Trade"],"summary":"Copier gross realised performance — four rolling windows (FIN-04)","description":"The four rolling gross-realised windows, in the copier's timezone.\n\nGROSS, never net — because **no period-level net exists**, not because\nnetting is forbidden (A-M-05).\n\nThis docstring is published verbatim as the route's OpenAPI\n``description``, and it used to assert D-81-06's blanket rule that *\"no\nnet-realised formula may be written in this phase\"*, citing a\n``models.py`` span that no longer holds that text and now says the\nopposite. Phase 80.1 / D-80.1-13 narrowed the ban to a per-row\neligibility rule (``models.py:5542-5554``), and\n``/me/performance/trades`` — three routes down in this same module —\npublishes ``net_realised`` today. A published contract statement\ncontradicting shipped behaviour is the same defect class this phase just\nfixed one file over (``schemas.py``'s ``\"Realized PNL\"`` description on\nan unrealised field, D-80.1-16).\n\nWhat is still true, and why this route stays gross: a period net would\nrequire the per-attempt eligibility rule to hold across EVERY attempt in\nthe window, and D-81-94 already forbids emitting a period total while any\nincluded attempt is refused. So the honest period figure is gross, and\nthe net lives on the per-trade row where its eligibility is decided.","operationId":"get_performance_summary_copy_trade_me_performance_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"connection_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Scope to ONE of the caller's own connection sessions. A session the caller does not own resolves to zero rows through the same ownership join, never through a distinguishing error (D-81-14).","title":"Connection Session Id"},"description":"Scope to ONE of the caller's own connection sessions. A session the caller does not own resolves to zero rows through the same ownership join, never through a distinguishing error (D-81-14)."},{"name":"market","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(Okx|Bybit|Binance|Mexc|Bingx|Paper)$"},{"type":"null"}],"description":"The EXCHANGE (D-81-02), not the instrument.","title":"Market"},"description":"The EXCHANGE (D-81-02), not the instrument."},{"name":"is_demo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The connection session's archive state (TradingAccountConnectionSession.state == 'archived'). In the legacy area 'archived' means something else and that area says so in a field (D-81-46).","title":"Archived"},"description":"The connection session's archive state (TradingAccountConnectionSession.state == 'archived'). In the legacy area 'archived' means something else and that area says so in a field (D-81-46)."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/me/performance/series":{"get":{"tags":["Copy Trade"],"summary":"Copier gross realised series — daily / Monday-start weekly (FIN-04)","description":"Gap-filled calendar buckets over an explicit range.\n\nA bucket with no rows reports ``empty`` and ``\"0.00\"``; a bucket holding\nany refusal reports ``not_totalled`` and ``null``. Three value states,\nthree wire shapes, and the client never infers one from an amount.","operationId":"get_performance_series_copy_trade_me_performance_series_get","security":[{"Bearer":[]}],"parameters":[{"name":"granularity","in":"query","required":false,"schema":{"type":"string","pattern":"^(day|week)$","description":"'week' is a Monday-start CALENDAR week in the copier's timezone. It is NOT the summary's rolling last_7_days window (D-81-03).","default":"day","title":"Granularity"},"description":"'week' is a Monday-start CALENDAR week in the copier's timezone. It is NOT the summary's rolling last_7_days window (D-81-03)."},{"name":"range_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range Start"}},{"name":"range_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Range End"}},{"name":"connection_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Scope to ONE of the caller's own connection sessions. A session the caller does not own resolves to zero rows through the same ownership join, never through a distinguishing error (D-81-14).","title":"Connection Session Id"},"description":"Scope to ONE of the caller's own connection sessions. A session the caller does not own resolves to zero rows through the same ownership join, never through a distinguishing error (D-81-14)."},{"name":"market","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(Okx|Bybit|Binance|Mexc|Bingx|Paper)$"},{"type":"null"}],"description":"The EXCHANGE (D-81-02), not the instrument.","title":"Market"},"description":"The EXCHANGE (D-81-02), not the instrument."},{"name":"is_demo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The connection session's archive state (TradingAccountConnectionSession.state == 'archived'). In the legacy area 'archived' means something else and that area says so in a field (D-81-46).","title":"Archived"},"description":"The connection session's archive state (TradingAccountConnectionSession.state == 'archived'). In the legacy area 'archived' means something else and that area says so in a field (D-81-46)."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/me/performance/trades":{"get":{"tags":["Copy Trade"],"summary":"Copier per-trade realised list — one row per attempt (FIN-04)","description":"One row per ``CopyAttempt`` — one economic-trade lifecycle (D-10).\n\n``ResponseListGeneric[T]`` IS typed (``apps/schemas.py:76-81``) and\nvalidates its items itself, which is why this route does not need the\nexplicit ``model_validate`` dance the two envelope routes do. Every nested\nmodel still declares its own ``from_attributes`` and ``extra=\"forbid\"``.\n\nCarries a NET figure beside the gross one (D-80.1-13, Phase 80.1 plan\n80.1-07): ``net_realised`` is non-``null`` only when every fee-shaped row\n(``entry_type`` ``\"fee\"`` or ``\"funding\"``) on the attempt is\n``bill_scoped``-eligible, from the SAME selector-input snapshot the gross\nfigure and the summary/series windows are computed from — one selection,\ntwo figures, never two independent reads.","operationId":"get_performance_trades_copy_trade_me_performance_trades_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Days back from now. Defaults to 7 (D-09).","default":7,"title":"Period"},"description":"Days back from now. Defaults to 7 (D-09)."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"connection_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Scope to ONE of the caller's own connection sessions. A session the caller does not own resolves to zero rows through the same ownership join, never through a distinguishing error (D-81-14).","title":"Connection Session Id"},"description":"Scope to ONE of the caller's own connection sessions. A session the caller does not own resolves to zero rows through the same ownership join, never through a distinguishing error (D-81-14)."},{"name":"market","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(Okx|Bybit|Binance|Mexc|Bingx|Paper)$"},{"type":"null"}],"description":"The EXCHANGE (D-81-02), not the instrument.","title":"Market"},"description":"The EXCHANGE (D-81-02), not the instrument."},{"name":"is_demo","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The connection session's archive state (TradingAccountConnectionSession.state == 'archived'). In the legacy area 'archived' means something else and that area says so in a field (D-81-46).","title":"Archived"},"description":"The connection session's archive state (TradingAccountConnectionSession.state == 'archived'). In the legacy area 'archived' means something else and that area says so in a field (D-81-46)."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_CopierTradeRowOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/me/account/cash-flow":{"get":{"tags":["Copy Trade"],"summary":"Copier account-level cash-flow list — deposits and withdrawals, NO total (FIN-03)","description":"`account_cash_flow` rows for the current copier, newest first.\n\nOwner-scoped by construction: the query filters on the current user's\nown id, so there is no path parameter through which one copier could\neven NAME another's row — the anti-enumeration posture the setup\nsurfaces already establish (answering identically for a nonexistent and\na non-owned resource) is structural here rather than a check, because\nthe resource is never addressed by an arbitrary id at all.\n\nEmits NO total, NO net, NO per-currency subtotal — `ResponseListGeneric`\ncarries `total_count` as a ROW COUNT, never a money aggregate, matching\nthe shape `get_performance_trades` above already uses.","operationId":"get_account_cash_flow_copy_trade_me_account_cash_flow_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_AccountCashFlowRowOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/copy_trade/me/account/unrealised":{"get":{"tags":["Copy Trade"],"summary":"Copier account-level unrealised mark list — last-known exchange value with a staleness label, NO total (FIN-05)","description":"`account_unrealised_mark` rows for the current copier, newest fact\ntime first.\n\nOwner-scoped by construction — same anti-enumeration posture\n`get_account_cash_flow` above already establishes: the query filters on\nthe current user's own id, so there is no path parameter through which\none copier could even NAME another's row.\n\nAn archived connection's marks ARE returned here — retaining and\nlabelling the last-known value is the point of `FIN-05` — and each\nreads `stale_connection` through `_build_unrealised_entry`'s derivation.\n\nEmits NO total, NO net, NO realised figure of any kind:\n`ResponseListGeneric` carries `total_count` as a ROW COUNT, matching\nthe shape `get_account_cash_flow` and `get_performance_trades` above\nalready use.","operationId":"get_account_unrealised_copy_trade_me_account_unrealised_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_UnrealisedMarkEntryOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytic/futures-leaderboard":{"get":{"tags":["Analytics"],"summary":"Leaderboard - Futures","operationId":"Leaderboard___Futures_analytic_futures_leaderboard_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"analyst_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Analyst name","title":"Analyst Name"},"description":"Analyst name"},{"name":"target_date","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TargetPeriodEnum","description":"Target date","default":"this_month"},"description":"Target date"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LeaderBoardOrderEnum","description":"analysts / pnl / net_pnl / success / stopped / winrate / r / net_r","default":"net_pnl"},"description":"analysts / pnl / net_pnl / success / stopped / winrate / r / net_r"},{"name":"order_direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrderSideEnum","description":"asc/desc","default":"desc"},"description":"asc/desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalystStatusResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytic/futures-leaderboard-aggregated":{"get":{"tags":["Analytics"],"summary":"Leaderboard - Futures Aggregated (P24H-P7D-P30D)","operationId":"Leaderboard___Futures_Aggregated__P24H_P7D_P30D__analytic_futures_leaderboard_aggregated_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"analyst_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Analyst name","title":"Analyst Name"},"description":"Analyst name"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LeaderBoardOrderEnum","description":"analysts / pnl / net_pnl / success / stopped / winrate / r / net_r","default":"net_pnl"},"description":"analysts / pnl / net_pnl / success / stopped / winrate / r / net_r"},{"name":"order_direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrderSideEnum","description":"asc/desc","default":"desc"},"description":"asc/desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FuturesLeaderboardAggregatedResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytic/futures-latest-setup":{"get":{"tags":["Analytics"],"summary":"Latest Setup - Futures","operationId":"Latest_Setup___Futures_analytic_futures_latest_setup_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"analyst_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Analyst name","title":"Analyst Name"},"description":"Analyst name"},{"name":"target_date","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TargetPeriodEnum","description":"Target date","default":"this_month"},"description":"Target date"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LatestSetupOrderEnum","description":"analysts / coin_name / position / target_date / status / pnl / r / net_pnl / net_r","default":"target_date"},"description":"analysts / coin_name / position / target_date / status / pnl / r / net_pnl / net_r"},{"name":"order_direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrderSideEnum","description":"asc/desc","default":"desc"},"description":"asc/desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestSetupResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytic/spot-leaderboard":{"get":{"tags":["Analytics"],"summary":"Leaderboard - Spot","operationId":"Leaderboard___Spot_analytic_spot_leaderboard_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"analyst_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Analyst name","title":"Analyst Name"},"description":"Analyst name"},{"name":"target_date","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TargetPeriodEnum","description":"Target date","default":"this_month"},"description":"Target date"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LeaderBoardOrderEnum","description":"analysts / pnl / net_pnl / success / stopped / winrate / r / net_r","default":"net_pnl"},"description":"analysts / pnl / net_pnl / success / stopped / winrate / r / net_r"},{"name":"order_direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrderSideEnum","description":"asc/desc","default":"desc"},"description":"asc/desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalystStatusResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytic/spot-latest-setup":{"get":{"tags":["Analytics"],"summary":"Latest Setup - Spot","operationId":"Latest_Setup___Spot_analytic_spot_latest_setup_get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"analyst_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Analyst name","title":"Analyst Name"},"description":"Analyst name"},{"name":"target_date","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TargetPeriodEnum","description":"Target date","default":"this_month"},"description":"Target date"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LatestSetupOrderEnum","description":"analysts / coin_name / position / target_date / status / pnl / r / net_pnl / net_r","default":"target_date"},"description":"analysts / coin_name / position / target_date / status / pnl / r / net_pnl / net_r"},{"name":"order_direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrderSideEnum","description":"asc/desc","default":"desc"},"description":"asc/desc"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestSetupResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/coin":{"get":{"tags":["Coin"],"summary":"List Records","operationId":"list_records_coin_get","parameters":[{"name":"market_type","in":"query","required":false,"schema":{"type":"string","pattern":"spot|futures","description":"spot / futures","title":"Market Type"},"description":"spot / futures"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["Coin"],"summary":"Create Record","operationId":"create_record_coin_put","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoinCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coin"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/coin/{id}":{"patch":{"tags":["Coin"],"summary":"Update Record","operationId":"update_record_coin__id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoinUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coin"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Coin"],"summary":"Get Record","operationId":"get_record_coin__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coin"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Coin"],"summary":"Delete Record","operationId":"delete_record_coin__id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/watch_list":{"get":{"tags":["Watch List"],"summary":"Watch List","description":"Allowed: Customer, Trader, Admin","operationId":"watch_list_watch_list_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail|trader_name","description":"newest / oldest / popular / success / fail / trader_name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail / trader_name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["Watch List"],"summary":"Create Record","operationId":"create_record_watch_list_put","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Watch List"],"summary":"Delete Record","operationId":"delete_record_watch_list_delete","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid4","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/referral_code/code/{code}":{"get":{"tags":["Referral Code"],"summary":"Get Referral Code By Code","description":"Allowed: Public\n\nUser gets detail of a referral code.","operationId":"get_referral_code_by_code_referral_code_code__code__get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralCodeInfo"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/stripe/checkout":{"post":{"tags":["Credits"],"summary":"Create Checkout Session","operationId":"create_checkout_session_credits_stripe_checkout_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/packages":{"get":{"tags":["Credits"],"summary":"List Credit Packages","description":"List the purchasable credit packages.\n\nEach package carries its credit amount, any bonus credits, the resulting\ntotal, and the Apple / Google store product ids the client must hand to\nStoreKit or Play Billing.\n\n**`price_usd` is a reference figure for display and comparison only — it is\nNOT the amount that will be charged.** The amount actually charged is the\ncountry-localized price configured for that product id in App Store Connect\nand Google Play Console, and the store is the authority on it (D-85-04).\nA client MUST render the localized price that StoreKit / Play Billing\nreturns for the product id, not this field.\n\nCredits obtained this way are purchased credits: they are spendable on the\nplatform and are not redeemable for cash — purchased credits are outside\nthe withdrawable-origin allowlist.\n\nOnly active packages are listed. A retired package (`is_active=False`) is\nwithheld from the catalog but keeps existing, so a late or replayed receipt\nnaming it still resolves (D-85-06, D-85-07).","operationId":"list_credit_packages_credits_packages_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_CreditPackageItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/stripe/checkout-success":{"get":{"tags":["Credits"],"summary":"Success Checkout Session","operationId":"success_checkout_session_credits_stripe_checkout_success_get","parameters":[{"name":"session_id","in":"query","required":false,"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"}}}}}}},"/credits/purchases/validate":{"post":{"tags":["Credits"],"summary":"Validate Credit Purchase","description":"Redeem a mobile in-app purchase receipt for credits.\n\n**Wire-shape asymmetry (do not \"normalize\" it).** Apple's receipt is the\nraw JWS **string** (`serverVerificationData`); Google's is the\n`originalJson` **object**. `mobile/lib/module/api/purchase_api_client.dart`\nrecords that wrapping the Google object in quotes broke this once, so the\nendpoint accepts each store's native encoding rather than asking the client\nto change.\n\n**Error codes** — every failure returns the standard error envelope with a\nsnake_case `message` and the same string at `data.error_code`:\n\n| Code | HTTP | When |\n|---|---|---|\n| `credit_purchase_store_verification_failed` | 400 | the store refused the receipt, the JWS did not decode, the bundle id did not match, or the purchase is not a consumable |\n| `credit_purchase_unknown_product` | 404 | the receipt verified but its product id resolves to no credit package |\n| `credit_purchase_already_claimed` | 409 | this store transaction already belongs to a different account |\n| `credit_purchase_sandbox_not_allowed` | 400 | a sandbox receipt arrived where sandbox receipts are refused |\n\nReplaying the **same** receipt on the **same** account is not an error: it\nreturns 200 with `duplicate: true` and moves no balance.\n\n`price_usd` on the response's underlying package is the catalog's *display\nreference* figure. The store charged a localized amount that this service\nnever sees.","operationId":"validate_credit_purchase_credits_purchases_validate_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPurchaseValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPurchaseValidateResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Receipt already consumed by another account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/balance/me":{"get":{"tags":["Credits"],"summary":"Get My Balance","description":"Read your own credit balance.\n\nSelf-scoped by construction: the user is resolved from the access token,\nnot from the path, so there is no id to pass and no authorization branch\nto get wrong — the filter IS the authorization (D-87-05).\n\n`expiring_soon_credits` is the total still-unexpired credit expiring in the\nnext 30 days, and `expiring_soon_date` is the earliest such expiry as a\n**tz-aware UTC instant** (e.g. `2026-08-13T10:00:00+00:00`). Parse it as an\nabsolute instant, not as local time.\n\n`GET /credits/balance/{user_id}` is deprecated for end users; it remains\nthe administrator's read of *another* user by uuid until Phase 89 relocates\nthat capability under `/admin/credits/*`.","operationId":"get_my_balance_credits_balance_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeBalanceResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/users/{user_id}/balance":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin User Balance","description":"Read any user's credit balance by uuid. **Administrators only.**\n\nThe resource-scoped, superuser-gated replacement for\n`GET /credits/balance/{user_id}` (D-89-04). The response is byte-identical\nto that route's, including `expiring_soon_date` as the offset-less ISO\nstring Phase 87 deliberately preserved — this phase relocates paths and\nchanges no behaviour (D-89-05).\n\nThere is no authorization branch in the body: the dependency IS the\npredicate.","operationId":"admin_user_balance_admin_credits_users__user_id__balance_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceWithExpiryResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/history/me":{"get":{"tags":["Credits"],"summary":"Get My History","description":"Read your own credit transaction history.\n\nSelf-scoped by construction: the user is resolved from the access token,\nnot from the path, so there is no id to pass and no authorization branch\nto get wrong — the filter IS the authorization.\n\nNewest first. Page with `skip` / `limit` (`limit` is bounded 1..200) and\nnarrow with `type` (`buy`, `spend`, `earn`, `subscribe`, `refund`,\n`adjust`). `total_count` is the size of the filtered result, not of the\npage.\n\nThe response is the platform's standard paginated envelope\n(`total_count` / `start` / `limit` / `data`), NOT the `{user_id, items,\ntotal}` shape the deprecated by-id path still returns (D-87-01).\n\n`GET /credits/history/{user_id}` is deprecated for end users; it remains\nthe administrator's read of *another* user by uuid until Phase 89\nrelocates that capability under `/admin/credits/*`.","operationId":"get_my_history_credits_history_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","title":"Type"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_TxItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/users/{user_id}/history":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin User History","description":"Read any user's credit history by uuid. **Administrators only.**\n\nThe resource-scoped, superuser-gated replacement for\n`GET /credits/history/{user_id}` (D-89-04). Same `{user_id, items, total}`\nenvelope, same `type`/`skip`/`limit` parameters, same ordering — this phase\nrelocates paths and changes no behaviour (D-89-05).","operationId":"admin_user_history_admin_credits_users__user_id__history_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","title":"Type"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/transactions/{transaction_id}":{"get":{"tags":["Credits"],"summary":"Get Transaction Detail","description":"Read one credit transaction as structured data (CME-03).\n\nThe structured sibling of `GET /credits/receipts/{transaction_id}` and\n`.../pdf`, which remain the **export and sharing** path and are what\ngenerate a receipt. This route only reports a receipt number that already\nexists, so `receipt_number` is null until one has been generated through\nthose routes (D-87-11).\n\n`store_purchase` is populated when the transaction was granted by an Apple\nor Google in-app purchase, and null for every other source.","operationId":"get_transaction_detail_credits_transactions__transaction_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Transaction Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/crypto-wallets/connect":{"post":{"tags":["Credits"],"summary":"Connect Wallet","operationId":"connect_wallet_credits_crypto_wallets_connect_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoWalletConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoWalletResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/crypto-wallets":{"get":{"tags":["Credits"],"summary":"List Wallets","operationId":"list_wallets_credits_crypto_wallets_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoWalletListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/crypto-wallets/{wallet_id}":{"delete":{"tags":["Credits"],"summary":"Delete Wallet","operationId":"delete_wallet_credits_crypto_wallets__wallet_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Wallet Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/stats":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Stats","operationId":"admin_stats_admin_credits_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/chart-data":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Chart Data","operationId":"admin_chart_data_admin_credits_chart_data_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminChartDataPoint"},"title":"Response Admin Chart Data Admin Credits Chart Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/top-users":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Top Users","operationId":"admin_top_users_admin_credits_top_users_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTopUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/anomalies":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Anomalies","operationId":"admin_anomalies_admin_credits_anomalies_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminAnomalyItem"},"title":"Response Admin Anomalies Admin Credits Anomalies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/loan-risk":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Loan Risk","operationId":"admin_loan_risk_admin_credits_loan_risk_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminLoanRiskItem"},"title":"Response Admin Loan Risk Admin Credits Loan Risk Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/lots/me":{"get":{"tags":["Credits"],"summary":"Get My Lots","operationId":"get_my_lots_credits_lots_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditLotListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/users/{user_id}/lots":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin User Lots","description":"Read any user's credit lots by uuid. **Administrators only.** (ACR-03)\n\nByte-mirror of `GET /credits/lots/me`, with `active_only` inverted: it\ndefaults to `False` here (`True` there) because the admin view exists to\nshow exactly the expired/consumed lots the self-serve default hides.\n`expires_at IS NULL` means \"never expires\" on both routes.\n\nThere is no authorization branch in the body: the dependency IS the\npredicate.","operationId":"admin_user_lots_admin_credits_users__user_id__lots_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Active Only"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditLotListResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/balances":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin List Balances","description":"Platform-wide credit balance list. **Administrators only.**\n(ACR-01, ACR-02)\n\n`total` is the count of matching `CreditBalance` rows — NOT the `User`\ncount — because this listing is `CreditBalance`-driven: a user who never\ntouched credits has no row here and none is manufactured to render a\nzero (T-90-09, Prohibition P-01).\n\n`last_activity_at` is `max(last_earn_at, last_spend_at)` computed in SQL\n(§6 A1) — never `updated_at`/`created_at` — so `sort=last_activity`\norders the whole platform, not just the fetched page. `null` when\nneither is set; that row sorts LAST regardless of `order` (`nullslast`\nis unconditional — see the ordering block below for why).\n\n`expiring_soon_credits` is a SQL-level `SUM(remaining_amount)` over the\nsame five predicates `get_expiring_soon_credits` (service.py) uses for\nthe self-serve wallet read, correlated per row and wrapped in\n`func.coalesce(..., 0.0)` so a balance with zero lots reads `0.0`, never\n`null`. It is a CORRELATED SCALAR SUBQUERY in the SELECT list — not a\nPython per-row loop — precisely so `sort=expiring_soon` ranks every user\non the platform rather than re-ranking one fetched page (T-90-08 bounds\nthe cost via `limit<=200` against the `ix_credit_lot_user_*` composites).\n\n`search` matches a well-formed UUID as an exact `user_id`, otherwise a\ncase-insensitive email substring — see `_admin_identity_search`. An\nunmatched search returns `{items: [], total: 0}` with 200, never a 500.","operationId":"admin_list_balances_admin_credits_balances_get","security":[{"Bearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(balance|expiring_soon|last_activity)$","default":"balance","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBalanceListResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/transactions":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin List Transactions","description":"Platform-wide credit transaction ledger. **Administrators only.**\n(ACR-04, ACR-05)\n\n`{items, total}` with NO envelope-level `user_id` (§3.3) — distinguishing\nthis global ledger from `admin_user_history`'s per-user dossier, which is\ndeliberately unchanged by this route.\n\nEach item carries `TxItem`'s seven wire fields plus `user_id`, `email`,\n`source` and `source_id` — `source` being the `nullable=False` column\n`TxItem` deliberately omits.\n\n`type` and `source` are free-string single-value equality filters with\nNO membership validation (§6 OQ-1): `CreditTransaction.type` is a free\n`String(32)` column whose written literals include values passed\npositionally in `service.py` and therefore invisible to a keyword grep —\nwhich is exactly why this endpoint validates nothing. An unknown `type`\nor `source` yields an empty result set, never a 422.\n\n`date_from`/`date_to` are date-only wire values (typed `date`, never\n`datetime` — a `datetime`-typed param would silently coerce a bare date\nstring to midnight, making `date_to` quietly exclude its own day without\never 422ing). Widened backend-side to `[start-of-day(date_from),\nstart-of-day(date_to) + 1 day)` — a half-open upper bound, so\n`date_to`'s own calendar day is fully included through\n`23:59:59.999999` with no microsecond literal needed.\n\nOrdered `created_at desc` (mirroring `_read_user_history`) with a\n`CreditTransaction.id` tiebreak, so rows sharing a timestamp paginate\nstably instead of repeating or vanishing between pages.","operationId":"admin_list_transactions_admin_credits_transactions_get","security":[{"Bearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTxListResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/expiry-stats":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Expiry Stats","operationId":"admin_expiry_stats_admin_credits_expiry_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminExpiryStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/ttl-config":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Get Ttl Config","operationId":"admin_get_ttl_config_admin_credits_ttl_config_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TTLConfigItem"},"title":"Response Admin Get Ttl Config Admin Credits Ttl Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/ttl-config/{source_type}":{"put":{"tags":["Credits","Admin Credits"],"summary":"Admin Update Ttl Config","operationId":"admin_update_ttl_config_admin_credits_ttl_config__source_type__put","security":[{"Bearer":[]}],"parameters":[{"name":"source_type","in":"path","required":true,"schema":{"type":"string","title":"Source Type"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTLConfigUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTLConfigItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/withdraw":{"post":{"tags":["Credits"],"summary":"Create Withdrawal","operationId":"create_withdrawal_credits_withdraw_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/withdraw/{withdrawal_id}":{"delete":{"tags":["Credits"],"summary":"Cancel User Withdrawal","operationId":"cancel_user_withdrawal_credits_withdraw__withdrawal_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/withdrawals/me":{"get":{"tags":["Credits"],"summary":"Get My Withdrawals","operationId":"get_my_withdrawals_credits_withdrawals_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/withdrawals/me/{withdrawal_id}":{"get":{"tags":["Credits"],"summary":"Get My Withdrawal","description":"Read the status of a withdrawal **you requested**.\n\nSelf-scoped: the subject is the access token's user, so an id belonging to\nsomeone else is indistinguishable from one that does not exist — both\nanswer 404. That is deliberate; a 403 would confirm the row exists.\n\nThe body is produced by the same projection as `GET /credits/withdrawals/me`\n(D-87-13), so the single read and the list can never disagree.\n\nAdministrators read another user's withdrawals via\n`GET /credits/admin/withdrawals`; this path has no admin branch (D-87-05).","operationId":"get_my_withdrawal_credits_withdrawals_me__withdrawal_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/withdraw/limits":{"get":{"tags":["Credits"],"summary":"Get Withdrawal Limits","operationId":"get_withdrawal_limits_credits_withdraw_limits_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalLimitsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/wallet/me":{"get":{"tags":["Credits"],"summary":"Get My Wallet","description":"Everything a wallet screen renders, in one request (CME-02, D-87-07).\n\nThe four money fields are not synonyms:\n\n- `balance` — everything the account holds.\n- `reserved` — held against in-flight operations; part of `balance`.\n- `available` — `balance - reserved`; what can be **spent**.\n- `withdrawable` — what can be **cashed out**. Phase 84's\n  withdrawable-origin allowlist excludes purchased credits, so this is\n  **smaller than `available`** whenever the user holds any (D-87-08).\n\n`pending_withdrawals` is capped; `pending_withdrawals_count` is the full\nfiltered count. `GET /credits/withdrawals/me` pages the rest and\n`GET /credits/withdrawals/me/{withdrawal_id}` reads one in full.\n\n**Cost — seven queries, constant in the number of rows the user has:**\n\n| Step                | Call                                    | Queries |\n|---------------------|-----------------------------------------|---------|\n| balance / reserved  | one read-only `CreditBalance` lookup    | 1       |\n| available           | computed from the row already fetched   | 0       |\n| withdrawable        | `calculate_withdrawable_credits`        | 3       |\n| expiring soon       | `get_expiring_soon_credits`             | 1       |\n| pending count       | `count()` over the filtered withdrawals | 1       |\n| pending list        | the same filter, ordered and capped     | 1       |\n\nThat table is written down so a regression is visible in review, and it is\nenforced by a statement-counting test that compares the SELECT count for a\nlarge dataset against a small one. An aggregate that is correct but N+1\nfails silently and only under load, which is what the pin exists to catch.","operationId":"get_my_wallet_credits_wallet_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletSummaryResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/bank-accounts":{"post":{"tags":["Credits"],"summary":"Create Bank Account","operationId":"create_bank_account_credits_bank_accounts_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Credits"],"summary":"List Bank Accounts","operationId":"list_bank_accounts_credits_bank_accounts_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/bank-accounts/{account_id}":{"delete":{"tags":["Credits"],"summary":"Remove Bank Account","operationId":"remove_bank_account_credits_bank_accounts__account_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/withdrawals":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin List Withdrawals","operationId":"admin_list_withdrawals_admin_credits_withdrawals_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"method","in":"query","required":false,"schema":{"type":"string","title":"Method"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/withdrawals/{withdrawal_id}/approve":{"post":{"tags":["Credits","Admin Credits"],"summary":"Admin Approve Withdrawal","operationId":"admin_approve_withdrawal_admin_credits_withdrawals__withdrawal_id__approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/withdrawals/{withdrawal_id}/reject":{"post":{"tags":["Credits","Admin Credits"],"summary":"Admin Reject Withdrawal","operationId":"admin_reject_withdrawal_admin_credits_withdrawals__withdrawal_id__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWithdrawalRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/withdrawals/{withdrawal_id}/complete":{"post":{"tags":["Credits","Admin Credits"],"summary":"Admin Complete Withdrawal","operationId":"admin_complete_withdrawal_admin_credits_withdrawals__withdrawal_id__complete_post","security":[{"Bearer":[]}],"parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWithdrawalCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/withdrawal-stats":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Withdrawal Stats Endpoint","operationId":"admin_withdrawal_stats_endpoint_admin_credits_withdrawal_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWithdrawalStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/referral-tier/me":{"get":{"tags":["Credits"],"summary":"Get My Referral Tier","description":"Get the current user's referral tier, progress, and history.","operationId":"get_my_referral_tier_credits_referral_tier_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderTierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/referral-tiers":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin List Referral Tiers","description":"List all referral tiers (active and inactive).","operationId":"admin_list_referral_tiers_admin_credits_referral_tiers_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReferralTierResponse"},"title":"Response Admin List Referral Tiers Admin Credits Referral Tiers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Credits","Admin Credits"],"summary":"Admin Create Referral Tier","description":"Create a new referral tier.","operationId":"admin_create_referral_tier_admin_credits_referral_tiers_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralTierCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralTierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/referral-tiers/{tier_id}":{"put":{"tags":["Credits","Admin Credits"],"summary":"Admin Update Referral Tier","description":"Update a referral tier.","operationId":"admin_update_referral_tier_admin_credits_referral_tiers__tier_id__put","security":[{"Bearer":[]}],"parameters":[{"name":"tier_id","in":"path","required":true,"schema":{"type":"string","title":"Tier Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralTierUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralTierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Credits","Admin Credits"],"summary":"Admin Deactivate Referral Tier","description":"Deactivate (soft-delete) a referral tier.","operationId":"admin_deactivate_referral_tier_admin_credits_referral_tiers__tier_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"tier_id","in":"path","required":true,"schema":{"type":"string","title":"Tier Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/referral-tier-distribution":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin Tier Distribution","description":"Get the distribution of traders across tiers for the current month.","operationId":"admin_tier_distribution_admin_credits_referral_tier_distribution_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TierDistributionItem"},"title":"Response Admin Tier Distribution Admin Credits Referral Tier Distribution Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/packages":{"get":{"tags":["Credits","Admin Credits"],"summary":"Admin List Credit Packages","description":"List the full credit-package catalog — active and retired alike.\n\nThe operator view is deliberately wider than the client view at\n`GET /credits/packages`: it includes retired packages and their `retired_at`\nstamp, because an operator auditing what the platform sells needs to see\nwhat it *used* to sell (D-85-06).","operationId":"admin_list_credit_packages_admin_credits_packages_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditPackageAdminResponse"},"title":"Response Admin List Credit Packages Admin Credits Packages Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"post":{"tags":["Credits","Admin Credits"],"summary":"Admin Create Credit Package","description":"Add a package to the catalog (PKG-03).\n\n`credits` and `price_usd` are bounded `gt=0` by the request schema, so a\nzero-credit or zero-price package is unreachable.\n\nAt least one store product id is required (D-85-01) — a package reachable\nfrom neither store is not sellable. That is also a database check\nconstraint; it is surfaced here so an operator gets a message rather than a\ndatabase error.\n\nDuplicate store product ids are decided by the partial unique indexes from\n85-01, not by a read-then-write existence check in front of them, which\nwould still race.\n\nA package is created live. `is_active=false` is refused here: retirement is\nthe only route into the inactive state, so every inactive package carries a\n`retired_at` stamp (D-85-06), and a package created inactive could never be\nactivated anyway — reactivation is refused.","operationId":"admin_create_credit_package_admin_credits_packages_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPackageCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPackageAdminResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/credits/packages/{package_id}":{"put":{"tags":["Credits","Admin Credits"],"summary":"Admin Update Credit Package","description":"Reprice, rename, reorder or retire a package (PKG-03).\n\n**`credits`, `bonus_credits`, `apple_product_id` and `google_product_id` are\nfixed at create and cannot be changed here.** Phase 86 resolves an in-app\npurchase receipt against the live catalog row, so editing any of them would\nrewrite the terms of a purchase already in flight — granting an amount the\nbuyer never bought, or re-pointing a published SKU at different terms. An\nupdate naming one of these fields, with any value including `null`, is\nrefused with a 400. An operator who needs different terms creates a new\npackage with its own store product id.\n\nThat refusal also carries D-85-01's at-least-one-store-id invariant through\nthe update path by construction: a store id cannot be cleared because it\ncannot be named at all.\n\n`price_usd` **is** editable, precisely because it is a display-only\nreference (D-85-04) — the store charges the country-localized price\nconfigured for the product id, so repricing here grants nobody anything\ndifferent.\n\nRetirement is final. Setting `is_active` false retires the package through\nthe same door as `DELETE`, stamping `retired_at`; setting it true on a\npackage that is already inactive is refused, and the refused attempt is\nitself recorded in the audit log.","operationId":"admin_update_credit_package_admin_credits_packages__package_id__put","security":[{"Bearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","title":"Package Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPackageUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPackageAdminResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Credits","Admin Credits"],"summary":"Admin Retire Credit Package","description":"Retire a package — withdraw it from the catalog without deleting it.\n\nSets `is_active=False` and stamps `retired_at`. It does NOT set\n`is_deleted` and does NOT delete the row (D-85-06): retirement is a catalog\nstate, not a deletion, and the row must survive so a late or replayed\nreceipt naming it still resolves to the amount that was actually sold\n(D-85-07).\n\nRetiring an already-retired package is a no-op that succeeds without moving\nthe original `retired_at`.","operationId":"admin_retire_credit_package_admin_credits_packages__package_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","title":"Package Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/credits/receipts/{transaction_id}":{"get":{"tags":["Credits"],"summary":"Get Receipt Html","description":"Get receipt as HTML for a specific transaction.","operationId":"get_receipt_html_credits_receipts__transaction_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Transaction Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/receipts/{transaction_id}/pdf":{"get":{"tags":["Credits"],"summary":"Get Receipt Pdf","description":"Get receipt as PDF for a specific transaction.","operationId":"get_receipt_pdf_credits_receipts__transaction_id__pdf_get","security":[{"Bearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Transaction Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/statements/{year}/{month}":{"get":{"tags":["Credits"],"summary":"Get Monthly Statement Html","description":"Get monthly statement as HTML.","operationId":"get_monthly_statement_html_credits_statements__year___month__get","security":[{"Bearer":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/statements/{year}/{month}/pdf":{"get":{"tags":["Credits"],"summary":"Get Monthly Statement Pdf","description":"Get monthly statement as PDF.","operationId":"get_monthly_statement_pdf_credits_statements__year___month__pdf_get","security":[{"Bearer":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/traders/history/me":{"get":{"tags":["Market"],"summary":"List Shop Trader History For Owner","operationId":"list_shop_trader_history_for_owner_market_shops_traders_history_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"}},{"name":"trader_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"added|removed"},{"type":"null"}],"title":"Action"}},{"name":"performed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Performed By User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest","default":"newest","title":"Order By"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopTraderHistoryOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/categories":{"get":{"tags":["Market"],"summary":"List Shop Categories","description":"Requires an authenticated user (any role) to read the curated category vocabulary. Each entry carries the stored token as `code` and a display `label` resolved from the message catalog in the caller's accept-language. The token vocabulary is fixed at runtime and mirrored by the ck_shop_category database constraint; the labels are catalog text and adding or changing one is not a schema change. TTL-cached 300s per resolved language.","operationId":"list_shop_categories_market_shops_categories_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops":{"get":{"tags":["Market"],"summary":"List Shops","description":"List shops (Phase 73 D-01: publicly browsable, no auth required).\n\nAnonymous callers and authenticated non-admin callers receive the same\nactive-shop rows through `ShopPublic`; an admin caller also sees inactive\nshops through `ShopOut`. Client contract (D-02): a present-but-invalid or\nexpired Authorization header still yields 401 on this route — a client\nmust treat that 401 as \"discard the stored token and retry with no\nAuthorization header\", not as \"the listing is unavailable\".","operationId":"list_shops_market_shops_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|rating|price_asc|price_desc|success|fail|name","description":"newest / oldest / popular / rating / price_asc / price_desc / success / fail / name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / rating / price_asc / price_desc / success / fail / name"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or slug","title":"Name"},"description":"Search by name or slug"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"is_group","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by group type","title":"Is Group"},"description":"Filter by group type"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"enum":["Spot Signals","Futures Signals","Education","Bot Trading","Copy Trading","Other"],"type":"string"},{"type":"null"}],"description":"Filter by category. Must be one of the curated SHOP_CATEGORIES values.","title":"Category"},"description":"Filter by category. Must be one of the curated SHOP_CATEGORIES values."},{"name":"price_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"description":"Minimum monthly price (credits, inclusive)","title":"Price Min"},"description":"Minimum monthly price (credits, inclusive)"},{"name":"price_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"description":"Maximum monthly price (credits, inclusive)","title":"Price Max"},"description":"Maximum monthly price (credits, inclusive)"},{"name":"rating_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":5.0,"minimum":1.0},{"type":"null"}],"description":"Minimum avg_rating (1.0–5.0 inclusive). Excludes shops with NULL avg_rating (D-10).","title":"Rating Min"},"description":"Minimum avg_rating (1.0–5.0 inclusive). Excludes shops with NULL avg_rating (D-10)."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_Union_ShopOut__ShopPublic__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/traders":{"get":{"tags":["Market"],"summary":"List Shop Traders","operationId":"list_shop_traders_market_shops__shop_id__traders_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopWithTraders"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Market"],"summary":"Add Trader To Shop","operationId":"add_trader_to_shop_market_shops__shop_id__traders_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTraderRequest","description":"Trader details to add to shop"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/traders/history":{"get":{"tags":["Market"],"summary":"List Shop Trader History For Single Shop Owner","operationId":"list_shop_trader_history_for_single_shop_owner_market_shops__shop_id__traders_history_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"trader_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"added|removed"},{"type":"null"}],"title":"Action"}},{"name":"performed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Performed By User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest","default":"newest","title":"Order By"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopTraderHistoryOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/traders/{trader_id}":{"put":{"tags":["Market"],"summary":"Put Trader In Shops","operationId":"put_trader_in_shops_market_shops__shop_id__traders__trader_id__put","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Trader ID","title":"Trader Id"},"description":"Trader ID"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Market"],"summary":"Remove Trader From Shops","operationId":"remove_trader_from_shops_market_shops__shop_id__traders__trader_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Trader ID","title":"Trader Id"},"description":"Trader ID"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/leave":{"post":{"tags":["Market"],"summary":"Leave Shop","description":"Current trader leaves the shop they are a member of.\n\nFails with 409 `shop_member_has_open_setups` if the trader still has open\n(incoming/active) setups in the shop — those must be closed first. Setups\nare not migrated to a new shop; they stay with the shop they were created\nunder.","operationId":"leave_shop_market_shops__shop_id__leave_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/followed":{"get":{"tags":["Market"],"summary":"List Followed Shops","operationId":"list_followed_shops_market_shops_followed_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest|popular|success|fail|name","description":"newest / oldest / popular / success / fail / name","default":"newest","title":"Order By"},"description":"newest / oldest / popular / success / fail / name"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopPublic_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/follow":{"post":{"tags":["Market"],"summary":"Follow Shop","operationId":"follow_shop_market_shops__shop_id__follow_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Market"],"summary":"Unfollow Shop","operationId":"unfollow_shop_market_shops__shop_id__follow_delete","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/subscribe":{"post":{"tags":["Market"],"summary":"Subscribe Shop","operationId":"subscribe_shop_market_shops__shop_id__subscribe_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopSubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/subscribe/trial":{"post":{"tags":["Market"],"summary":"Subscribe Trial Shop","description":"Start a free trial subscription for a shop.","operationId":"subscribe_trial_shop_market_shops__shop_id__subscribe_trial_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/subscribe/preview":{"post":{"tags":["Market"],"summary":"Preview Subscribe Shop","description":"Non-binding, point-in-time quote for `POST /shops/{shop_id}/subscribe`\n(ADD-01). Reuses `ShopSubscribeRequest` as the body so a client builds\none request object for both calls; the unused `auto_renew` field is\nharmless here.","operationId":"preview_subscribe_shop_market_shops__shop_id__subscribe_preview_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopSubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribePreviewOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/market/subscriptions/{subscription_id}/refund":{"post":{"tags":["Market"],"summary":"Refund Subscription","operationId":"refund_subscription_market_subscriptions__subscription_id__refund_post","security":[{"Bearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/subscriptions/me":{"get":{"tags":["Market"],"summary":"List My Subscriptions","description":"List current user's active shop subscriptions.","operationId":"list_my_subscriptions_market_subscriptions_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_MySubscriptionItem_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/me":{"get":{"tags":["Market"],"summary":"Get My Shop","description":"Get the current trader's shop (the shop they belong to)","operationId":"get_my_shop_market_shops_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopWithTraders"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/featured":{"get":{"tags":["Market"],"summary":"List Featured Shops","description":"List shops currently carrying a live boost, as their own set (ADD-02).\n\nAnonymous callers and authenticated non-admin callers see the same\nactive-boost shops through ShopPublic — the same gate GET /shops applies\n(D-09). Membership is resolved through the shared active-boost\nprojection, so this rail can never disagree with the listing's\nboost-weighted sort or the shop-detail boost flag about which shops are\nboosted (D-08).","operationId":"list_featured_shops_market_shops_featured_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopPublic_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/market/shops/trader-candidates":{"get":{"tags":["Market"],"summary":"List Shop Trader Candidates","description":"Search traders by name, email, or username","operationId":"list_shop_trader_candidates_market_shops_trader_candidates_get","security":[{"Bearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Shop Trader Candidates Market Shops Trader Candidates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}":{"get":{"tags":["Market"],"summary":"Get Shop Detail","description":"Get single shop details with traders","operationId":"get_shop_detail_market_shops__shop_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Market"],"summary":"Update Shop","description":"Update shop details (shop owner or admin)","operationId":"update_shop_market_shops__shop_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/image":{"patch":{"tags":["Market"],"summary":"Update Shop Image","description":"Upload/update shop image (shop owner or admin)","operationId":"update_shop_image_market_shops__shop_id__image_patch","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_shop_image_market_shops__shop_id__image_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/subs":{"get":{"tags":["Market"],"summary":"List Subs","operationId":"list_subs_market_shops__shop_id__subs_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_SubscriptionOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/earnings":{"get":{"tags":["Market"],"summary":"List Earnings","operationId":"list_earnings_market_shops__shop_id__earnings_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarningsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/stats":{"get":{"tags":["Market"],"summary":"Get Stats","description":"Aggregate stats for ONE shop. Authenticated — see IW-1 below.\n\nAUTH + ACTIVE GATE ADDED BY THE v1.13 MILESTONE-AUDIT IW-1 FIX. This route\npreviously carried NO dependency at all and filtered `is_deleted` only, so\nan anonymous caller holding an id or slug could read the stats of a shop\nthat Phase 73 had deliberately removed from the anonymous listing.\n\nBoth halves follow the auth matrix Phase 73 already settled (PUB-01 /\nPUB-02 / D-17): only the shop LISTING is anonymous, with a public\nprojection and inactive shops absent; every single-shop read — detail,\nsetups, performance, categories — is authenticated. `/stats` is a\nsingle-shop read, so it takes `get_current_active_user`, the same\ndependency `GET /shops/{shop_id}` uses.\n\nThe active check goes through `market_guards.assert_shop_active` rather\nthan a local `if`, so the 409 `shop_inactive` answer stays identical to\nthe subscribe/preview doors (D-08). The Shop is still resolved by\n`get_shop_by_id_or_slug` and NOT by `guards.resolve_subscribable_shop`:\nthat helper matches on `Shop.id` only, and routing this endpoint through\nit would have silently dropped slug lookups. The `is_deleted` filter and\nthe bare-404 are already identical between the two lookups.\n\nCONTRACT TIGHTENING: anonymous callers now get 401 where they used to get\n200. The route shipped in Phase 75, days before this fix, so exposure is\nsmall — but it IS a published-contract change and must be called out at\nUAT.","operationId":"get_stats_market_shops__shop_id__stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/market/shops/{shop_id}/followers":{"get":{"tags":["Market"],"summary":"List Shop Followers","operationId":"list_shop_followers_market_shops__shop_id__followers_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopFollowerOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/payouts":{"get":{"tags":["Market"],"summary":"List Shop Payouts","operationId":"list_shop_payouts_market_shops__shop_id__payouts_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_PayoutBatchOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/setups":{"get":{"tags":["Market"],"summary":"Get Shop Setups","description":"Get setups from shop traders","operationId":"get_shop_setups_market_shops__shop_id__setups_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/performance":{"get":{"tags":["Market"],"summary":"Get Shop Performance","description":"Get shop performance data for charts","operationId":"get_shop_performance_market_shops__shop_id__performance_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":12,"minimum":1,"default":6,"title":"Months"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Shop Performance Market Shops  Shop Id  Performance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/trader-candidates/available":{"get":{"tags":["Market"],"summary":"List Available Shop Trader Candidates","description":"List traders not currently in any shop, with optional search","operationId":"list_available_shop_trader_candidates_market_shops_trader_candidates_available_get","security":[{"Bearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":2,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Available Shop Trader Candidates Market Shops Trader Candidates Available Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/subscriptions/{subscription_id}/auto-renew":{"patch":{"tags":["Market"],"summary":"Toggle Auto Renew","description":"Toggle auto-renew on a subscription.","operationId":"toggle_auto_renew_market_subscriptions__subscription_id__auto_renew_patch","security":[{"Bearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleAutoRenewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/subscriptions/{subscription_id}/cancel":{"post":{"tags":["Market"],"summary":"Cancel Subscription","description":"Cancel a subscription.","operationId":"cancel_subscription_market_subscriptions__subscription_id__cancel_post","security":[{"Bearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/boost/tiers":{"get":{"tags":["Market"],"summary":"List Boost Tiers","description":"List available boost tiers.","operationId":"list_boost_tiers_market_boost_tiers_get","security":[{"Bearer":[]}],"parameters":[{"name":"target_type","in":"query","required":false,"schema":{"type":"string","pattern":"shop|setup","title":"Target Type"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_BoostTierResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/boost":{"post":{"tags":["Market"],"summary":"Create Boost","description":"Create a new boost for a shop or setup.","operationId":"create_boost_market_boost_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBoostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/boost/my-boosts":{"get":{"tags":["Market"],"summary":"List My Boosts","description":"List current user's boosts.","operationId":"list_my_boosts_market_boost_my_boosts_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List My Boosts Market Boost My Boosts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/boost/{boost_id}":{"get":{"tags":["Market"],"summary":"Get My Boost","description":"Read one boost the caller bought, including terminal states (ADD-05,\nD-13). Keep any new route under this prefix below /boost/tiers and\n/boost/my-boosts.","operationId":"get_my_boost_market_boost__boost_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"boost_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Boost Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Market"],"summary":"Cancel Boost","description":"Cancel an active boost (no refund).","operationId":"cancel_boost_market_boost__boost_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"boost_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Boost Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/reviews":{"post":{"tags":["Market"],"summary":"Create Shop Review","description":"Create a review for a shop.","operationId":"create_shop_review_market_shops__shop_id__reviews_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopReviewCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Market"],"summary":"List Shop Reviews","description":"List reviews for a shop (requires an authenticated caller; the response includes each reviewer's display name).","operationId":"list_shop_reviews_market_shops__shop_id__reviews_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","title":"Shop Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Shop Reviews Market Shops  Shop Id  Reviews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/reviews/me":{"get":{"tags":["Market"],"summary":"List My Reviews","description":"List the caller's own reviews across every shop it wrote one in\n(ADD-03) — including reviews whose status is not active, so a client\ncan offer edit-my-review instead of a create the one-review-per-shop\nconstraint would refuse.\n\nDeclared ahead of the parametrised review routes below. No GET is\ncurrently registered on a parametrised review path, so there is no live\nshadowing hazard today — but declaring the literal first means a future\nGET on a review id cannot introduce the bug retroactively.","operationId":"list_my_reviews_market_reviews_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ReviewOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/market/reviews/{review_id}":{"patch":{"tags":["Market"],"summary":"Update Review","description":"Update own review.","operationId":"update_review_market_reviews__review_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Market"],"summary":"Delete Review","description":"Delete own review (or any review if admin).","operationId":"delete_review_market_reviews__review_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/reviews/summary":{"get":{"tags":["Market"],"summary":"Get Review Summary","description":"Get rating summary for a shop (requires an authenticated caller).","operationId":"get_review_summary_market_shops__shop_id__reviews_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/reviews/{review_id}/reply":{"post":{"tags":["Market"],"summary":"Reply To Review","description":"Shop owner replies to a review.","operationId":"reply_to_review_market_reviews__review_id__reply_post","security":[{"Bearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Reply To Review Market Reviews  Review Id  Reply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/disputes":{"post":{"tags":["Market"],"summary":"Create Dispute","description":"Create a dispute for a shop subscription.","operationId":"create_dispute_market_disputes_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDisputeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/disputes/me":{"get":{"tags":["Market"],"summary":"List My Disputes","description":"List current user's disputes.","operationId":"list_my_disputes_market_disputes_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List My Disputes Market Disputes Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/disputes/shop/{shop_id}":{"get":{"tags":["Market"],"summary":"List Shop Disputes","description":"List disputes for a shop (owner or admin).","operationId":"list_shop_disputes_market_disputes_shop__shop_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Shop Disputes Market Disputes Shop  Shop Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/disputes/{dispute_id}":{"get":{"tags":["Market"],"summary":"Get My Dispute","description":"Read one dispute the caller filed, at its current status including\nresolved/rejected (ADD-04, D-12).","operationId":"get_my_dispute_market_disputes__dispute_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"dispute_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispute Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/market/shops/applications":{"post":{"tags":["Market"],"summary":"Create Application","description":"Trader submits a shop application (create or join).","operationId":"create_application_market_shops_applications_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/applications/me":{"get":{"tags":["Market"],"summary":"My Applications","description":"List current trader's applications.","operationId":"my_applications_market_shops_applications_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopApplicationOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/join-requests":{"get":{"tags":["Market"],"summary":"List Shop Join Requests","description":"Shop owner: list join requests for their shop.","operationId":"list_shop_join_requests_market_shops__shop_id__join_requests_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"pending","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopApplicationOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/join-requests/{application_id}/approve":{"post":{"tags":["Market"],"summary":"Approve Shop Join Request","description":"Shop owner: approve a join request.","operationId":"approve_shop_join_request_market_shops__shop_id__join_requests__application_id__approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationReview","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market/shops/{shop_id}/join-requests/{application_id}/reject":{"post":{"tags":["Market"],"summary":"Reject Shop Join Request","description":"Shop owner: reject a join request.","operationId":"reject_shop_join_request_market_shops__shop_id__join_requests__application_id__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationReview","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/shops/traders/history":{"get":{"tags":["Admin Market"],"summary":"List Shop Trader History Admin","operationId":"list_shop_trader_history_admin_admin_market_shops_traders_history_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"}},{"name":"trader_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"added|removed"},{"type":"null"}],"title":"Action"}},{"name":"performed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Performed By User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","pattern":"newest|oldest","default":"newest","title":"Order By"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopTraderHistoryOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/shops":{"post":{"tags":["Admin Market"],"summary":"Create Shop","operationId":"create_shop_admin_market_shops_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/earnings":{"get":{"tags":["Admin Market"],"summary":"List All Earnings","description":"Admin endpoint to list all earnings across all shops","operationId":"list_all_earnings_admin_market_earnings_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List All Earnings Admin Market Earnings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/payouts/run":{"post":{"tags":["Admin Market"],"summary":"Run Payouts","operationId":"run_payouts_admin_market_payouts_run_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Run Payouts Admin Market Payouts Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/shops/{shop_id}/payout-schedule":{"patch":{"tags":["Admin Market"],"summary":"Update Shop Payout Schedule","description":"Admin-only: change a shop's payout schedule (future-only, L-3).\n\nActual path: PATCH /admin/market/shops/{shop_id}/payout-schedule (Phase 77 /\nADM-01 — this handler is registered on market.admin_router, which is mounted\nwith prefix='/admin/market' in app/apps/endpoints.py). That mount resolves the\nold Deviation A: the '/market'-prefixed variant this route used to answer on is\nretired, so the ROADMAP '/admin/shops/{id}/payout-schedule' wording is now\nshorthand only for the marketplace segment, not for the prefix.\n\nFuture-only: in-flight PayoutBatch rows retain their payout_schedule snapshot.\nEmits shop.payout_schedule_changed audit unconditionally (D-13).\nReturns ShopOut (admin view, with payout_schedule field from Task 11.2).","operationId":"update_shop_payout_schedule_admin_market_shops__shop_id__payout_schedule_patch","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","description":"Shop ID or slug","title":"Shop Id"},"description":"Shop ID or slug"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopPayoutScheduleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/disputes":{"get":{"tags":["Admin Market"],"summary":"List All Disputes","description":"Admin: list all disputes.","operationId":"list_all_disputes_admin_market_disputes_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","title":"Shop Id"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List All Disputes Admin Market Disputes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/disputes/{dispute_id}/review":{"patch":{"tags":["Admin Market"],"summary":"Mark Dispute Under Review","description":"Admin: mark dispute as under review.","operationId":"mark_dispute_under_review_admin_market_disputes__dispute_id__review_patch","security":[{"Bearer":[]}],"parameters":[{"name":"dispute_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispute Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/disputes/{dispute_id}/resolve":{"post":{"tags":["Admin Market"],"summary":"Resolve Dispute","description":"Admin: resolve a dispute with optional refund and access revocation.","operationId":"resolve_dispute_admin_market_disputes__dispute_id__resolve_post","security":[{"Bearer":[]}],"parameters":[{"name":"dispute_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispute Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveDisputeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/disputes/{dispute_id}/reject":{"post":{"tags":["Admin Market"],"summary":"Reject Dispute","description":"Admin: reject a dispute.\n\nOnly {resolution} is accepted. Extra fields (revoke_access, refund_mode,\nrefund_amount) cause a 422 so access-control actions cannot be silently\ndropped (Finding #8).","operationId":"reject_dispute_admin_market_disputes__dispute_id__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"dispute_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dispute Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectDisputeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/users/{user_id}/subscriptions":{"get":{"tags":["Admin Market"],"summary":"List User Subscriptions Admin","description":"Admin: list all shop subscriptions for a user.","operationId":"list_user_subscriptions_admin_admin_market_users__user_id__subscriptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List User Subscriptions Admin Admin Market Users  User Id  Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/subscriptions/{subscription_id}/refund":{"post":{"tags":["Admin Market"],"summary":"Admin Refund Subscription","description":"Admin: refund any subscription without time/fraud restrictions.\n\nF4: `payload.scope` controls how far back the reversal reaches on a renewed\nsubscription — 'period' (default) reverses only the current period, 'lifetime'\nreverses every still-reversible earning. See market_service.admin_refund_subscription.","operationId":"admin_refund_subscription_admin_market_subscriptions__subscription_id__refund_post","security":[{"Bearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/payouts":{"get":{"tags":["Admin Market"],"summary":"Admin List Payouts","description":"APB-01: admin, cross-shop payout batch list — the batch-picker for the\nfour live mutation routes below. Market-domain envelope\n(`ResponseListGeneric`/`total_count`/`start`/`limit`/`data`) — the three\ncredits-domain routes in this phase use the different `{items, total}`\nshape; crossing them is the phase's highest-risk mistake, because the\nconsole renders against the frozen field names.","operationId":"admin_list_payouts_admin_market_payouts_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(created|sent|paid|failed)$"},{"type":"null"}],"title":"Status"}},{"name":"shop_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_PayoutBatchAdminListItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/market/payouts/{batch_id}/send":{"post":{"tags":["Admin Market"],"summary":"Admin Payout Send","description":"PAYOUT-03: admin marks a created PayoutBatch as sent (external_ref required).","operationId":"admin_payout_send_admin_market_payouts__batch_id__send_post","security":[{"Bearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSendPayoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/payouts/{batch_id}/mark-paid":{"post":{"tags":["Admin Market"],"summary":"Admin Payout Mark Paid","description":"PAYOUT-03: admin marks a sent PayoutBatch as paid + cascades earnings batched->paid.","operationId":"admin_payout_mark_paid_admin_market_payouts__batch_id__mark_paid_post","security":[{"Bearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMarkPaidRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/payouts/{batch_id}/mark-failed":{"post":{"tags":["Admin Market"],"summary":"Admin Payout Mark Failed","description":"PAYOUT-03: admin marks a created|sent PayoutBatch as failed + reverts earnings.","operationId":"admin_payout_mark_failed_admin_market_payouts__batch_id__mark_failed_post","security":[{"Bearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMarkFailedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/payouts/{batch_id}/retry":{"post":{"tags":["Admin Market"],"summary":"Admin Payout Retry","description":"PAYOUT-03: admin retries a failed PayoutBatch (M3 re-attach reverted earnings).","operationId":"admin_payout_retry_admin_market_payouts__batch_id__retry_post","security":[{"Bearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRetryPayoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/applications":{"get":{"tags":["Admin Market"],"summary":"List Applications Admin","description":"Admin: list all shop applications.","operationId":"list_applications_admin_admin_market_applications_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"pending","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShopApplicationOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/applications/{application_id}/approve":{"post":{"tags":["Admin Market"],"summary":"Approve Application","description":"Admin: approve a shop application.","operationId":"approve_application_admin_market_applications__application_id__approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationReview","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/market/applications/{application_id}/reject":{"post":{"tags":["Admin Market"],"summary":"Reject Application","description":"Admin: reject a shop application.","operationId":"reject_application_admin_market_applications__application_id__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationReview","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/impressions/batch":{"post":{"tags":["Impressions"],"summary":"Track Impressions","operationId":"track_impressions_impressions_batch_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpressionBatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/preferences":{"get":{"tags":["Notification"],"summary":"My Notification Preferences","description":"Return the authenticated caller's catalog-derived preference matrix.","operationId":"My_Notification_Preferences_notification_preferences_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Notification"],"summary":"Update My Notification Preferences","description":"Update selected cells only.\n\n``recommendation_digest`` cells reach ``resolve_delivery`` now. Phase 113 plan 09\n(D-19/DR-09) moved the weekly digest sender (``app/apps/recommendation/tasks.py``) onto\n``notify()`` behind ``NOTIFY_LEGACY_DIGEST_ENABLED`` — while that valve is CLOSED the digest\nstill reads the legacy ``recommendation_push_enabled`` column directly and this surface does\nnot write it; once the valve is OPEN, the digest reads the resolver's decision instead and\n``SUGGEST_PUSH_ENABLED`` is not consulted.","operationId":"Update_My_Notification_Preferences_notification_preferences_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencePatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/settings":{"patch":{"tags":["Notification"],"summary":"Update My Notification Settings","description":"Update the caller's quiet-hours, master mute, and breakthrough settings.","operationId":"Update_My_Notification_Settings_notification_settings_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingsPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/digest-preferences":{"patch":{"tags":["Notification"],"summary":"Update My Notification Digest Preferences","description":"Update digest values moved from the retired legacy door.\n\n``PUT /copy_trade/team/suggestions/preferences`` remains a second legacy door; Phase 04's\nbridge keeps that surviving route and this preference model synchronized.","operationId":"Update_My_Notification_Digest_Preferences_notification_digest_preferences_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestPreferencePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/consent/marketing":{"get":{"tags":["Notification"],"summary":"My Marketing Consent","description":"CNST-01/CNST-02: the caller's own marketing-consent regime, current\nanswer and current text — no subject parameter exists on this route\n(T-109-04).","operationId":"My_Marketing_Consent_notification_consent_marketing_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"post":{"tags":["Notification"],"summary":"Grant Or Withdraw My Marketing Consent","description":"Grant or withdraw the caller's own marketing consent (CNST-01). The\nsubject is always the authenticated caller — no user_id parameter exists\non this route (T-109-04).","operationId":"Grant_or_Withdraw_My_Marketing_Consent_notification_consent_marketing_post","security":[{"Bearer":[]}],"parameters":[{"name":"user-agent","in":"header","required":false,"schema":{"type":"string","default":"","title":"User-Agent"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConsentActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/consent/text-versions":{"post":{"tags":["Notification"],"summary":"Publish A Consent Text Version","description":"Operator-only (D-09): publish one immutable text row per locale in\n`item_in.bodies`. No route in this file edits or deletes a published\nversion — D-09's immutability plus the DB trigger (plan 01) is the whole\ncontract. `GRANT_SOURCES` (plan 01) refuses any operator source even if a\ncaller tried, so publishing text confers no ability to grant (D-07).","operationId":"Publish_a_Consent_Text_Version_notification_consent_text_versions_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentTextPublishIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Notification"],"summary":"List Consent Text Versions","description":"Operator-only (D-09): every published text version for `purpose`,\nordered regime ascending, version descending, locale ascending.","operationId":"List_Consent_Text_Versions_notification_consent_text_versions_get","security":[{"Bearer":[]}],"parameters":[{"name":"purpose","in":"query","required":false,"schema":{"type":"string","default":"marketing","title":"Purpose"}},{"name":"regime","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/users/{user_id}/consent":{"get":{"tags":["Notification"],"summary":"A User'S Consent Evidence","description":"Operator-only (CNST-01/D-07): the operator's proof of who consented to\nwhat and when — never a route that writes a grant.","operationId":"A_User_s_Consent_Evidence_notification_users__user_id__consent_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/users/{user_id}/consent/marketing/withdraw":{"post":{"tags":["Notification"],"summary":"Record A Support-Request Consent Withdrawal","description":"Operator-only (D-07): record a support-request withdrawal attributed\nto the operator via `recorded_by`. This file has exactly one route that\ncalls `record_grant` — the self-only `post_marketing_consent` above — and\nno operator route calls it (census: `test_notification_evidence_write_census.py`).","operationId":"Record_a_Support_Request_Consent_Withdrawal_notification_users__user_id__consent_marketing_withdraw_post","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"user-agent","in":"header","required":false,"schema":{"type":"string","default":"","title":"User-Agent"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/me":{"get":{"tags":["Notification"],"summary":"My Notification History","description":"Allowed: Customer, Trader, Admin\n\nList notification history for the authenticated user.\nJoins notification_results with notification_logs to return full details.\nSorted by sent_at DESC.","operationId":"My_Notification_History_notification_me_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/inbox":{"get":{"tags":["Notification"],"summary":"Notification Inbox","description":"Allowed: Customer, Trader, Admin\n\nCHAN-02's richer in-app inbox — the caller's delivered in_app rows with\ncategory, deeplink and read state. Reads notification_delivery\ndirectly; unlike /user/me/notifications this route carries no legacy\nUNION leg, since it did not exist before Phase 110. No operator column\n(suppression_reason, decision_*, provider_*, last_error_code,\nidempotency_key) reaches the response — NotificationInboxItem\nenumerates an explicit allowlist (T-110-13).","operationId":"Notification_Inbox_notification_inbox_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_NotificationInboxItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/inbox/unread-count":{"get":{"tags":["Notification"],"summary":"Notification Inbox Unread Count","description":"Allowed: Customer, Trader, Admin\n\nServed by the partial index on (user_id) restricted to unread in_app\nrows that 110-01 created. No user id is accepted from the caller —\nownership is always the authenticated user (ASVS V4). `count` is the\ncaller's current unread in_app total.","operationId":"Notification_Inbox_Unread_Count_notification_inbox_unread_count_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/inbox/read-all":{"post":{"tags":["Notification"],"summary":"Mark All Notifications Read","description":"Allowed: Customer, Trader, Admin\n\nMarks every unread in_app delivery row of the authenticated user read.\nNo user id is accepted from the caller — ownership is always the\nauthenticated user (ASVS V4). `count` is the number of rows this call\naffected; a second call on an already-read set returns 0 and writes\nnothing.","operationId":"Mark_All_Notifications_Read_notification_inbox_read_all_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/logs":{"get":{"tags":["Notification"],"summary":"Notification Logs","description":"Allowed: Admin only\n\nList notification logs with optional filters.","operationId":"Notification_Logs_notification_logs_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"notification_type","in":"query","required":false,"schema":{"type":"string","description":"Filter by notification type","title":"Notification Type"},"description":"Filter by notification type"},{"name":"setup_id","in":"query","required":false,"schema":{"type":"string","description":"Filter by setup ID","title":"Setup Id"},"description":"Filter by setup ID"},{"name":"trader_id","in":"query","required":false,"schema":{"type":"string","description":"Filter by trader ID","title":"Trader Id"},"description":"Filter by trader ID"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100,"description":"Free-text search across the message, the sending trader, the setup's coin, the recipients, and any pasted UUID","title":"Q"},"description":"Free-text search across the message, the sending trader, the setup's coin, the recipients, and any pasted UUID"},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","description":"Filter from date (ISO format, e.g. 2025-01-01)","title":"Date From"},"description":"Filter from date (ISO format, e.g. 2025-01-01)"},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","description":"Filter to date (ISO format, e.g. 2025-12-31)","title":"Date To"},"description":"Filter to date (ISO format, e.g. 2025-12-31)"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/health":{"get":{"tags":["Notification"],"summary":"Notification Delivery Health","description":"Allowed: Admin only\n\nDelivery health for the window: how many pushes it took to notify how many\npeople, which types and which people carry the fan-out, why deliveries\nfailed, and how often an identical notification was re-sent.\n\nAlso reports the push command and dead-letter queue depths read from the\nbroker (null when unmeasured, never 0).\n\nRegistered above `/logs/{log_id}` only for readability — the paths do not\noverlap.","operationId":"Notification_Delivery_Health_notification_health_get","security":[{"Bearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Window size in days","default":7,"title":"Days"},"description":"Window size in days"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryHealthResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/catalog":{"get":{"tags":["Notification"],"summary":"Notification Catalog","description":"Allowed: Admin only\n\nThe full notification catalog: every declared event with its live\nper-channel valve state, the category registry, and the mail-stream\nregistry. `valve_state` is the full catalog-default AND env AND DB\nresolution (`resolve_channel_enabled`'s whole precedence chain) — the\n`layer` field on each cell names which layer actually decided it. Every\n`notification_valve` row is prefetched ONCE, ahead of the per-event loop,\ninto a `MappingValveSource` — not `DbValveSource`, which would run one\nSELECT per event x channel resolution.","operationId":"Notification_Catalog_notification_catalog_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCatalogResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/logs/{log_id}":{"get":{"tags":["Notification"],"summary":"Notification Log Detail","description":"Allowed: Admin only\n\nGet notification log detail with delivery results.","operationId":"Notification_Log_Detail_notification_logs__log_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationLogDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/send":{"post":{"tags":["Notification"],"summary":"Send Notification","description":"Allowed: Admin only\n\n113.2 D-01..D-03 (114 D-05): a manual operator send is journaled through\nnotify() as the `admin.manual_message` catalog event — no more proxy to\nnotification-service, no broadcast. `user_ids` is required and capped\n(`NotificationSendRequest.MANUAL_SEND_MAX_RECIPIENTS`); a recipient id\nthat matches no live user is reported in `unknown_user_ids` and never\npassed to notify(). One `audit_log` row (event id, operator, recipient\ncounts, title/body sha256 — never the raw text, already in the journal)\nis written in the SAME transaction as the journal rows, before the\nsingle commit below (review 07 LOW).","operationId":"Send_Notification_notification_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSendResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/user/send":{"post":{"tags":["Notification"],"summary":"Send User Notification","description":"Allowed: Admin (JWT) or service (X-Internal-Key).\n\nM-2: locked to admin/service. This is a direct-to-any-user push with\ncaller-chosen title/body — a targeted-phishing primitive if any user could\ncall it. It stays experimental and admin-only until it grows the checks a\nuser-facing DM needs: recipient must have an established relationship with\nthe sender (friend list) AND must not have blocked them, plus templated\n(non-caller-controlled) content. Until then, no JWT-user path.\n\nSend one push notification directly to a single user — no topic.\nRecipient is addressed by `userId` (DB UUID, Firebase uid also accepted)\nand/or `Id` (Firebase uid); at least one is required. Resolves the\nrecipient locally, then proxies to the notification service's\n/api/push/send with a one-element user_ids list.","operationId":"Send_User_Notification_notification_user_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSendResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/topic/send":{"post":{"tags":["Notification"],"summary":"Send Topic Notification","description":"Allowed: a channel member (JWT), an admin, or service (X-Internal-Key).\n\nM-2: a JWT user may publish to `trader_<T>_<suffix>` only if they belong to\ntrader T's channel (they are T, a TeamTraders member, or a non-blocked\nFollowNotify follower); every other topic is admin/service-only. See\n`authorize_topic_publish`. The rate limit (per user) still applies via the\ndependency above.\n\nCNST-02/D-11 (review H1/cycle-2/cycle-3): after authorization, every send\nis valved by where its authorization came from, not by topic shape. A\nUSER-LEVEL send — a non-admin, or an admin whose send a non-admin would\nalso be allowed to make (`is_user_level_publish`) — is ordinary chat and\nmust carry chat class 0 (`assert_user_chat_class`); every other send (the\nservice path, and any admin send only admin privilege authorized) is\nvalved exactly like `/send` (`assert_operator_send_allowed`).","operationId":"Send_Topic_Notification_notification_topic_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSendResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/topic/subscribe":{"post":{"tags":["Notification"],"summary":"Subscribe Tokens To Topic","description":"Allowed: Admin (JWT) or service (X-Internal-Key).\n\nSubscribes up to 1000 FCM registration tokens to `topic`.","operationId":"Subscribe_Tokens_to_Topic_notification_topic_subscribe_post","security":[{"Bearer":[]}],"parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSubscriptionResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/topic/unsubscribe":{"post":{"tags":["Notification"],"summary":"Unsubscribe Tokens From Topic","description":"Allowed: Admin (JWT) or service (X-Internal-Key).\n\nUnsubscribes up to 1000 FCM registration tokens from `topic`.","operationId":"Unsubscribe_Tokens_from_Topic_notification_topic_unsubscribe_post","security":[{"Bearer":[]}],"parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSubscriptionResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/telegram":{"get":{"tags":["Notification Telegram"],"summary":"My Telegram Link State","description":"`linked` / `stopped` / `blocked` / `none` (no row, or `unlinked`).","operationId":"My_Telegram_Link_State_notification_telegram_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Notification Telegram"],"summary":"Unlink Telegram","description":"Explicit unlink (D-19): releases the chat via `unlink_telegram`, and\n— only when the projection was `linked` — sends a short 'Disconnected'\nmessage to the OLD chat, best-effort, AFTER the commit. A `stopped` /\n`blocked` prior state (or no row at all) sends no message; there is\neither no reachable chat or the user already knows the bot is silent.\nA bot-send failure never affects this route's own 200.","operationId":"Unlink_Telegram_notification_telegram_delete","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/notification/telegram/link":{"post":{"tags":["Notification Telegram"],"summary":"Mint Telegram Link Token","description":"Mint a fresh single-use link token and return the `t.me` deep link\nthe caller opens to complete linking via `/start <token>`.","operationId":"Mint_Telegram_Link_Token_notification_telegram_link_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/valves":{"get":{"tags":["Admin Notifications"],"summary":"Admin Notification Valves","description":"Every `notification_valve` row, sorted by `(scope, key)` — an empty\ntable returns an empty list. Plain `def` (WR-03): `read_flips` may wait up to\nOWNER_READ_LOCK_TIMEOUT_MS on the path-history lock, in the threadpool, never\non the event loop.","operationId":"Admin_Notification_Valves_admin_notifications_valves_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"post":{"tags":["Admin Notifications"],"summary":"Admin Notification Valve Write","description":"Plain `def` (WR-03): a setup_path write may wait up to\nFLIP_WRITE_LOCK_TIMEOUT_MS on the exclusive history lock and runs the gate\naggregates - in the threadpool, never on the event loop.","operationId":"Admin_Notification_Valve_Write_admin_notifications_valves_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValveWriteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-send/plans/{plan_id}/redrive":{"post":{"tags":["Admin Notifications"],"summary":"Admin Setup Send Plan Redrive","description":"Failed chunks -> pending (attempts 0, enqueued_at NULL) and the plan back to\n'dispatched'; a planner-failed plan -> 'pending', planned again next tick.","operationId":"Admin_Setup_Send_Plan_Redrive_admin_notifications_setup_send_plans__plan_id__redrive_post","security":[{"Bearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupSendPlanActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-send/plans/{plan_id}/abandon":{"post":{"tags":["Admin Notifications"],"summary":"Admin Setup Send Plan Abandon","description":"Terminal 'abandoned' with a required note; unfinished chunks are retired.","operationId":"Admin_Setup_Send_Plan_Abandon_admin_notifications_setup_send_plans__plan_id__abandon_post","security":[{"Bearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupSendPlanActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-send/events/{event_id}/replan":{"post":{"tags":["Admin Notifications"],"summary":"Admin Setup Send Event Replan","description":"Record an unplanned new-owned setup_event as the bridge would; the normal\nticks plan, dispatch and send it.","operationId":"Admin_Setup_Send_Event_Replan_admin_notifications_setup_send_events__event_id__replan_post","security":[{"Bearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupSendPlanActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-send/events/{event_id}/dismiss":{"post":{"tags":["Admin Notifications"],"summary":"Admin Setup Send Event Dismiss","description":"Retire an unplanned new-owned setup_event with a required note: terminal\n'abandoned' plan rows, never sent; purged at retention.","operationId":"Admin_Setup_Send_Event_Dismiss_admin_notifications_setup_send_events__event_id__dismiss_post","security":[{"Bearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupSendPlanActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/deliveries":{"get":{"tags":["Admin Notifications"],"summary":"Admin Notification Delivery Search","description":"`GET /admin/notifications/deliveries` — the filtered, exactly-\ntotalled delivery search (ADMN-02). `created_at DESC, id DESC` is the\nONLY order — a total order, so two rows sharing `created_at` never swap\nbetween pages.","operationId":"Admin_Notification_Delivery_Search_admin_notifications_deliveries_get","security":[{"Bearer":[]}],"parameters":[{"name":"event_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Key"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},{"name":"setup_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},{"name":"is_test","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_DeliveryListItemOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/deliveries/{delivery_id}":{"get":{"tags":["Admin Notifications"],"summary":"Admin Notification Delivery Detail","description":"`GET /admin/notifications/deliveries/{delivery_id}` — stored journal\nfields ONLY (108 D-12, 114 D-04). Never calls `resolve_delivery`,\n`resolve_delivery_for_user`, `resolve_channel_enabled` or\n`evaluate_contact` — a delivery's context may have changed since it was\ndecided, but the detail must keep showing the decision it recorded.","operationId":"Admin_Notification_Delivery_Detail_admin_notifications_deliveries__delivery_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/copy-trades/{copy_trade_id}/deliveries":{"get":{"tags":["Admin Notifications"],"summary":"Admin Notification Copy-Trade Deliveries","description":"`GET /admin/notifications/copy-trades/{copy_trade_id}/deliveries` —\nevery notification emitted for ONE copy (the per-copy half of ADMN-06):\nits own `(\"copy_trade\", id)` events, plus the copier's `(\"setup\", ...)`\nrejection events whose stored payload `\"copy_trade_id\"` names exactly\nthis copy.\n\nThe payload match is done in PYTHON on purpose — JSON path operators\ndiffer between SQLite and Postgres, and the candidate set is already\nnarrowed to one copier's rejections for one setup by the SQL filter\nbelow. A setup-entity row whose payload `copy_trade_id` is null (a\n`copy_trade.dispatch_failed` row, which always writes null) or names a\nDIFFERENT copy is NEVER attached here — a re-copy of the same setup by\nthe same copier must not inherit an earlier copy's rejections (review\n05 HIGH). The attribution is exactly what the emitter stored in the\npayload at emit time (its own newest-non-deleted-copy lookup);\nunattributed rejections stay reachable through the delivery search with\n``entity_type=setup&entity_id=<setup_id>&user_id=<copier>``.","operationId":"Admin_Notification_Copy_Trade_Deliveries_admin_notifications_copy_trades__copy_trade_id__deliveries_get","security":[{"Bearer":[]}],"parameters":[{"name":"copy_trade_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Copy Trade Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_DeliveryListItemOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/consent-drafts":{"post":{"tags":["Admin Notifications"],"summary":"Create A Consent Text Draft","operationId":"Create_a_Consent_Text_Draft_admin_notifications_consent_drafts_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDraftIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Admin Notifications"],"summary":"List Consent Text Drafts","description":"Ordered `created_at DESC, id DESC`; an empty table returns `[]`.","operationId":"List_Consent_Text_Drafts_admin_notifications_consent_drafts_get","security":[{"Bearer":[]}],"parameters":[{"name":"purpose","in":"query","required":false,"schema":{"type":"string","default":"marketing","title":"Purpose"}},{"name":"regime","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/consent-drafts/{draft_id}/publish":{"post":{"tags":["Admin Notifications"],"summary":"Publish A Consent Text Draft","operationId":"Publish_a_Consent_Text_Draft_admin_notifications_consent_drafts__draft_id__publish_post","security":[{"Bearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/consent-drafts/{draft_id}":{"get":{"tags":["Admin Notifications"],"summary":"Read A Consent Text Draft","operationId":"Read_a_Consent_Text_Draft_admin_notifications_consent_drafts__draft_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Admin Notifications"],"summary":"Update A Consent Text Draft","operationId":"Update_a_Consent_Text_Draft_admin_notifications_consent_drafts__draft_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDraftPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Admin Notifications"],"summary":"Delete A Consent Text Draft","operationId":"Delete_a_Consent_Text_Draft_admin_notifications_consent_drafts__draft_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/users/{user_id}/profile":{"get":{"tags":["Admin Notifications"],"summary":"Admin User Notification Profile","description":"One user's effective preference matrix, quiet hours, master mute,\ndigest preferences, current per-channel contact state and active push\nsessions — read-only, writes nothing. Renders exactly what the\nself-only `GET /notification/preferences` would render for this user\n(`_render_notification_preferences`, unchanged, imported not copied).\nConsent history stays on the existing `GET /notification/users/\n{user_id}/consent` route — not duplicated here.","operationId":"Admin_User_Notification_Profile_admin_notifications_users__user_id__profile_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/templates/{event_key}/preview":{"post":{"tags":["Admin Notifications"],"summary":"Admin Notification Template Preview","description":"`POST /admin/notifications/templates/{event_key}/preview` — the real\nrender for `event_key`, in every `SUPPORTED_LANGUAGE`, over the\ncatalog's own `sample` or an operator-edited `payload`. Byte-identical\nto what `notify()` stores (see `tests/test_notification_admin_preview.py`)\nbecause it calls the exact same rendering functions notify()'s dispatch\ncore and channel adapters call, over the same shaped payload\n(`payload_schema.model_validate(...).model_dump()` for\n`render_delivery_text`, `.model_dump(mode=\"json\")` for\n`render_email`/`render_telegram` — see `dispatch.py`'s `_notify_core`\nand `channels/email.py`'s adapter for the precedent).","operationId":"Admin_Notification_Template_Preview_admin_notifications_templates__event_key__preview_post","security":[{"Bearer":[]}],"parameters":[{"name":"event_key","in":"path","required":true,"schema":{"type":"string","title":"Event Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplatePreviewIn","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/templates/{event_key}/test-send":{"post":{"tags":["Admin Notifications"],"summary":"Admin Notification Template Test Send","description":"`POST /admin/notifications/templates/{event_key}/test-send` — sends\n`event_key` to `item_in.user_id` through the exact `notify()` decision\nchain a real emitter uses. Refused outright (422, no write of any kind)\nfor a recipient not in `NOTIFY_TEST_SEND_ALLOWLIST` — the gate is\nfail-closed and enforced in production too (D-08).","operationId":"Admin_Notification_Template_Test_Send_admin_notifications_templates__event_key__test_send_post","security":[{"Bearer":[]}],"parameters":[{"name":"event_key","in":"path","required":true,"schema":{"type":"string","title":"Event Key"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-shadow":{"get":{"tags":["Admin Notifications"],"summary":"Admin Setup Shadow Summary","description":"Nine kind entries in catalog order (always nine) plus the gate inputs. Plain\n`def` like the kind route (WR-03): the history read may wait on its lock.","operationId":"Admin_Setup_Shadow_Summary_admin_notifications_setup_shadow_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-shadow/kinds/{kind}":{"get":{"tags":["Admin Notifications"],"summary":"Admin Setup Shadow Kind","description":"One kind: its gate figures (over the gate window), the top fan-out traders and a\nfiltered, server-paged event list in a total (event_time, id) order.","operationId":"Admin_Setup_Shadow_Kind_admin_notifications_setup_shadow_kinds__kind__get","security":[{"Bearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"verdict","in":"query","required":false,"schema":{"enum":["all","unexplained","expected","clean"],"type":"string","default":"all","title":"Verdict"}},{"name":"match","in":"query","required":false,"schema":{"enum":["all","matched","legacy_only","plan_only"],"type":"string","default":"all","title":"Match"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Window Days"}},{"name":"setup_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/notifications/setup-shadow/events/{comparison_id}":{"get":{"tags":["Admin Notifications"],"summary":"Admin Setup Shadow Event","description":"The stored event, its payload and, per set (record, push), the recipient diff in\nthree independently paged groups. The two sets are never merged; explaining reasons\n(`reason_code`, expected rows only) stay apart from recorded `planner_reasons`.","operationId":"Admin_Setup_Shadow_Event_admin_notifications_setup_shadow_events__comparison_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"comparison_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comparison Id"}},{"name":"page_set","in":"query","required":false,"schema":{"anyOf":[{"enum":["record","push"],"type":"string"},{"type":"null"}],"title":"Page Set"}},{"name":"page_group","in":"query","required":false,"schema":{"anyOf":[{"enum":["legacy_only","plan_only","both"],"type":"string"},{"type":"null"}],"title":"Page Group"}},{"name":"page_verdict","in":"query","required":false,"schema":{"anyOf":[{"enum":["all","unexplained","expected","match"],"type":"string"},{"type":"null"}],"title":"Page Verdict"}},{"name":"page_skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page Skip"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/vouchers":{"post":{"tags":["Voucher"],"summary":"Create Voucher Endpoint","operationId":"create_voucher_endpoint_vouchers_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Voucher"],"summary":"List Vouchers","operationId":"list_vouchers_vouchers_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/generate":{"post":{"tags":["Voucher"],"summary":"Generate Vouchers Endpoint","operationId":"generate_vouchers_endpoint_vouchers_generate_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherGenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/redeem":{"post":{"tags":["Voucher"],"summary":"Redeem Voucher Endpoint","operationId":"redeem_voucher_endpoint_vouchers_redeem_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherRedeemRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherRedemptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/pending":{"get":{"tags":["Voucher"],"summary":"List Pending Vouchers","description":"Admin: list vouchers awaiting approval.","operationId":"list_pending_vouchers_vouchers_pending_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/me/redemptions":{"get":{"tags":["Voucher"],"summary":"List My Redemptions","operationId":"list_my_redemptions_vouchers_me_redemptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherRedemptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/check/{code}":{"get":{"tags":["Voucher"],"summary":"Check Voucher","description":"Public-safe voucher preview for redeem flow. Returns type, discount info, and shop details.","operationId":"check_voucher_vouchers_check__code__get","security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/{code}":{"get":{"tags":["Voucher"],"summary":"Get Voucher By Code","operationId":"get_voucher_by_code_vouchers__code__get","security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/{code}/redemptions":{"get":{"tags":["Voucher"],"summary":"List Voucher Redemptions","operationId":"list_voucher_redemptions_vouchers__code__redemptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherRedemptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/user/{user_id}/redemptions":{"get":{"tags":["Voucher"],"summary":"List User Redemptions","operationId":"list_user_redemptions_vouchers_user__user_id__redemptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherRedemptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/trader":{"post":{"tags":["Voucher"],"summary":"Create Trader Voucher","operationId":"create_trader_voucher_vouchers_trader_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderVoucherCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/trader/mine":{"get":{"tags":["Voucher"],"summary":"List My Trader Vouchers","operationId":"list_my_trader_vouchers_vouchers_trader_mine_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/{voucher_id}/approve":{"post":{"tags":["Voucher"],"summary":"Approve Voucher Endpoint","operationId":"approve_voucher_endpoint_vouchers__voucher_id__approve_post","security":[{"Bearer":[]}],"parameters":[{"name":"voucher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Voucher Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherApproveRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vouchers/{voucher_id}/reject":{"post":{"tags":["Voucher"],"summary":"Reject Voucher Endpoint","operationId":"reject_voucher_endpoint_vouchers__voucher_id__reject_post","security":[{"Bearer":[]}],"parameters":[{"name":"voucher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Voucher Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoucherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/marketplace/summary":{"get":{"tags":["Analytics"],"summary":"Marketplace Analytics Summary","description":"Scalar KPI block for the marketplace (admin only).\n\nD-05: summary is EXEMPT from the bucket param — it is a scalar aggregate,\nnot a time-series. Cache key omits bucket segment.","operationId":"Marketplace_Analytics_Summary_analytics_marketplace_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|7d|30d|90d)$","default":"30d","title":"Range"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_MarketplaceSummary_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/marketplace/revenue":{"get":{"tags":["Analytics"],"summary":"Marketplace Analytics Revenue","description":"Revenue time-series bucketed by day/week/month (admin only).","operationId":"Marketplace_Analytics_Revenue_analytics_marketplace_revenue_get","security":[{"Bearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(day|week|month)$","default":"day","title":"Bucket"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|7d|30d|90d)$","default":"30d","title":"Range"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_List_MarketplaceRevenuePoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/marketplace/subscribers":{"get":{"tags":["Analytics"],"summary":"Marketplace Analytics Subscribers","description":"Subscriber time-series bucketed by day/week/month (admin only).","operationId":"Marketplace_Analytics_Subscribers_analytics_marketplace_subscribers_get","security":[{"Bearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(day|week|month)$","default":"day","title":"Bucket"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|7d|30d|90d)$","default":"30d","title":"Range"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_List_MarketplaceSubscriberPoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/marketplace/churn":{"get":{"tags":["Analytics"],"summary":"Marketplace Analytics Churn","description":"Churn time-series bucketed by day/week/month (admin only).","operationId":"Marketplace_Analytics_Churn_analytics_marketplace_churn_get","security":[{"Bearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(day|week|month)$","default":"day","title":"Bucket"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|7d|30d|90d)$","default":"30d","title":"Range"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_List_MarketplaceChurnPoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/marketplace/payouts":{"get":{"tags":["Analytics"],"summary":"Marketplace Analytics Payouts","description":"Payout time-series bucketed by day/week/month (admin only).\n\nBucketed by payout_batch.created_at (D-11 / REVIEWS MEDIUM #7).","operationId":"Marketplace_Analytics_Payouts_analytics_marketplace_payouts_get","security":[{"Bearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(day|week|month)$","default":"day","title":"Bucket"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|7d|30d|90d)$","default":"30d","title":"Range"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_List_MarketplacePayoutPoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/earnings/top-traders-by-coin":{"get":{"tags":["Analytics"],"summary":"Earnings Analytics Top Traders By Coin","description":"Top-earning traders (referral + pool USD), each attributed to a\ndominant coin (admin only).\n\nDATA-AVAILABILITY NOTE (EARN-01): no earning table (TraderReferralEarning,\nTraderPoolEarning, ShopEarning) has a coin/symbol column, and none links\nto a Setup — earnings attach to subscriptions/pools that span all of a\ntrader's coins. The only coin data is Setup.coin_name (per trader). This\nendpoint therefore attributes each trader to a single DOMINANT COIN (their\nmost-frequent non-deleted Setup's coin_name, deterministic tiebreak), NOT\na true per-coin earning split — a trader appears exactly once, never\ndouble-counted across coins. The response's `attribution` field carries\nthis note verbatim so consumers cannot mistake it for a real per-coin\nbreakdown. A true per-coin split requires an earning->setup linkage the\ndata model does not have (tracked toward EARN-04).","operationId":"Earnings_Analytics_Top_Traders_By_Coin_analytics_earnings_top_traders_by_coin_get","security":[{"Bearer":[]}],"parameters":[{"name":"coin","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_TopTradersByCoinOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/earnings/shop/{shop_id}/trader-performance":{"get":{"tags":["Analytics"],"summary":"Earnings Analytics Shop Trader Performance","description":"Per-shop trader performance table with top/bottom earners and\ndeparted-trader labeling (admin only).\n\nH-1 (honest labeling — earnings scope): the per-trader earnings figures\nreturned here are the trader's PLATFORM-WIDE referral + pool totals, NOT\nshop-scoped money. ShopEarning (market/models.py) has shop_id + user_id\n(subscriber) but no trader_id, and TraderReferralEarning/TraderPoolEarning\nare keyed on trader_id only (no shop_id/setup_id) — so a true shop-scoped\nper-trader earning split is not derivable from the current data model\n(tracked toward EARN-04, same as EARN-01's coin proxy). This shop scopes\nonly the ROSTER of traders shown (current members + owner + departed\nmembers), not the earnings themselves. The response's `earnings_scope`\nfield carries this caveat verbatim, mirroring EARN-01's `attribution`.\n\nEARN-03: every row carries account_status ('active' | 'passive' |\n'deleted') and is_member (False for departed/'removed'-history traders\nno longer on the shop's roster) so the console can label departed traders.","operationId":"Earnings_Analytics_Shop_Trader_Performance_analytics_earnings_shop__shop_id__trader_performance_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","title":"Shop Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_ShopTraderPerformanceOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/net-pnl/windows":{"get":{"tags":["Analytics"],"summary":"Trader Net Pnl (Last 24H/7D/30D)(This Week/Month/Year)","description":"Trader'ın rolling pencerelerde net PnL değerlerini döner:\n- last_24h: last 24 hour\n- last_7d: last 7 day\n- last_30d: last 30 day\n- last_week: this week\n- last_month: this month\n- last_year: this year\n\nNet PnL = Sum of pnl_setup6.estimated_pnl\nPublic endpoint.","operationId":"Trader_Net_PnL__Last_24h_7d_30d__This_Week_Month_Year__analytics_trader__trader_id__net_pnl_windows_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"title":"Category"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_NetPnlWindows_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/net-r/windows":{"get":{"tags":["Analytics"],"summary":"Trader Net R (Last 24H/7D/30D)(This Week/Month/Year)","description":"Trader'ın rolling pencerelerde net R değerlerini döner:\n- last_24h: last 24 hour\n- last_7d: last 7 day\n- last_30d: last 30 day\n- last_week: this week\n- last_month: this month\n- last_year: this year\n\nNet R = Sum of pnl_setup6.estimated_pnl_rate\nPublic endpoint.","operationId":"Trader_Net_R__Last_24h_7d_30d__This_Week_Month_Year__analytics_trader__trader_id__net_r_windows_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"title":"Category"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_NetPnlWindows_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/summary":{"get":{"tags":["Analytics"],"summary":"Trader Performance Summary","description":"Trader'ın belirtilen dönemdeki performans özetini döner.\nPnL, ROE, Win Rate, Sharpe Ratio, Max Drawdown, Profit Factor vb.\nPublic endpoint.","operationId":"Trader_Performance_Summary_analytics_trader__trader_id__summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","description":"daily|weekly|monthly|yearly","default":"weekly"},"description":"daily|weekly|monthly|yearly"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"title":"Category"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ModeEnum","description":"gross|net","default":"net"},"description":"gross|net"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_SummaryMetrics_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/timeseries":{"get":{"tags":["Analytics"],"summary":"Trader Performance Timeseries","description":"Trader'ın belirtilen tarih aralığında interval bazında kümülatif PnL,\ntrade count ve win rate time series verisi.\nCursor-based pagination destekler.","operationId":"Trader_Performance_Timeseries_analytics_trader__trader_id__timeseries_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (ISO)","title":"From"},"description":"Start date (ISO)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (ISO)","title":"To"},"description":"End date (ISO)"},{"name":"interval","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IntervalEnum","description":"1h|1d|1w","default":"1d"},"description":"1h|1d|1w"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"title":"Category"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ModeEnum","description":"gross|net","default":"net"},"description":"gross|net"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination (ISO datetime)","title":"Cursor"},"description":"Cursor for pagination (ISO datetime)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Page Size"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_TimeseriesData_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/compare":{"get":{"tags":["Analytics"],"summary":"Compare Traders","description":"Birden fazla trader'ı aynı metriklerle karşılaştır (radar chart için).\nMax 5 trader.","operationId":"Compare_Traders_analytics_trader_compare_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated trader IDs (max 5)","title":"Trader Ids"},"description":"Comma-separated trader IDs (max 5)"},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","default":"weekly"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"title":"Category"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ModeEnum","default":"net"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_CompareData_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/ranking":{"get":{"tags":["Analytics"],"summary":"Trader Ranking","description":"Kullanıcının takımındaki trader'ları ağırlıklı performans skoruna göre sıralar.\nAğırlıklar: Sharpe %30, Win Rate %25, Profit Factor %25, -Max Drawdown %20.\nAuth required.","operationId":"Trader_Ranking_analytics_trader_ranking_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/apps__analytics__trader__enums__PeriodEnum","default":"weekly"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"futures|spot"},{"type":"null"}],"title":"Category"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ModeEnum","default":"net"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_RankingData_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/shop-contribution":{"get":{"tags":["Analytics"],"summary":"Trader Shop Contribution","description":"Trader'ın bağlı olduğu shop'a katkı metrikleri:\nsetup sayısı payı, PnL payı.\nSelf veya admin only.","operationId":"Trader_Shop_Contribution_analytics_trader__trader_id__shop_contribution_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_ShopContribution_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/earnings-summary":{"get":{"tags":["Analytics"],"summary":"Trader Earnings Summary","description":"Trader'ın kazanç özeti: referral, pool, pending, lifetime, payout geçmişi.\nSelf veya admin only.","operationId":"Trader_Earnings_Summary_analytics_trader__trader_id__earnings_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_EarningsSummary_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/{trader_id}/brand-metrics":{"get":{"tags":["Analytics"],"summary":"Trader Brand Metrics","description":"Trader'ın marka metrikleri: takipçi, büyüme, rating, leaderboard pozisyonu.\nSelf veya admin only.","operationId":"Trader_Brand_Metrics_analytics_trader__trader_id__brand_metrics_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_BrandMetrics_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/trader/index/{profile}":{"get":{"tags":["Analytics"],"summary":"Trader Index Members","description":"Returns the active members of the index for a given profile.\nAuth required.","operationId":"get_trader_index_members_analytics_trader_index__profile__get","security":[{"Bearer":[]}],"parameters":[{"name":"profile","in":"path","required":true,"schema":{"type":"string","pattern":"conservative|balanced|aggressive","title":"Profile"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","pattern":"futures|spot","default":"futures","title":"Category"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_IndexMemberOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/stats":{"get":{"tags":["Analytics"],"summary":"Platform Stats","description":"Aggregated platform-level KPIs: users, traders, setups,\nrevenue breakdown, active subscriptions, total shops.\nAdmin only.","operationId":"Platform_Stats_analytics_platform_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|1y)$","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_PlatformStats_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/trends":{"get":{"tags":["Analytics"],"summary":"Platform Trends","description":"Time-series platform metrics: new users, active users,\nsetups, revenue, subscriptions grouped by interval.\nAdmin only.","operationId":"Platform_Trends_analytics_platform_trends_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|1y)$","default":"90d","title":"Period"}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|1w|1m)$","default":"1w","title":"Interval"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_PlatformTrendPoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/setup-analysis/{trader_id}":{"get":{"tags":["Analytics"],"summary":"Trader Setup Analysis","description":"Breakdown of a trader's setups by status, category, and coin.\nIncludes best/worst performing setups.\nAccessible by the trader themselves or admin.","operationId":"Trader_Setup_Analysis_analytics_platform_setup_analysis__trader_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Trader Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(daily|weekly|monthly|yearly)$","default":"monthly","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_SetupAnalysis_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/financial":{"get":{"tags":["Analytics"],"summary":"Platform Financial Stats","description":"Financial health metrics: MRR, churn rate, ARPU,\nnet revenue, commission earned, pending payouts.\nAdmin only.","operationId":"Platform_Financial_Stats_analytics_platform_financial_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_FinancialStats_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/shops-comparison":{"get":{"tags":["Analytics"],"summary":"Shop Comparison","description":"Compare all active shops: subscribers, revenue, win rate,\nchurn rate, avg PnL, boost status.\nAdmin only.","operationId":"Shop_Comparison_analytics_platform_shops_comparison_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_ShopComparisonItem__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/trends/extended":{"get":{"tags":["Analytics"],"summary":"Platform Trends Extended","description":"Extended time-series with revenue breakdown by source\n(subscription, boost, setup_purchase).\nAdmin only.","operationId":"Platform_Trends_Extended_analytics_platform_trends_extended_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|1y)$","default":"90d","title":"Period"}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|1w|1m)$","default":"1w","title":"Interval"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_PlatformTrendPointExtended__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/platform/overview":{"get":{"tags":["Analytics"],"summary":"Public Platform Overview","description":"Public platform overview: total traders, today's setups,\nsuccess rate, top 3 shops. No authentication required.","operationId":"Public_Platform_Overview_analytics_platform_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_PublicOverview_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/shop/{shop_id}/dashboard":{"get":{"tags":["Analytics"],"summary":"Shop Dashboard","description":"Aggregated shop dashboard: revenue, net earnings, subscribers, payouts.\nShop owner or admin only.","operationId":"Shop_Dashboard_analytics_shop__shop_id__dashboard_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_ShopDashboard_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/shop/{shop_id}/trader-performance":{"get":{"tags":["Analytics"],"summary":"Shop Trader Performance","description":"Per-trader performance metrics within a shop.\nShop owner or admin only.","operationId":"Shop_Trader_Performance_analytics_shop__shop_id__trader_performance_get","security":[{"Bearer":[]}],"parameters":[{"name":"shop_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Shop Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_ShopTraderPerformanceItem__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/subscriber/roi":{"get":{"tags":["Analytics"],"summary":"Subscriber Roi","description":"Subscription ROI: per-shop spending, months subscribed, shop win rate, setups received.","operationId":"Subscriber_ROI_analytics_subscriber_roi_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_SubscriptionROI_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/subscriber/copy-trade-performance":{"get":{"tags":["Analytics"],"summary":"Copy Trade Performance","description":"Copy trade performance: active/total trades, PnL, win rate, best/worst, by market.","operationId":"Copy_Trade_Performance_analytics_subscriber_copy_trade_performance_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_CopyTradePerformance_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/subscriber/portfolio/summary":{"get":{"tags":["Analytics"],"summary":"Portfolio Summary","description":"Portfolio summary: PnL, ROE, win rate, trade count for a given period.","operationId":"Portfolio_Summary_analytics_subscriber_portfolio_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d|90d|1y|all)$","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_PortfolioSummary_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/subscriber/portfolio/by-trader":{"get":{"tags":["Analytics"],"summary":"Portfolio By Trader","description":"Portfolio breakdown by trader: PnL, win rate, trade count per trader.","operationId":"Portfolio_By_Trader_analytics_subscriber_portfolio_by_trader_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d|90d|1y|all)$","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_PortfolioByTrader__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/user/dashboard":{"get":{"tags":["Analytics"],"summary":"User Analytics Dashboard","description":"User-specific analytics: growth, churn, engagement,\nretention, funnel, acquisition, and demographics.\nAdmin only.","operationId":"User_Analytics_Dashboard_analytics_user_dashboard_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|1y)$","default":"30d","title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_UserAnalyticsDashboard_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/analytics/user/trends":{"get":{"tags":["Analytics"],"summary":"User Growth Trends","description":"Time-series user growth: new users, churned, net growth,\ncumulative total, active users per interval.\nAdmin only.","operationId":"User_Growth_Trends_analytics_user_trends_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|1y)$","default":"90d","title":"Period"}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|1w|1m)$","default":"1w","title":"Interval"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_UserGrowthTrendPoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ai/chat":{"post":{"tags":["AI Coach"],"summary":"Chat","description":"General-purpose AI Coach chat.\n\nTrader context (active setups + last-30d perf + display name) is built\nserver-side; the client cannot inject it. Optional `focus_coin`\ntriggers a CoinGlass + Arkham snapshot inside llm-chat.","operationId":"chat_ai_chat_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/foxy/chat":{"post":{"tags":["AI Coach"],"summary":"Foxy Chat","description":"Foxy assistant for BottomUP mobile (Bup.AI).\n\nUses the same llm-chat stack as AI Coach (OKX + CoinGlass + Arkham)\nwith the Foxy persona. Customers receive copy-trade positions as\nactive_setups; traders receive their own setups + 30d perf.","operationId":"foxy_chat_ai_foxy_chat_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/foxy/public":{"post":{"tags":["AI Coach"],"summary":"Foxy Public Chat","description":"Foxy for anyone — Chrome extension, no BottomUP account.\n\nSame llm-chat persona as mobile Foxy, without user setups or personality\ninjection. Rate-limited per IP.","operationId":"foxy_public_chat_ai_foxy_public_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyPublicChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/setup/{setup_id}/explain":{"post":{"tags":["AI Coach"],"summary":"Explain Setup","description":"Generate per-setup commentary by proxying llm-chat's `/ask-ai`.\n\nVerifies the setup belongs to the calling trader before forwarding —\na trader must not be able to ask the AI to comment on someone else's\nsetup.","operationId":"explain_setup_ai_setup__setup_id__explain_post","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupExplainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/health":{"get":{"tags":["AI Coach"],"summary":"Health","description":"Quick probe of the upstream llm-chat service.\n\nPublic-ish: no DB, no chat. Used by the AI Coach UI to show a\n\"service offline\" banner.","operationId":"health_ai_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiHealthResponse"}}}}}}},"/ai/assistant/chat":{"post":{"tags":["AI Coach"],"summary":"Assistant Chat","description":"Backend-owned chat — Phase 2 full ownership (AIGW-03).\n\nOrder of operations (guards run before the upstream call):\n1. _ensure_openai_configured() — 503 if OPENAI_API_KEY is empty\n2. _get_rate_key(context)      — 401 if no authenticated identity\n3. _check_rate_limit(key)      — 429 if window exceeded\n4. identity + _check_daily_quota — 429 if daily quota exceeded (AIGW-10, D-08)\n5. assemble_app_context(...)   — backend pulls 6a context (best-effort, D-08/D-09)\n6. call_openai_chat_v2(...)    — forward to OpenAI with backend-owned prompt/model/trim\n7. _write_usage_bg(...)        — fail-open background write (AIGW-10, D-02)","operationId":"assistant_chat_ai_assistant_chat_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ai/assistant/chat/stream":{"post":{"tags":["AI Coach"],"summary":"Assistant Chat Stream","description":"SSE streaming chat — Phase 3 AIGW-06, retrofitted with quota + usage write (AIGW-10).\n\nStreams OpenAI chat tokens as Server-Sent Events using the unified\ndata: {\"delta\":\"...\"} ... data: [DONE] envelope (D-03).\n\nGuard order (pre-stream — real HTTP status before SSE headers flush, D-09):\n1. _ensure_openai_configured()        → 503 if OPENAI_API_KEY is empty\n2. _get_chat_stream_rate_key(context) → 401 if no authenticated identity\n3. _check_rate_limit(rate_key)        → 429 if window exceeded\n4. identity + _check_daily_quota      → 429 if daily quota exceeded (AIGW-10, D-08)\n\nUsage write (D-03 streaming pattern): a Starlette BackgroundTask is ATTACHED to the\nStreamingResponse (not request-scoped BackgroundTasks) so it fires AFTER the body is\nfully consumed.  The usage_holder is passed by OBJECT (not pre-read values) to avoid\neager evaluation to zeros (cross-AI review cycle-2 MED).\n\nMessage assembly uses the shared _build_chat_messages() helper so the\nmessages list is byte-identical to the non-stream /chat path (D-02 parity).\n\nNo response_model — StreamingResponse is incompatible with Pydantic models.\nNo responses=GeneralResponses — once SSE headers flush, errors go in-band.","operationId":"assistant_chat_stream_ai_assistant_chat_stream_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/assistant/crypto/stream":{"post":{"tags":["AI Coach"],"summary":"Assistant Crypto Stream","description":"ChainGPT SSE crypto stream — Phase 3 AIGW-07, retrofitted with quota + usage write (AIGW-10).\n\nProxies ChainGPT /chat/stream into the unified data: {\"delta\":\"...\"} … data: [DONE]\nenvelope (D-05) using a defensive dual-shape buffered-line parser.\n\nBackend owns the full ChainGPT prompt (D-04): identity prefix + flattened\nUser:/Assistant: history trimmed to the last 8 non-empty turns + current message.\nNo app_state injection — crypto stream is app-context-free (D-07).\n\nGuard order (pre-stream — real HTTP status before SSE headers flush, D-09):\n1. _ensure_chaingpt_configured()          → 503 if CHAINGPT_API_KEY is empty\n2. _get_crypto_stream_rate_key(context)   → 401 if no authenticated identity\n3. _check_rate_limit(rate_key)            → 429 if window exceeded\n4. identity + _check_daily_quota          → 429 if daily quota exceeded (AIGW-10, D-08)\n\nUsage write (D-03 streaming pattern): a Starlette BackgroundTask attached to the\nStreamingResponse fires after the body is fully consumed; usage_holder is passed\nby OBJECT to avoid eager evaluation (cross-AI review cycle-2 MED).\n\nNo response_model — StreamingResponse is incompatible with Pydantic models.\nNo responses=GeneralResponses — once SSE headers flush, errors go in-band.\ndb Depends added (Pitfall 7 — quota check requires the DB session).","operationId":"assistant_crypto_stream_ai_assistant_crypto_stream_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoStreamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai/assistant/classify":{"post":{"tags":["AI Coach"],"summary":"Assistant Classify","description":"Server-side classification — AIGW-04 (plan 02-05), retrofitted with quota + usage write (AIGW-10).\n\nDiscriminated by kind ('crypto' | 'trader_query'):\n- crypto      → returns { is_crypto: bool, tags: str }\n- trader_query → returns the 7-field discriminator dict\n\nGuard order (same pattern as /chat):\n1. _ensure_openai_configured()   — 503 if OPENAI_API_KEY is empty\n2. _get_classify_rate_key(context) — 401 if no identity; ai_rl:classify:* prefix\n3. _check_rate_limit(key)          — 429 if window exceeded\n4. identity + _check_daily_quota   — 429 if daily quota exceeded (AIGW-10, D-08)\n5. classify_message(...)           — fail-soft: any error → HTTP 200 + safe default (D-06)\n6. _write_usage_bg(...)            — ONLY if upstream call actually ran (usage_holder populated)\n\nThe fail-soft applies ONLY to the upstream OpenAI call and JSON parse path.\nRate-limit and auth guards still return 429 / 401 as expected.\n\nCLASSIFY FAIL-SOFT RULE (cross-AI review MED): when classify_message returns the safe\ndefault (upstream failed, no OpenAI call completed), usage_holder remains empty.\nOnly schedule the usage write when usage_holder was populated — no phantom usage rows\nfor calls that never reached OpenAI (D-06 integrity).","operationId":"assistant_classify_ai_assistant_classify_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ai/assistant/analyze":{"post":{"tags":["AI Coach"],"summary":"Assistant Analyze","description":"Server-side analyze — AIGW-05 (plan 02-06), retrofitted with quota + usage write (AIGW-10).\n\nDiscriminated by analysis_type ('team' | 'trader' | 'app_status' | 'recommend_team', D-07).\nAssembles 6a context from the backend DB + live market feed (graceful degradation — D-09),\nselects the per-type analyze prompt template, and calls gpt-4.1-mini.\n\nGuard order:\n1. _ensure_openai_configured()    — 503 if OPENAI_API_KEY is empty\n2. _get_analyze_rate_key(context) — 401 if no identity; ai_rl:analyze:* prefix\n3. _check_rate_limit(key)         — 429 if window exceeded\n4. identity + _check_daily_quota  — 429 if daily quota exceeded (AIGW-10, D-08)\n5. assemble_analyze_context(...)  — backend pulls 6a context (best-effort, D-08/D-09)\n6. call_openai_analyze(...)       — per-type prompt + OPENAI_ANALYZE_MODEL call\n7. _write_usage_bg(...)           — fail-open background write (AIGW-10, D-02)\n\nSecurity invariants:\n- User-owned context (positions/team) is scoped strictly to context.user.id.\n- AnalyzeRequest has NO user_id and NO team_id fields — body cannot widen access.\n- recommend_team candidates are the PUBLIC trader listing (fetch_recommendation_candidates).\n- trader_id selects only PUBLIC trader profile data (assemble_analyze_context layer).\n(T-02-06-EXFIL mitigated; see threat register in 02-06-PLAN.md)","operationId":"assistant_analyze_ai_assistant_analyze_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ai/assistant/translate":{"post":{"tags":["AI Coach"],"summary":"Assistant Translate","description":"Server-side Google Translate v2 proxy — AIGW-08 (Phase 5).\n\nProxies Google Translate v2 server-side so the GOOGLE_TRANSLATE_API_KEY\nnever reaches the client (T-5-04). Always sends format=text (Pitfall 3).\n\nGuard order (D-08):\n1. _ensure_google_configured()     → 503 if GOOGLE_TRANSLATE_API_KEY is empty\n2. _get_translate_rate_key(context) → 401 if no authenticated identity\n3. _check_rate_limit(rate_key)      → 429 if Redis window exceeded\n4. identity = _get_identity_string() → \"user:<id>\" or \"guest:<device_id>\"\n5. _check_daily_quota(identity, db) → 429 if daily count >= limit (pre-request, D-08)\n6. call_google_translate(...)       → proxy Google, map errors per D-15\n7. background_tasks.add_task(...)  → write ai_usage row, fail-open (D-02)\n\nSecurity:\n- API key never returned in response or logged (T-5-04).\n- Guest spoofing blocked by \"default\" device-id sentinel in _get_identity_string (T-5-05).\n- Cost amplification mitigated by TranslateRequest.text max_length=5000 + quota pre-check (T-5-06).","operationId":"assistant_translate_ai_assistant_translate_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ai/assistant/detect-language":{"post":{"tags":["AI Coach"],"summary":"Assistant Detect Language","description":"Language detection via Google Translate v2 — AIGW-08 (Phase 5).\n\nProxies Google Translate v2 /detect server-side so the GOOGLE_TRANSLATE_API_KEY\nnever reaches the client (T-5-04).\n\nGuard order (D-08):\n1. _ensure_google_configured()       → 503 if GOOGLE_TRANSLATE_API_KEY is empty\n2. _get_detect_rate_key(context)     → 401 if no authenticated identity\n3. _check_rate_limit(rate_key)       → 429 if Redis window exceeded\n4. identity = _get_identity_string() → \"user:<id>\" or \"guest:<device_id>\"\n5. _check_daily_quota(identity, db)  → 429 if daily count >= limit (pre-request, D-08)\n6. call_google_detect(...)           → proxy Google /detect, map errors per D-15\n7. background_tasks.add_task(...)   → write ai_usage row, fail-open (D-02)\n\nThe ai_usage row uses model=\"google-translate-v2\" and char-based prompt_tokens (D-11).","operationId":"assistant_detect_language_ai_assistant_detect_language_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectLanguageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/v1/foxy/policy":{"get":{"tags":["Foxy Institutional"],"summary":"Get Policy","operationId":"get_policy_v1_foxy_policy_get","security":[{"ApiKey":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/health":{"get":{"tags":["Foxy Institutional"],"summary":"Get Foxy Health","operationId":"get_foxy_health_v1_foxy_health_get","security":[{"ApiKey":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/snapshots":{"get":{"tags":["Foxy Institutional"],"summary":"Export Snapshots","operationId":"export_snapshots_v1_foxy_snapshots_get","security":[{"ApiKey":[]}],"parameters":[{"name":"pair","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pair"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FoxySnapshotResponse"},"title":"Response Export Snapshots V1 Foxy Snapshots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/snapshots/{snapshot_id}":{"delete":{"tags":["Foxy Institutional"],"summary":"Delete Snapshot","operationId":"delete_snapshot_v1_foxy_snapshots__snapshot_id__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Snapshot Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/snapshots/{pair}/changes":{"get":{"tags":["Foxy Institutional"],"summary":"Snapshot Changes","operationId":"snapshot_changes_v1_foxy_snapshots__pair__changes_get","security":[{"ApiKey":[]}],"parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string","title":"Pair"}},{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"4h","title":"Window"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyChangesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/snapshots/{pair}":{"get":{"tags":["Foxy Institutional"],"summary":"Get Snapshot","operationId":"get_snapshot_v1_foxy_snapshots__pair__get","security":[{"ApiKey":[]}],"parameters":[{"name":"pair","in":"path","required":true,"schema":{"type":"string","title":"Pair"}},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxySnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/ask":{"post":{"tags":["Foxy Institutional"],"summary":"Ask Foxy","operationId":"ask_foxy_v1_foxy_ask_post","security":[{"ApiKey":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyAskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyAskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/alerts":{"post":{"tags":["Foxy Institutional"],"summary":"Create Alert","operationId":"create_alert_v1_foxy_alerts_post","security":[{"ApiKey":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyAlertCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoxyAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Foxy Institutional"],"summary":"List Alerts","operationId":"list_alerts_v1_foxy_alerts_get","security":[{"ApiKey":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FoxyAlertResponse"},"title":"Response List Alerts V1 Foxy Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/foxy/alerts/{alert_id}":{"delete":{"tags":["Foxy Institutional"],"summary":"Delete Alert","operationId":"delete_alert_v1_foxy_alerts__alert_id__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/setup":{"put":{"tags":["Trade Bot"],"summary":"Create Setup","description":"Create a setup on behalf of a trader. Triggers copy-trade flow.","operationId":"create_setup_trade_bot_setup_put","security":[{"Bearer":[]}],"parameters":[{"name":"X-Trace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Trace-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/setup/trader/{trader_id}":{"get":{"tags":["Trade Bot"],"summary":"List Setups","description":"List setups for a trader, optionally filtered by state.","operationId":"list_setups_trade_bot_setup_trader__trader_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trader Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"incoming or active","title":"State"},"description":"incoming or active"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeBotSetupResponse"},"title":"Response List Setups Trade Bot Setup Trader  Trader Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/setup/{setup_id}":{"get":{"tags":["Trade Bot"],"summary":"Get Setup","description":"Get a single setup by ID.","operationId":"get_setup_trade_bot_setup__setup_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Trade Bot"],"summary":"Update Setup","description":"Update a setup (e.g., move SL to break-even).","operationId":"update_setup_trade_bot_setup__setup_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"X-Trace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Trace-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Trade Bot"],"summary":"Cancel Setup","description":"Cancel an incoming setup.","operationId":"cancel_setup_trade_bot_setup__setup_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"X-Trace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Trace-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/setup/{setup_id}/close":{"patch":{"tags":["Trade Bot"],"summary":"Close Setup","description":"Close an active setup.","operationId":"close_setup_trade_bot_setup__setup_id__close_patch","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"X-Trace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Trace-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeBotSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/copy-trade/setup/{setup_id}":{"get":{"tags":["Trade Bot"],"summary":"Get Copy Trades For Setup","description":"Get all copy trades for a setup.","operationId":"get_copy_trades_for_setup_trade_bot_copy_trade_setup__setup_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CopyTradeResponse"},"title":"Response Get Copy Trades For Setup Trade Bot Copy Trade Setup  Setup Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/copy-trade/user/{user_id}":{"get":{"tags":["Trade Bot"],"summary":"Get Copy Trades For User","description":"Get copy trades for a specific user.","operationId":"get_copy_trades_for_user_trade_bot_copy_trade_user__user_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CopyTradeResponse"},"title":"Response Get Copy Trades For User Trade Bot Copy Trade User  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trade-bot/health":{"get":{"tags":["Trade Bot"],"summary":"Health","description":"Health check with aggregate statistics.","operationId":"health_trade_bot_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[{"Bearer":[]}]}},"/subscription/admin/products":{"get":{"tags":["Subscription"],"summary":"List Products","operationId":"list_products_subscription_admin_products_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","title":"Search"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","default":"-created_at","title":"Order By"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Subscription"],"summary":"Create Product","operationId":"create_product_subscription_admin_products_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/products/{product_id}":{"get":{"tags":["Subscription"],"summary":"Get Product","operationId":"get_product_subscription_admin_products__product_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Subscription"],"summary":"Update Product","operationId":"update_product_subscription_admin_products__product_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Subscription"],"summary":"Delete Product","operationId":"delete_product_subscription_admin_products__product_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/subscriptions":{"get":{"tags":["Subscription"],"summary":"List Admin Subscriptions","operationId":"list_admin_subscriptions_subscription_admin_subscriptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","title":"Search"}},{"name":"market","in":"query","required":false,"schema":{"type":"string","title":"Market"}},{"name":"is_expired","in":"query","required":false,"schema":{"type":"boolean","title":"Is Expired"}},{"name":"is_trial","in":"query","required":false,"schema":{"type":"boolean","title":"Is Trial"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","default":"-created_at","title":"Order By"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSubscriptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/subscriptions/user/{user_id}":{"get":{"tags":["Subscription"],"summary":"List User Subscriptions Admin","operationId":"list_user_subscriptions_admin_subscription_admin_subscriptions_user__user_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSubscriptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/analytics/mrr-trend":{"get":{"tags":["Subscription"],"summary":"Get Mrr Trend","description":"Monthly Recurring Revenue for the last 12 months.","operationId":"get_mrr_trend_subscription_admin_analytics_mrr_trend_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MrrTrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/analytics/status-distribution":{"get":{"tags":["Subscription"],"summary":"Get Status Distribution","description":"Subscription count by status category.","operationId":"get_status_distribution_subscription_admin_analytics_status_distribution_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusDistributionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/analytics/new-subscriptions":{"get":{"tags":["Subscription"],"summary":"Get New Subscriptions","description":"Daily new subscriptions for the last 30 days.","operationId":"get_new_subscriptions_subscription_admin_analytics_new_subscriptions_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscription/admin/analytics/revenue-by-product":{"get":{"tags":["Subscription"],"summary":"Get Revenue By Product","description":"Total revenue grouped by product (top 10).","operationId":"get_revenue_by_product_subscription_admin_analytics_revenue_by_product_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueByProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks":{"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Allowed: Customer, Trader, Admin\n\nCreate a new webhook subscription.","operationId":"create_webhook_webhooks_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreatedOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"Allowed: Customer, Trader, Admin\n\nList user's webhooks.","operationId":"list_webhooks_webhooks_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/webhooks/admin/all":{"get":{"tags":["Webhooks"],"summary":"Admin List Webhooks","description":"Allowed: Admin only\n\nList all webhooks with user info.","operationId":"admin_list_webhooks_webhooks_admin_all_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/webhooks/admin/{webhook_id}/deactivate":{"patch":{"tags":["Webhooks"],"summary":"Admin Deactivate Webhook","description":"Allowed: Admin only\n\nDeactivate any webhook.","operationId":"admin_deactivate_webhook_webhooks_admin__webhook_id__deactivate_patch","security":[{"Bearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Allowed: Customer, Trader, Admin\n\nGet webhook detail.","operationId":"get_webhook_webhooks__webhook_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Allowed: Customer, Trader, Admin\n\nUpdate a webhook.","operationId":"update_webhook_webhooks__webhook_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Allowed: Customer, Trader, Admin\n\nSoft-delete a webhook.","operationId":"delete_webhook_webhooks__webhook_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List Deliveries","description":"Allowed: Customer, Trader, Admin\n\nList delivery history for a webhook.","operationId":"list_deliveries_webhooks__webhook_id__deliveries_get","security":[{"Bearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Test Webhook","description":"Allowed: Customer, Trader, Admin\n\nSend a test event to the webhook URL.","operationId":"test_webhook_webhooks__webhook_id__test_post","security":[{"Bearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Webhook Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/links/share":{"post":{"tags":["Links"],"summary":"Share","description":"Mint (or adopt) a share link for one of the caller's own entities.\n\n``ContextModel.user`` is a ``UserMeBase`` and does not carry\n``referral_code``, so the ORM row is loaded explicitly here — this is\nthe one place in the request that touches the database directly; the\nresolve/insert/mint sequence itself lives in ``create_share_link``.","operationId":"share_links_share_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/links/onelink":{"post":{"tags":["Links"],"summary":"Onelink","description":"Shorten a OneLink the caller's mobile app already generated (Phase 95\n/ OLNK-01..OLNK-05).\n\nNamed after the narrow input class it accepts — never a general-sounding\nname like ``/links/shorten``, which would name-squat a \"shorten\nanything\" capability this endpoint does not have and would invite a\nfuture \"shorten anything\" feature to be added as a branch here (the\nexact trust-model merge D-95-1 exists to prevent; rated a COSTLY\nreversibility because mobile codes against this path and the two\nclients are on different release trains).\n\nJoins the SAME ``router`` object as ``share``/``resolve`` above (never a\nnew ``APIRouter``, never ``admin_router``), inheriting the ``/links``\nmount's per-IP rate limit with ZERO changes in ``app/apps/endpoints.py``\n— the traffic this door sees is the same authenticated mobile share\ntraffic ``/links/share`` sees. The door's OWN independent control is the\nper-user layer inside ``create_onelink_share`` (D-95-10, plan 95-01's\nown knob), not a second IP budget.\n\nThe handler holds no logic beyond loading the ORM ``User`` row (the same\nreason ``share`` above does it explicitly — ``ContextModel.user`` does\nnot carry the fields the door needs) and delegating.","operationId":"onelink_links_onelink_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneLinkShortenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/links/resolve/{slug}":{"get":{"tags":["Links"],"summary":"Resolve","description":"Resolve a ``bupl.ink`` slug to its entity (Phase 94 / DEEP-03).\n\nPublic, unauthenticated and read-only — no ``Depends(get_current_active_user)``\nat all, because a Universal Link tap has no session by the time it fires: a\ncold-start deep link reaches this endpoint before the app has authenticated\nanyone. It joins the SAME ``router`` object as ``share`` above (never a new\n``APIRouter()``, never ``admin_router``), so it inherits the per-IP rate\nlimit already declared on the ``/links`` mount in ``app/apps/endpoints.py``\nwith zero changes there. It makes no outbound HTTP call of any kind — no\nSink call, nothing that could add Sink's latency or failure modes to the\nsynchronous tap-to-open path the just-opened app is blocked on.\n\n``accept_language`` is read directly off ``request.headers`` rather than\nvia ``caller_language``, which is a ``ContextModel`` accessor — this route\nhas no authenticated caller and therefore no ``ContextModel`` to read.\n\nThe row is fetched by ``slug`` alone (never with ``is_deleted`` also\nfiltered in SQL) so the row's REAL ``is_deleted`` is what reaches\n``derive_lifecycle_status`` — a query-side filter would constant-fold that\ninput and make the ``deleted`` branch unreachable. The verdict comes from\nthat one shared function and nothing else; a resolve-specific rule would\nbe a second lifecycle derivation the two can silently drift from Phase\n92's sixteen-combination Python/SQL agreement proof. Anything other than\n``LinkLifecycleStatus.ACTIVE`` — unknown, deleted, disabled, orphaned,\nfailed or pending — refuses with the identical generic ``link_not_found``\n404 (T-94-01): one refusal for every reason, so a slug scanner learns\nonly exists/does-not-exist, never the state.\n\n``expires_at`` is deliberately NOT read here: it is not an input to\n``derive_lifecycle_status``. Phase 93 D-17 / R-M-3's hourly\n``links-expire-sweep`` materializes an expiry by writing ``disabled_at``,\nso an otherwise confirmed row past its ``expires_at`` but not yet swept\nis still ACTIVE and resolves 200 for up to about an hour — an inherited,\nintentional grace window, not a bug in this route.\n\nNORMALIZATION (T-94-04, the input-edge matrix): the incoming path\nsegment is lowercased before comparison — mirroring the two existing\nauthorities that already lowercase, ``validate_admin_slug`` (lowercases\nbefore persist) and 93-01's check 10 (the deployed Sink instance was\nmeasured lowercasing a mixed-case create server-side) — and refused with\nthe coded 404 when empty or longer than ``_SLUG_STORAGE_LENGTH``,\nBEFORE any query runs. Only the INPUT is lowercased: the filter compares\nthe normalized value against ``ShortLink.slug`` directly, never wrapped\nin a SQL ``lower()``, which would drop ``uq_short_link_slug`` from the\nquery plan and turn a hot tap-path lookup into a scan. A `{slug}`\nconverter matches exactly one path segment — a slash-bearing request\nnever reaches this handler at all; it is answered by ``app/main.py``'s\n``StarletteHTTPException`` handler with a bare, uncoded 404 (M-4).","operationId":"resolve_links_resolve__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResolveResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links":{"post":{"tags":["Admin Links"],"summary":"Admin Create Link","description":"``POST /admin/links`` — mint a real, resolving ``bupl.ink`` short\nlink for an arbitrary validated https target (ADMW-01, ADMW-05,\nADMW-06). The tracer this plan proves end to end; every other write\nroute in this phase reuses this route's validator, its audit writer,\nand (for edit) its savepoint ordering.\n\nORDERING D — the slug is committed to a durable Sink-operation\nreservation BEFORE the await, rather than to ``short_link``. The\nreservation has its own unique ``active_target_slug`` key, so a second\nrequest fails promptly without touching ``uq_short_link_slug``. The\nlocal row is inserted only after Sink answers; therefore no synchronous\nunique-index wait can block the event loop that must resume the awaited\nSink call. The operation's lease and recovery worker preserve the same\ndurable evidence if the request is cancelled or a post-Sink commit fails.\n\nR-H-2 — THE SLUG IS RESERVED BEFORE THE UPSTREAM CALL, NEVER ASSIGNED\nFROM ITS RESPONSE. The slug is decided (operator-supplied and already\nvalidated by the schema, or minted by ``generate_admin_slug()``) BEFORE\nthe durable operation is committed. A collision on an AUTO-GENERATED\nslug (operation reservation, local `IntegrityError`, OR a Sink 409) is\nretried with a fresh slug, bounded by\n``MAX_SLUG_ALLOCATION_ATTEMPTS`` — an operator who supplied no slug\ncannot act on \"that slug is taken\". A collision on an\nOPERATOR-SUPPLIED slug is NEVER retried; D-15/D-16 both require that\nrefusal reach the caller as a 409. NOTHING ELSE IS EVER RETRIED: a\ntransport failure or any other non-2xx/non-409 response might mean Sink\nalready created the link, so a retry could mint a second live one.\n\nD-18 ASYMMETRY (stated as a rule, because \"retry on failure\" and \"make\nedit match create\" are both the reflex a later reader will otherwise\napply): a create that cannot reach Sink at all, or gets a non-409\nnon-2xx, KEEPS its row (``sink_status='failed'``, the slug still\nreserved, HTTP 502) — Sink does not reserve a deleted or failed slug at\nall (measured, 93-01 check 9), so the reservation is entirely ours to\nkeep or lose. An edit that cannot reach Sink (93-03) writes NOTHING at\nall (D-03) — a stale local target there would be silent divergence, not\na reservation. Do not make one match the other.\n\nR-C4-5 — A SLUG MISMATCH FAILS CLOSED. If Sink's response echoes a\nDIFFERENT slug than the one sent, the savepoint is rolled back, NO row\nis kept, and the response is 502 — never `confirmed` on a slug that does\nnot exist upstream (which would leave `bupl.ink/<returned>` resolving\nforever with no local row able to manage it). The mismatch is recorded\nDURABLY: one audit row with a SYSTEM actor, naming both slugs, written\nin its OWN transaction after the rollback (the same `db` session\nnaturally starts a fresh transaction on the next `db.add()` once\n`db.rollback()` has run) — because a stray live link on the platform's\ntrusted short domain is exactly the forensic fact D-13 chose a table\nover the rolling request log for. Compensation is an OPERATOR action:\n``SinkClient.delete_link`` does not exist until 93-03/wave 3, so there is\nno client method here to remove the stray automatically. 93-06's enable\nroute (wave 4) carries the same durable-record rule and CAN compensate,\nbecause `delete_link` exists by then.","operationId":"admin_create_link_admin_links_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Admin Links"],"summary":"Admin List Links","description":"``GET /admin/links`` — the filtered, exactly-totalled, single-fixed-\ntotal-order list surface (ADMR-01). D-17: ``created_at DESC, id DESC``\nis the ONLY order this route offers; there is no ``order_by`` query\nparameter and no clicks-based sort.\n\nA deviation from the plan's stated 422s, consistent with\n``admin_get_link``'s already-documented finding (see\n``tests/test_admin_links_read_surface.py``): every pydantic/FastAPI-\ndriven query-param validation failure (a malformed ``user_id`` UUID, an\nout-of-enum ``lifecycle_status``/``origin``, an out-of-bounds\n``skip``/``limit``) raises ``RequestValidationError``, which this app's\nglobal handler (``app/main.py``) renders as **400**, not 422. Only\n``entity_type`` — checked manually against ``ENTITY_URL_REGISTRY``,\nnever a pydantic type — actually reaches a real 422 via a raised\n``HTTPException``.","operationId":"admin_list_links_admin_links_get","security":[{"Bearer":[]}],"parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"}},{"name":"lifecycle_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LinkLifecycleStatus"},{"type":"null"}],"title":"Lifecycle Status"}},{"name":"origin","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LinkOrigin"},{"type":"null"}],"title":"Origin"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShortLinkAdminListItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links/{link_id}":{"patch":{"tags":["Admin Links"],"summary":"Admin Edit Link","description":"``PATCH /admin/links/{link_id}`` — edit a published admin link's\ntarget, comment and/or expiry in one request (ADMW-02). Reuses\n``admin_create_link``'s gate declaration, savepoint discipline,\n``record_link_audit`` call and ``_assemble_admin_detail`` return.\n\nD-18/D-03 ASYMMETRY, STATED SO AN EXECUTOR DOES NOT NORMALISE IT AWAY:\na create that cannot reach Sink at all KEEPS its row (D-18) — the slug\nstays reserved because Sink does not reserve a failed/deleted slug\neither, and losing the reservation would make it hijackable. An edit\nthat cannot reach Sink writes NOTHING at all (D-03): a stale local\ntarget here would be silent divergence, not a reservation, and this\nroute is the case D-03 was written for. Neither is a bug in the\nother's shape.\n\nORDER OF OPERATIONS — every guard runs before any upstream call and\nbefore any local write:\n\n1. **Origin (R-H-3).** Any row whose ``origin`` is not ``'admin'`` is\n   refused 409. An ``api``-origin row's destination is derived from\n   ``ENTITY_URL_REGISTRY`` precisely so no caller can supply one, so\n   re-pointing it here would merge the two trust models through the\n   admin door; ``create_share_link`` also has no ``disabled_at``\n   awareness at all, so touching such a row's lifecycle here would\n   hand that user a permanently dead share link with no path to\n   re-mint. A ``sink``-origin row is removable in the Sink dashboard\n   that minted it; giving either class its own admin operations is a\n   NEW decision, not a relaxation of this one.\n2. **Sweep claim (R-H-4), read-time half.** A row whose\n   ``sink_lease_until`` is in the future is refused 409. This is a\n   FAST-FAIL that saves two wasted upstream round trips when the\n   collision is already visible — it is NOT what serializes this\n   route against the expiry sweep (plan 93-07). It is a plain read;\n   the sweep's claim is a committed compare-and-swap in the Celery\n   worker, and the span between this guard and this request's commit\n   contains both upstream calls below. The interleaving this guard\n   cannot stop: it sees no lease, the sweep claims and deletes\n   upstream, and this request commits an extended ``expires_at`` and\n   returns 200 — a local row reading `active` with a future expiry,\n   an audit row recording a successful admin extension, and no link\n   at the other end. THE COMMIT-TIME CONDITIONAL UPDATE BELOW IS THE\n   SERIALIZATION POINT. Both halves ship together; do not delete one\n   as redundant, and do not describe this read-time guard as\n   \"serializing\" anything anywhere else in this codebase.\n3. Soft-deleted rows are refused 409 (not 404 — the read surface\n   deliberately keeps a soft-deleted row visible).\n4. Slugless rows are refused 409 — there is nothing upstream to edit.\n5. **Disabled-row disposition (C4-1), settled explicitly in both\n   directions.** A comment-or-expiry-ONLY edit on a disabled row is\n   PERMITTED and does NOT resurrect it: ``disabled_at`` stays\n   untouched, no upstream call is made, and the row keeps rendering\n   `disabled` — an operator adjusting metadata on a parked link is a\n   legitimate act, and the resurrection path is\n   ``POST /{id}/enable``, not this route. A TARGET edit on a disabled\n   row is refused 409, ordered BEFORE the upstream read — D-04 removed\n   the upstream link deliberately, so falling through to the\n   \"upstream absent/unreadable\" arm would return an unhelpful 502 for\n   a state this code knows exactly. This is what keeps this route\n   safe from 93-07's inverted sweep ordering (which commits\n   ``disabled_at`` before it removes the link upstream): an\n   expiry-only ``PATCH`` landing in that window lands on a row that is\n   already disabled, and a 200 there is honest because it never\n   claimed the link resolves.\n\nAn explicit ``null`` on ``canonical_url`` is refused 400 — that field\nbacks a ``NOT NULL`` column and clearing a link's destination is not a\nrepresentable state.\n\nUPSTREAM CALL (target-changing edits only). A ``SELECT ... FOR UPDATE``\non this exact local row is acquired BEFORE ``get_link`` and held through\nthe Sink replacement and local commit. Sink exposes no documented\nconditional-write token, so this durable database lock is the\nserialization authority for two admin target edits: a waiter reloads the\ncommitted row before it can read Sink, and its audit records the target\nit actually replaces. ``get_link`` then reads FIRST; a non-200 response\nor a transport failure refuses the WHOLE request 502 — a blind edit would\ndestroy upstream configuration this project does not model, and Phase 92's\nsweep proved such links exist.\nThe passthrough mapping is built from the read body (excluding the\nfive always-present structural keys); any key in it that is NOT in\n``SINK_EDIT_KNOWN_OPTIONAL_FIELDS`` — a field COVERAGE.md never\nreviewed — refuses the edit 409 rather than risk silently destroying\nconfiguration this project has no decision about. Otherwise\n``edit_link`` is called with the new target, the row's slug (never\neditable), and that passthrough mapping — ``edit_link`` itself filters\nit down to ``SINK_EDIT_PASSTHROUGH_FIELDS`` (comment only). A 404\nresponse means the link is absent upstream; a 409 means a genuine\nconcurrent modification (textually distinct from both slug-conflict\nmessages ``admin_create_link`` raises); anything else is 502. The\nlocal row is NOT touched until the upstream write succeeds — a\ncomment-or-expiry-only edit makes no upstream call at all, because the\nupstream holds neither fact under this phase's decisions.\n\nTHE COMMIT-TIME CONDITIONAL UPDATE (N-2) — the lifecycle guard after\nthe target-edit row lock. Applies exactly the fields whose keys were\npresent in the request as a single conditional ``UPDATE`` (never as ORM\nattribute assignment), whose ``WHERE`` re-asserts, UNDER THE ROW LOCK: the row\nid, lease-freeness (re-evaluated at THIS moment, not the read-time\nguard's), ``is_deleted IS FALSE``, ``origin='admin'``, and — on a\ntarget edit — ``disabled_at IS NULL`` (C4-8: these are exactly the\nmutable predicates this route's own guards already read, so a\nconcurrent admin ``DELETE``/disable landing between the guards and\nthis UPDATE is caught here too, which the lease clause alone cannot\ndo). Rowcount 1 records the audit row inside the same savepoint and\ncommits. Rowcount 0 means a lifecycle premise moved — the sweep claimed\nthe row, or a competing non-target admin write landed first — and the response is\ndeliberately CAUSE-AGNOSTIC (the same lease 409 guard 2 raises): the\nhonest message is \"this link changed while your request was in\nflight, re-read it and retry\"; the log line at that call site names\nwhich case it was, for an investigator, without the API leaking a race\ntaxonomy to the caller. Under READ COMMITTED the target-edit lock\nserializes competing Sink replacements, while both sides' lifecycle\nwrites remain conditional ``UPDATE``s on the same row (mirroring\n``apps.links.tasks._claim_candidate``'s own documented reasoning,\napplied from the request side): the second one blocks on the row\nlock, re-evaluates its ``WHERE`` against the just-committed row, and\nupdates zero rows. Losing the race writes nothing while the sweep\ncompletes its disable; winning it makes the sweep's own claim\npredicate false, so the sweep makes no upstream call at all — exactly\none writer wins either way, and neither outcome leaves a local row\nclaiming `active` for a link that is gone upstream.","operationId":"admin_edit_link_admin_links__link_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminEditLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Admin Links"],"summary":"Admin Delete Link","description":"``DELETE /admin/links/{link_id}`` — remove a link upstream and mark\nit deleted, WITHOUT ever hard-deleting the row (ADMW-04, D-05).\n\nD-05: irreversible by design — `POST /{link_id}/enable` refuses a\nsoft-deleted row explicitly. If an operator ever needs otherwise that\nis a new decision, not a bug fix.\n\nADMW-04's WHOLE MECHANISM: 93-01 measured that the upstream hard-deletes\na removed slug and clears its own tombstone on the next successful\ncreate, so a slug freed by this delete is immediately re-mintable\nupstream to ANY destination, by anyone. The reservation against that is\nENTIRELY OURS — `uq_short_link_slug`'s partial unique index over a row\nthat this route never hard-deletes. A create requesting this row's slug\nafter this call returns 409 with no upstream call ever made (see\n`admin_create_link`'s local-`IntegrityError` branch); that is the\nentirety of ADMW-04.\n\nSame shape as disable otherwise: the upstream removal happens first\n(no savepoint held across it, since there is nothing here to reserve\nand nothing to roll back), and the ledger-aware idempotency branch\n(C4-1, `_apply_removal_action`) retries an owed or abandoned removal on\na row already deleted rather than reporting a bare no-op.\n\nSets BOTH `is_deleted` and `disabled_at` on success — never `is_deleted`\nalone — so the intent is legible in the raw columns without cross-\nreferencing the audit log.\n\nSame guard order and the same commit-time serialization point as\ndisable (N-2, C4-8), except this route's own commit-time precondition\nis `is_deleted IS FALSE` (already part of the shared base predicate,\nnot an additional clause) rather than a `disabled_at IS NULL` check —\na row that is already disabled but not yet deleted is a perfectly\nvalid starting point for a delete.","operationId":"admin_delete_link_admin_links__link_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Admin Links"],"summary":"Admin Get Link","description":"One admin detail read (ADMR-02), the tracer this plan proves end to\nend. D-17 session/HTTP shape inherited from Phase 91: ``async def``\nendpoint + SYNC ``Session = Depends(get_db)``, staying out of\n``order_routing``'s asyncpg zone entirely.","operationId":"admin_get_link_admin_links__link_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links/{link_id}/disable":{"post":{"tags":["Admin Links"],"summary":"Admin Disable Link","description":"``POST /admin/links/{link_id}/disable`` — stop a link resolving\nwithout ever hard-deleting its row (ADMW-03, D-04).\n\nThe upstream removal happens FIRST; only its measured success permits\nthe local write. Disable does NOT hold a savepoint across the upstream\ncall the way `admin_create_link` does — there is nothing to reserve\nhere and nothing to roll back, so this is a different shape from\ncreate on purpose.\n\nReversible (unlike delete): `POST /{link_id}/enable` re-mints the same\nslug. Idempotent, but LEDGER-AWARE (C4-1) rather than a bare no-op — see\n`_apply_removal_action`'s docstring for why a plain no-op on a row whose\n`sink_status` is `pending`/`failed` would leave a link resolving\nforever while this route's own payload claims it is disabled.\n\nGuards, in order, each with its own message: origin (R-H-3, this\nsurface only ever disables `origin='admin'` rows — `create_share_link`\nhas no `disabled_at` awareness at all, so disabling an `api`-origin row\nwould hand that user a permanently dead share link with no re-mint\npath); the expiry sweep's lease, read-time fast-fail (R-H-4 — NOT the\nserialization point, see below); slugless (nothing upstream to\nremove).\n\nTHE COMMIT-TIME CONDITIONAL UPDATE IS THE SERIALIZATION POINT (N-2,\nC4-8), not the read-time lease guard above. Its `WHERE` re-asserts,\nunder the row lock, at the moment of writing: the row id,\nlease-freeness, `is_deleted IS FALSE`, `origin='admin'`, and\n`disabled_at IS NULL` (this route's own precondition — a concurrent\ndelete already disables too, so a second disable landing after it must\nnot overwrite the timestamp). Rowcount 0 means the sweep claimed the\nrow (and may already have removed the link upstream) or another admin\nwrite landed first; the savepoint rolls back, nothing is written, no\naudit row is added, and the response is the same lease 409 the\nread-time guard raises.","operationId":"admin_disable_link_admin_links__link_id__disable_post","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links/{link_id}/enable":{"post":{"tags":["Admin Links"],"summary":"Admin Enable Link","description":"``POST /admin/links/{link_id}/enable`` — re-mint a disabled link's\nEXISTING slug (ADMW-03, D-04). The sharpest edge in this phase: the\nslug has been free upstream since the disable (93-01 measured that the\nupstream reserves nothing for a removed slug), so another party may\nhold it now. That is why the local row is never flipped until the\nre-mint actually confirms, and why a lost race surfaces as a 409 with\nthe row left disabled — never a silent success and never a silent\nre-point.\n\nGUARD ORDER IS PART OF THE CONTRACT — two of these guards can both be\ntrue on one row, and the operator needs the message naming the thing\nthey must fix FIRST:\n\n1. Origin (R-H-3) and the expiry sweep's lease, read-time fast-fail\n   (R-H-4) — exactly as disable/delete.\n2. Soft-deleted -> 409 naming D-05's irreversibility explicitly, so a\n   later reader cannot mistake this for an accident of a filter.\n3. Slugless -> 409.\n4. Still-expired (N-6), FIRST of the two state guards. Without this\n   guard a deliberate enable is silently undone by the next hourly\n   sweep run, forever — one upstream mint and one upstream delete per\n   hour, with nothing anywhere naming the expiry as the cause. The\n   full operator sequence for reviving an expired link (C4-2, never\n   written down before this revision): `PATCH expires_at` to null or a\n   future value, THEN `POST /{link_id}/enable`.\n5. Unconfirmed upstream removal (C4-1): a disabled row whose\n   `sink_status` is `pending` or `failed` is refused, with NO upstream\n   call at all — re-minting while a removal is still owed or in flight\n   risks the very retry that follows deleting the link this request\n   just created. The remedy is named: wait for the sweep, or call\n   `POST /{link_id}/disable` first (task 1's ledger-aware retry).\n\nA row that is BOTH expired AND removal-unconfirmed gets the EXPIRY\nmessage (guard 4 fires before guard 5) — the operator is told the\nFIRST thing to fix, not the second.\n\nTHE ALREADY-ACTIVE BRANCH PROBES THE UPSTREAM ON PURPOSE (N-3) — IT IS\nNOT A BARE NO-OP. A row with `disabled_at IS NULL` and `sink_status`\nalready `confirmed` (guard 5 already excluded pending/failed) is\nEXACTLY the shape 93-07 names this route as the recovery for: a\nrequest route's own crash window (disable/delete keep upstream-first\non purpose, so a process death between the upstream delete and the\nlocal commit lands here) or a stale delete arriving after an earlier\nenable (93-07's one accepted residual). Post cycle-5's inversion the\nexpiry sweep no longer produces this shape at all (C6-3) — a\ndeclining write-back there deletes nothing — so a `disabled_at`-only\ncheck would return 200, make no upstream call, re-mint nothing, and\nwrite no audit row on precisely the row this route exists to fix.\n`get_link(slug)` decides the branch: present-and-matching is a true\nno-op; the measured absent status falls through to the SAME re-mint\nbelow, with an audit row naming the repair (this is what makes 93-07's\nrecovery real rather than cited); present-but-different fails closed\n(409 — another party holds our slug; enable never adopts or\nre-points); unreadable is 502.\n\nA row that is disabled (and, by guard 5, has a CONFIRMED removal) skips\nthe probe entirely and re-mints directly — the ordinary path.\n\nSee `_remint_and_activate`'s docstring for the re-mint itself: the\nnever-generate-a-fresh-slug rule (R-H-2), the response-slug\ncompare-never-assign rule (N-5), and the stray-disposal-and-durable-\nrecord rule on a mismatch (R-C4-5).\n\nTHE COMMIT-TIME CONDITIONAL UPDATE (N-2, C4-8) is, once again, the\nactual serialization point — not the read-time lease guard above. A\nsweep claim taken during the upstream round trip, or a concurrent\nsoft-delete, produces the same lease 409 and a rolled-back savepoint,\nnever a success on a row the sweep is removing or an admin has just\ndeleted.","operationId":"admin_enable_link_admin_links__link_id__enable_post","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links/{link_id}/audit":{"get":{"tags":["Admin Links"],"summary":"Admin Get Link Audit","description":"``GET /admin/links/{link_id}/audit`` — the full write history of one\nlink (Phase 96 / LAUD-01, LAUD-02, D-01..D-11).\n\nPerforms NO existence check against ``short_link`` (D-03): rows are\nserved straight from ``short_link_audit_log`` filtered on\n``target_link_id`` alone, with no not-found-raising branch anywhere in\nthis handler. This is a forensic requirement, not an omission — a\nsoft-deleted link (every\nother admin read carries ``is_deleted IS FALSE``; reusing that\npredicate would make deleted links unauditable) and a rolled-back\ncreate (R-C4-5: ``record_link_audit``'s own docstring states the\nslug-mismatch arm writes a row naming \"the row it WOULD have been\"\nafter the local row was rolled back) both depend on there being no\nexistence branch here. An unknown ``link_id`` therefore returns 200\nwith ``total_count: 0`` and an empty ``data``, never 404 — the same\nposture as \"known id, no history\", which discloses nothing a superuser\ncould not already see via ``GET /admin/links``.\n\n``actor_admin_id`` in the response is ALWAYS read off the audit row\nitself (``row[0].actor_admin_id``), never from the joined ``User.id``\n(D-04) — the join is a LEFT OUTER JOIN so a deleted actor's row is\nneither dropped nor undercounted in ``total_count``. The resolved\n``actor_name``/``actor_email`` are the actor's CURRENT identity, not\ntheir identity at the time of the action; only ``actor_admin_id`` is a\ntrue immutable snapshot.\n\n``payload`` is returned verbatim with no allowlist (D-05) — a\ndiagnostic key a future writer adds is exposed automatically. Never\nput a secret, token, or raw credential into it (see\n``ShortLinkAuditLog.payload``'s own docstring obligation).\n\nSame 400-not-422 validation posture as every other ``/admin/links``\nroute (D-10): a malformed ``link_id``, an out-of-enum ``action``/\n``actor_kind``, or an out-of-bounds ``skip``/``limit`` all raise\n``RequestValidationError``, rendered as 400 by this app's global\nhandler — never 422.","operationId":"admin_get_link_audit_admin_links__link_id__audit_get","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LinkAuditAction"},{"type":"null"}],"title":"Action"}},{"name":"actor_kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LinkAuditActorKind"},{"type":"null"}],"title":"Actor Kind"}},{"name":"actor_admin_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Admin Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_ShortLinkAuditLogOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links/{link_id}/adopt":{"post":{"tags":["Admin Links"],"summary":"Admin Adopt Link","description":"Adopt a Sink-origin row into the local record (ADMR-05, D-12): the\ndiscovery sweep opens the row with no attribution at all, and this is\nthe superuser's explicit action attaching entity/campaign/owner\nmeaning to it. Makes no Sink call — adoption is a purely local write.\n\nRefuses (409) any row whose ``origin`` is not ``sink``: an ``api``- or\n``admin``-origin row's attribution IS its idempotency identity\n(``uq_short_link_share_identity``), and rewriting it here would\nrepoint a live ledger key out from under whatever already resolved it.\n\nA conflicting attribution tuple is read from the real\n``IntegrityError`` the partial unique index raises, never from a\npre-check ``SELECT`` — a pre-check is a race, and the constraint is the\nonly authority (mirrors the discovery sweep's own insert-or-skip\nsavepoint form, ``app/apps/links/tasks.py``'s ``_apply_discovery``).\n\nWR-01 follow-up (2026-08-21): the WR-01 fix dropped the\n``is_deleted.is_(False)`` filter on ``admin_get_link`` alone, so a\nsoft-deleted row is now visible at ``GET /admin/links/{id}``\n(``lifecycle_status: \"deleted\"``). This route no longer filters\n``is_deleted`` at load time either — otherwise the identical\n``404 \"Link not found\"`` here would mean something different from the\nsibling route's 404 (genuinely absent) for the exact row an operator is\nlooking straight at on the detail page. A genuinely soft-deleted row is\nnow loaded and refused with a distinct 409, never silently re-folded\ninto \"not found.\"","operationId":"admin_adopt_link_admin_links__link_id__adopt_post","security":[{"Bearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkAdminDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/links/reconcile-now":{"post":{"tags":["Admin Links"],"summary":"Admin Reconcile Links Now","description":"Enqueue the discovery sweep on demand (ADMR-05), behind a Redis\nsingle-flight guard, rather than ever walking Sink's listing inline.\n\nThe walk is bounded at ``DISCOVERY_RUN_BUDGET_SECONDS``/\n``DISCOVERY_MAX_PAGES`` (``apps.links.tasks``), and a synchronous admin\nrequest holding a worker for that long would time out at the ingress\nlong before the walk's own budget is spent — hence ``.delay()``, never\nan inline ``await``.\n\n``cache.get_value`` degrades to a logged no-op (returns ``None``) on a\nRedis outage (``core/cache.py``), so a guard read that cannot reach\nRedis must not 500 this route. The chosen failure direction here is\ndocumented, not accidental: with no guard available the route still\nenqueues — an unreconciled listing is the worse outcome, and the task's\nown bounded run budget is the second line of defence against a\nconcurrent-walk fan-out.","operationId":"admin_reconcile_links_now_admin_links_reconcile_now_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key.","operationId":"create_api_key_api_keys_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List user's API keys.","operationId":"list_api_keys_api_keys_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/api-keys/{api_key_id}":{"get":{"tags":["API Keys"],"summary":"Get Api Key","description":"Get API key detail.","operationId":"get_api_key_api_keys__api_key_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Api Key Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["API Keys"],"summary":"Update Api Key","description":"Update an API key.","operationId":"update_api_key_api_keys__api_key_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Api Key Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Revoke (soft-delete) an API key.","operationId":"delete_api_key_api_keys__api_key_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Api Key Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/api-keys/{api_key_id}/rotate":{"post":{"tags":["API Keys"],"summary":"Rotate Api Key","description":"Replace a key secret; the previous secret stops working immediately.","operationId":"rotate_api_key_api_keys__api_key_id__rotate_post","security":[{"Bearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Api Key Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns":{"get":{"tags":["Ad Campaigns"],"summary":"List Campaigns","operationId":"list_campaigns_ads_campaigns_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"","title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"post":{"tags":["Ad Campaigns"],"summary":"Create Campaign","operationId":"create_campaign_ads_campaigns_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}":{"get":{"tags":["Ad Campaigns"],"summary":"Get Campaign Detail","operationId":"get_campaign_detail_ads_campaigns__campaign_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Ad Campaigns"],"summary":"Update Campaign","operationId":"update_campaign_ads_campaigns__campaign_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Ad Campaigns"],"summary":"Delete Campaign Endpoint","operationId":"delete_campaign_endpoint_ads_campaigns__campaign_id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}/submit":{"post":{"tags":["Ad Campaigns"],"summary":"Submit Campaign","operationId":"submit_campaign_ads_campaigns__campaign_id__submit_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}/pause":{"post":{"tags":["Ad Campaigns"],"summary":"Pause Campaign","operationId":"pause_campaign_ads_campaigns__campaign_id__pause_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}/resume":{"post":{"tags":["Ad Campaigns"],"summary":"Resume Campaign","operationId":"resume_campaign_ads_campaigns__campaign_id__resume_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}/cancel":{"post":{"tags":["Ad Campaigns"],"summary":"Cancel Campaign","operationId":"cancel_campaign_ads_campaigns__campaign_id__cancel_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}/clone":{"post":{"tags":["Ad Campaigns"],"summary":"Clone Campaign","operationId":"clone_campaign_ads_campaigns__campaign_id__clone_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/campaigns/{campaign_id}/stats/daily":{"get":{"tags":["Ad Campaigns"],"summary":"Get Daily Stats","operationId":"get_daily_stats_ads_campaigns__campaign_id__stats_daily_get","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/serve":{"get":{"tags":["Ad Campaigns"],"summary":"Serve Ad","operationId":"serve_ad_ads_serve_get","security":[{"Bearer":[]}],"parameters":[{"name":"slot_format","in":"query","required":true,"schema":{"type":"string","description":"banner|listing|push|infeed","title":"Slot Format"},"description":"banner|listing|push|infeed"},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/click":{"post":{"tags":["Ad Campaigns"],"summary":"Record Click","operationId":"record_click_ads_click_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/wallet/transfer":{"post":{"tags":["Ad Campaigns"],"summary":"Transfer Credits To Wallet","operationId":"transfer_credits_to_wallet_ads_wallet_transfer_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/wallet":{"get":{"tags":["Ad Campaigns"],"summary":"Get Wallet","operationId":"get_wallet_ads_wallet_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/wallet/transactions":{"get":{"tags":["Ad Campaigns"],"summary":"Get Wallet Transactions","operationId":"get_wallet_transactions_ads_wallet_transactions_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/targeting/segments":{"get":{"tags":["Ad Campaigns"],"summary":"Get Targeting Segments","operationId":"get_targeting_segments_ads_targeting_segments_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/reach/estimate":{"get":{"tags":["Ad Campaigns"],"summary":"Get Reach Estimate","description":"Estimate potential reach based on targeting criteria.\nReturns min/max range as approximation.","operationId":"get_reach_estimate_ads_reach_estimate_get","security":[{"Bearer":[]}],"parameters":[{"name":"segments","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Segments"}},{"name":"platforms","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Platforms"}},{"name":"countries","in":"query","required":false,"schema":{"type":"string","default":"","title":"Countries"}},{"name":"cities","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cities"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns":{"get":{"tags":["Admin Ads"],"summary":"Admin List Campaigns","operationId":"admin_list_campaigns_admin_ads_campaigns_get","security":[{"Bearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"","title":"Status"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"","title":"Format"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns/pending":{"get":{"tags":["Admin Ads"],"summary":"Admin Pending Queue","operationId":"admin_pending_queue_admin_ads_campaigns_pending_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns/{campaign_id}":{"get":{"tags":["Admin Ads"],"summary":"Admin Get Campaign","operationId":"admin_get_campaign_admin_ads_campaigns__campaign_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns/{campaign_id}/stats/daily":{"get":{"tags":["Admin Ads"],"summary":"Admin Get Daily Stats","operationId":"admin_get_daily_stats_admin_ads_campaigns__campaign_id__stats_daily_get","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns/{campaign_id}/review":{"post":{"tags":["Admin Ads"],"summary":"Admin Review Campaign","operationId":"admin_review_campaign_admin_ads_campaigns__campaign_id__review_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReviewPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns/{campaign_id}/pause":{"post":{"tags":["Admin Ads"],"summary":"Admin Pause Campaign","operationId":"admin_pause_campaign_admin_ads_campaigns__campaign_id__pause_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPauseCancel"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/campaigns/{campaign_id}/cancel":{"post":{"tags":["Admin Ads"],"summary":"Admin Cancel Campaign","operationId":"admin_cancel_campaign_admin_ads_campaigns__campaign_id__cancel_post","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPauseCancel"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/wallet/adjust":{"post":{"tags":["Admin Ads"],"summary":"Admin Adjust Credit","operationId":"admin_adjust_credit_admin_ads_wallet_adjust_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreditAdjustment"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/audit":{"get":{"tags":["Admin Ads"],"summary":"Admin Get Audit Logs","operationId":"admin_get_audit_logs_admin_ads_audit_get","security":[{"Bearer":[]}],"parameters":[{"name":"campaign_id","in":"query","required":false,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/revenue/summary":{"get":{"tags":["Admin Ads"],"summary":"Admin Revenue Summary","operationId":"admin_revenue_summary_admin_ads_revenue_summary_get","security":[{"Bearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date To"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/revenue/by-period":{"get":{"tags":["Admin Ads"],"summary":"Admin Revenue By Period","operationId":"admin_revenue_by_period_admin_ads_revenue_by_period_get","security":[{"Bearer":[]}],"parameters":[{"name":"group_by","in":"query","required":false,"schema":{"type":"string","default":"day","title":"Group By"}},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date To"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/traders":{"get":{"tags":["Admin Ads"],"summary":"Admin Trader Reports","operationId":"admin_trader_reports_admin_ads_traders_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/traders/{trader_id}":{"get":{"tags":["Admin Ads"],"summary":"Admin Trader Detail","operationId":"admin_trader_detail_admin_ads_traders__trader_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"path","required":true,"schema":{"type":"string","title":"Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads":{"get":{"tags":["Admin Ads"],"summary":"Admin List Records","operationId":"admin_list_records_admin_ads_get","security":[{"Bearer":[]}],"parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lang"}},{"name":"page","in":"query","required":false,"schema":{"type":"string","default":"","title":"Page"}},{"name":"campaign","in":"query","required":false,"schema":{"type":"string","default":"","title":"Campaign"}},{"name":"company","in":"query","required":false,"schema":{"type":"string","default":"","title":"Company"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"","title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/ad":{"put":{"tags":["Admin Ads"],"summary":"Create Record","operationId":"create_record_admin_ads_ad_put","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ads"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/ads/ad/{id}":{"patch":{"tags":["Admin Ads"],"summary":"Update Record","operationId":"update_record_admin_ads_ad__id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ads"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"get":{"tags":["Admin Ads"],"summary":"Get Record","operationId":"get_record_admin_ads_ad__id__get","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ads"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"delete":{"tags":["Admin Ads"],"summary":"Delete Record","operationId":"delete_record_admin_ads_ad__id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/copy-trade/funnel":{"get":{"tags":["Admin","Funnel","Admin","Funnel"],"summary":"Period drop-off funnel (superuser only)","description":"D-03: raw shape — do NOT wrap in ResponseMessage.\n\nCanonical path: GET /admin/copy-trade/funnel?period=7d|30d|90d\n(admin_router mounted at /admin in apps/endpoints.py — GAP-5).\n\nReturns an ORDERED LIST of stage objects, one per drop-off category\nin CATEGORIES order. Lifecycle and terminal_outcome are rendered separately.\nAll canonical drop-off categories are always present even when a\ncategory has zero rows in the window (GAP-6 zero-fill guarantee).\nAuth (D-06): superuser-only via get_current_active_superuser (raises 403 for\nnon-superusers at the dependency level; inline guard provides defense-in-depth).\nPeriod (D-10): 7d/30d/90d; unknown value → 400 (app validation handler).\nCache: copy_funnel:period:{period.value} TTL 300s (D-07, D-09).","operationId":"period_funnel_admin_copy_trade_funnel_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":true,"schema":{"$ref":"#/components/schemas/apps__copy_trade__schemas__PeriodEnum"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/copy-trade/funnel/reason-codes":{"get":{"tags":["Admin","Funnel","Admin","Funnel"],"summary":"Raw reason-code breakdown (superuser only)","description":"D-03: raw shape — do NOT wrap in ResponseMessage.\n\nCanonical path: GET /admin/copy-trade/funnel/reason-codes?period=7d|30d|90d\nA SIBLING route to period_funnel (not new keys on its array response) —\nthe console's copy-trade-funnel.ts returns [] for any non-array response,\nand the Phase-23 array shape is locked (D-03).\n\nReturns RAW TogetherService reason codes for the period window:\nreject_reason / okx_error_code counted from failed order_rejected\ncopy_decision_step rows' `detail` (where rejection_events.py persists\nthem), and close_reason counted from CopyTrades.close_reason. Codes are\nnever translated, relabeled, or synthesized here (ADMN-06) — labels live\nin the console.\n\nAuth: superuser-only via get_current_active_superuser + inline is_admin\ndefense-in-depth guard, matching period_funnel/lifecycle_health_report.\nPeriod: 7d/30d/90d; unknown value → 400 (app validation handler).\nNo cache — this is a diagnostics read, not a hot path.","operationId":"reason_code_breakdown_admin_copy_trade_funnel_reason_codes_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":true,"schema":{"$ref":"#/components/schemas/apps__copy_trade__schemas__PeriodEnum"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/copy-trade/funnel/lifecycle-health":{"get":{"tags":["Admin","Funnel","Admin","Funnel"],"summary":"Copy lifecycle health report (superuser only)","description":"Report recent CopyTrades that are missing expected lifecycle rows.","operationId":"lifecycle_health_report_admin_copy_trade_funnel_lifecycle_health_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":true,"schema":{"$ref":"#/components/schemas/apps__copy_trade__schemas__PeriodEnum"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/copy-trade/nudge-conversions":{"get":{"tags":["Admin","Conversion Analytics","Admin","Conversion Analytics"],"summary":"Nudge conversion analytics (superuser only)","description":"Return the precomputed nudge-conversion aggregate from Redis.\n\nNo db dependency: Redis-only read, never computes on request per D-11.\n\nAuth (D-11 / T-30-02): superuser-only via get_current_active_superuser\n(raises 403 at the dependency level); inline is_admin guard provides\ndefense-in-depth against test overrides and future dep changes.\n\nOn cache miss or Redis error: returns HTTP 200 with the empty/partial\nshape produced by the reconciler's own ``_empty_aggregate()`` (per-cohort\n``partial=True``, all rates 0) — never 5xx (GAP-2 / D-11). Sharing the\nproducer's builder guarantees the cold-start and cache-hit responses are\nstructurally identical (CR-01: no per_step/by_step or maturity drift).\n\nCache key: f\"{CACHE_PREFIX_CONVERSIONS}all\"  ==  \"nudge_conv:overall:all\"\n(identical expression to the Plan 30-01 producer — strict key parity,\nREVIEW-LOW cache-key contract).","operationId":"nudge_conversion_analytics_admin_copy_trade_nudge_conversions_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ads":{"get":{"tags":["ads"],"summary":"List Records","operationId":"list_records_ads_get","security":[{"Bearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string","default":"","title":"Page"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/ads/{id}":{"get":{"tags":["ads"],"summary":"Get Record","operationId":"get_record_ads__id__get","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ads"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/news":{"get":{"tags":["Feed"],"summary":"Get News","operationId":"get_news_feed_news_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","default":"","title":"Tag"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/news/{news_id}":{"get":{"tags":["Feed"],"summary":"Get News Detail","description":"Get news detail","operationId":"get_news_detail_feed_news__news_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"news_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"News Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsDetail"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/calendar":{"get":{"tags":["Feed"],"summary":"Get Calendar","operationId":"get_calendar_feed_calendar_get","security":[{"Bearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/calendar/crypto-calendar":{"get":{"tags":["Feed"],"summary":"Get Calendar With Time","operationId":"get_calendar_with_time_feed_calendar_crypto_calendar_get","security":[{"Bearer":[]}],"parameters":[{"name":"utc_offset","in":"query","required":false,"schema":{"type":"integer","maximum":14,"minimum":-12,"deprecated":true,"default":0,"title":"Utc Offset"},"deprecated":true},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/calendar/{time_interval}":{"get":{"tags":["Feed"],"summary":"Get Calendar With Time","description":"Get calendar with time interval","operationId":"get_calendar_with_time_feed_calendar__time_interval__get","deprecated":true,"security":[{"Bearer":[]}],"parameters":[{"name":"time_interval","in":"path","required":true,"schema":{"type":"integer","title":"Time Interval"}},{"name":"utc_offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Utc Offset"}},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/canupdate":{"get":{"tags":["Feed"],"summary":"Get Canupdate","operationId":"get_canupdate_feed_canupdate_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CanUpdate"},"title":"Response Get Canupdate Feed Canupdate Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"put":{"tags":["Feed"],"summary":"Create Canupdate","operationId":"create_canupdate_feed_canupdate_put","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanUpdateCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanUpdate"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/{id}":{"patch":{"tags":["Feed"],"summary":"Update Canupdate Record","operationId":"update_canupdate_record_feed__id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanUpdateCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanUpdate"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/feed/canupdate/{id}":{"delete":{"tags":["Feed"],"summary":"Delete Canupdate Record","operationId":"delete_canupdate_record_feed_canupdate__id__delete","security":[{"Bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/okx/oauth/start":{"get":{"tags":["Order Routing"],"summary":"Okx Oauth Start","description":"Start the OKX OAuth authorization-code flow.\n\nAuthenticated, live-only (is_demo=true rejected with 400, OAUTH-04).\nReturns {authorize_url} and stores a single-use TTL-bound Redis CSRF state\nkeyed to user_id + exchange + is_demo=False (OAUTH-01, SEC-01).","operationId":"okx_oauth_start_order_routing_exchange_okx_oauth_start_get","security":[{"Bearer":[]}],"parameters":[{"name":"is_demo","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Is Demo"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/exchange/okx/oauth/callback":{"get":{"tags":["Order Routing"],"summary":"Okx Oauth Callback","description":"OKX OAuth callback — public endpoint (no auth header required).\n\nValidates the Redis CSRF state atomically, enforces the D-01 active-trades\nguard before any minting, exchanges the authorization code for a token,\ndeletes the prior Fast API key only when the caller already holds an Okx\noauth connection row, mints a Fast API key, upserts via _connect_and_upsert(connection_type='oauth'),\ndiscards all credentials, and 302s to the config result URL.\n\nOnce a token exists, one finally block runs on every exit: delete a key\nthis request minted but did not keep, flag the caller's row\nreconnect-needed if the prior key was deleted and nothing replaced it,\nthen revoke the token last.\n\nAll redirects carry Referrer-Policy: no-referrer and use fixed D-03 reason codes.\nNo credential value is ever written to the DB, logged, or included in any redirect.","operationId":"okx_oauth_callback_order_routing_exchange_okx_oauth_callback_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/exchanges":{"get":{"tags":["Order Routing"],"summary":"List Supported Exchanges","description":"Desteklenen borsalari ve durumlarini dondur.","operationId":"list_supported_exchanges_order_routing_exchanges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/order-routing/exchange/connect":{"post":{"tags":["Order Routing"],"summary":"Connect Exchange","description":"Exchange'e baglan:\n1. Trading Service'e credential gonder (dogrulama + kayit)\n2. API DB'de connection metadata olustur\n\nCRED-01: credentials belong in the JSON body. The deprecated query-string\nform was removed once every client (bottomup-console; mobile never called\nthis endpoint) had migrated — see ExchangeConnectPayload for why.","operationId":"connect_exchange_order_routing_exchange_connect_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeConnectPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/switch/confirm":{"post":{"tags":["Order Routing"],"summary":"Confirm Account Switch","description":"Confirm an account switch: terminate every remote copy under the old\naccount, then — and only then — hand control to the new one (CONN-04,\nD-01).\n\nThis is the copier's hand on a one-way door. Confirming closes real\npositions on the exchange, and 79-02's D-18 refusal means the archived\nsession can never be reopened afterwards. That is exactly why the cutover\nis two-phase: nothing here happens without this explicit call.\n\nIdempotent by construction. The candidate transitions\n``switch_pending -> confirming`` through a single conditional UPDATE whose\nrowcount decides the winner, and the termination command's idempotency key\nis derived from the candidate id, so a double submit appends one\nconfirmation event, enqueues one command, and returns the same envelope\ntwice.\n\nOwner-scoped by lookup: a market with no candidate and another copier's\ncandidate produce the SAME 404 from the SAME code path, so the endpoint\ncannot be used to discover whether someone else is mid-switch.","operationId":"confirm_account_switch_order_routing_exchange_switch_confirm_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchConfirmPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/switch/impact":{"get":{"tags":["Order Routing"],"summary":"What confirming this account switch will cost (CONN-03)","description":"The three impact counts, the retained total, and the candidate's state.\n\nONE endpoint, TWO moments (D-81-22). Read before confirmation it answers\n\"what will this cost\"; read after it, it answers \"what happened\" — the\ncandidate's current state and, when that state is\n``blocked_unverified_positions``, the closed-vocabulary reason that\nstopped it. A second screen with its own endpoint would be a second\ncontract for the same row.\n\n``active`` and ``unresolved`` are the two arms of ONE liveness predicate\n(``retry.live_remote_copy_filters``), and ``archived`` is its complement,\nso the three PARTITION the copier's copies under the source session and\n``retained_total`` is their sum. ``deleted_count`` is zero because CONN-04\ndeletes nothing — stated as a number the server computes rather than as a\nreassurance the copier has to take on faith.\n\nThis reads. It changes no session state, enqueues no command and implies no\nconfirmation.","operationId":"get_account_switch_impact_order_routing_exchange_switch_impact_get","security":[{"Bearer":[]}],"parameters":[{"name":"exchange","in":"query","required":true,"schema":{"type":"string","description":"The market whose switch is pending.","title":"Exchange"},"description":"The market whose switch is pending."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/switch/impact/copies":{"get":{"tags":["Order Routing"],"summary":"Drill into one impact group of a pending account switch (CONN-03)","description":"The copies one impact count counted, one row per attempt, paginated.\n\nThe same population and the same classification the summary uses, so the\ntotal here equals the count there — a drill-down that disagreed with the\nnumber it was opened from would be worse than no drill-down at all. It\ncannot be the Phase-80 ledger trade list either: that list is built on\nledger rows and an active or unresolved copy has no ledger row at all,\nbecause the only realised producer fires on the terminal close (D-81-53).\n\n``group`` is constrained by a pattern DERIVED from the vocabulary, so an\nunknown value is refused at the boundary rather than falling into a default\nbranch that would answer an empty list to a question nobody asked (T-81-24).\n\n``ResponseListGeneric[T]`` is typed (``apps/schemas.py:76-81``) and\nvalidates its items itself, which is why this route does not need the\nexplicit envelope dance the impact GET does.","operationId":"get_account_switch_impact_copies_order_routing_exchange_switch_impact_copies_get","security":[{"Bearer":[]}],"parameters":[{"name":"exchange","in":"query","required":true,"schema":{"type":"string","description":"The market whose switch is pending.","title":"Exchange"},"description":"The market whose switch is pending."},{"name":"group","in":"query","required":true,"schema":{"type":"string","pattern":"^(active|unresolved|archived)$","description":"One of the three impact groups. Constrained at the boundary.","title":"Group"},"description":"One of the three impact groups. Constrained at the boundary."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_SwitchImpactCopyRow_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/paper/connect":{"post":{"tags":["Order Routing"],"summary":"Connect Paper Exchange","description":"Credential-free paper wallet connect (PAPER-03).\n\n0. Refuses with 409 `real_exchange_connected` while a real exchange\n   connection is active — paper and real never coexist\n   (see _active_real_connection).\n1. Provisions a TS paper profile via connect_exchange('Paper').\n2. Upserts a UserExchangeConnection(connection_type='paper').\n3. Seeds the wallet to PAPER_MARKET_SEED_BALANCE on first connect only (D-01).","operationId":"connect_paper_exchange_order_routing_exchange_paper_connect_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/paper/state":{"get":{"tags":["Order Routing"],"summary":"Get Paper State","description":"Live paper wallet eligibility state (PAPER-05, D-02, D-04).\n\nPerforms a fresh get_user() read on every call — never reads a cached\nUserBalanceSnapshot (D-02). Returns a paper-only shape that keeps the\ngeneric /exchange/status endpoint untouched (D-04).","operationId":"get_paper_state_order_routing_exchange_paper_state_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/paper/reset":{"post":{"tags":["Order Routing"],"summary":"Reset Paper Exchange","description":"Eligibility-gated paper wallet reset (PAPER-04, D-02, D-03).\n\nStep 1 — Live eligibility pre-check (D-02): calls get_user() to read the\nlatest paper_needs_reset flag and current balance. Raises 409 when the user\nis not eligible; no side effects are executed before this gate.\n\nStep 2 — Cancel all non-terminal paper CopyTrades (D-03 clean slate):\nqueries the DB async and cancels each open trade via cancel_copy_trade_single\nin a thread-pool executor. No sync/async DB mixing — Pitfall 3 avoided by\ncollecting rows async, running sync TS cancels in executor, then updating\nstate via AsyncSession after the executor returns.\n\nStep 3 — TS reset: calls paper_reset(user_id, trace_id). Returns 404 dict\nfor an unknown paper profile → raises 404 no_paper_account.\n\nStep 4 — Re-seed (backend owns seed restore per Phase 45 D-07):\nset_user_balance(seed) via executor. Returns the refreshed seed + balances.","operationId":"reset_paper_exchange_order_routing_exchange_paper_reset_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/disconnect":{"delete":{"tags":["Order Routing"],"summary":"Disconnect Exchange","description":"Exchange baglantisini kes.","operationId":"disconnect_exchange_order_routing_exchange_disconnect_delete","security":[{"Bearer":[]}],"parameters":[{"name":"exchange","in":"query","required":true,"schema":{"type":"string","title":"Exchange"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/exchange/status":{"get":{"tags":["Order Routing"],"summary":"Exchange Status","description":"Kullanicinin exchange baglanti durumunu getir.","operationId":"exchange_status_order_routing_exchange_status_get","security":[{"Bearer":[]}],"parameters":[{"name":"exchange","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/exchange/pause":{"patch":{"tags":["Order Routing"],"summary":"Set Exchange Pause","description":"Exchange copy trade'i durdur veya devam ettir.\nEski /copy_trade/market/pause endpoint'inin yeni karsiligi.\n\nDelegates to the shared Track C / C1 helper (see\ndocs/notes/pause-semantics-and-copy-error-status-remediation.md) so both\npause doors write UserExchangeConnection.is_paused and the legacy\nUser.copy_trade_paused column together, in one transaction, or not at\nall — see order_routing.service.set_pause_state_async for the atomicity\nand legacy-column rationale this door used to carry inline.","operationId":"set_exchange_pause_order_routing_exchange_pause_patch","security":[{"Bearer":[]}],"parameters":[{"name":"exchange","in":"query","required":true,"schema":{"type":"string","title":"Exchange"}},{"name":"pause","in":"query","required":true,"schema":{"type":"boolean","title":"Pause"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/execution-log/{trace_id}":{"get":{"tags":["Order Routing"],"summary":"Get Execution Logs By Trace","description":"Bir trace_id icin tum execution log'larini getir.","operationId":"get_execution_logs_by_trace_order_routing_execution_log__trace_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/execution-log/user/{user_id}":{"get":{"tags":["Order Routing"],"summary":"Get Execution Logs By User","description":"Bir kullanici icin execution log'lari (admin).","operationId":"get_execution_logs_by_user_order_routing_execution_log_user__user_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/slippage-settings":{"get":{"tags":["Order Routing"],"summary":"Get Slippage Settings","description":"Kullanicinin slippage ayarlarini getir.","operationId":"get_slippage_settings_order_routing_slippage_settings_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Order Routing"],"summary":"Upsert Slippage Settings","description":"Kullanicinin slippage ayarlarini olustur veya guncelle.","operationId":"upsert_slippage_settings_order_routing_slippage_settings_put","security":[{"Bearer":[]}],"parameters":[{"name":"max_slippage_pct","in":"query","required":false,"schema":{"type":"number","default":0.5,"title":"Max Slippage Pct"}},{"name":"convert_to_limit","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Convert To Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/order-routing/balance/latest":{"get":{"tags":["Order Routing"],"summary":"Get Latest Balance","description":"Kullanicinin son balance snapshot'ini getir.","operationId":"get_latest_balance_order_routing_balance_latest_get","security":[{"Bearer":[]}],"parameters":[{"name":"exchange","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/balance/effective":{"get":{"tags":["Order Routing"],"summary":"Get Effective Balance","description":"Effective balance: min(kullanici_limiti, gercek_exchange_bakiye)\n\nKullanici 1000$ limit koymus ama exchange'te 500$ varsa\neffective = 500$ (ve uyari gosterilir)","operationId":"get_effective_balance_order_routing_balance_effective_get","security":[{"Bearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","default":"futures","title":"Category"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-routing/balance/allocation":{"put":{"tags":["Order Routing"],"summary":"Set Balance Allocation","description":"Kullanicinin Trading Service'teki balance limitini guncelle.\nEski /copy_trade/market/balance endpoint'inin yeni karsiligi.","operationId":"set_balance_allocation_order_routing_balance_allocation_put","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceAllocationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/recommendation/admin/shadow-run":{"get":{"tags":["Recommendation"],"summary":"Admin: Latest Published Production Run Scores","description":"SHADOW-01: read-only operator inspection of the nightly shadow output.\n\n`profile` is validated to the three real engine profiles\n(conservative/balanced/aggressive) — there is no profile named\n\"futures\" (that is the `category`, always passed as \"futures\" here;\nreviewed HIGH fix). Any other value is rejected with 422 rather than\nsilently returning an empty result.","operationId":"Admin__Latest_Published_Production_Run_Scores_recommendation_admin_shadow_run_get","security":[{"Bearer":[]}],"parameters":[{"name":"profile","in":"query","required":false,"schema":{"enum":["conservative","balanced","aggressive"],"type":"string","default":"balanced","title":"Profile"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_TraderScoreOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/metrics/daily-report/latest":{"get":{"tags":["Admin","Metrics"],"summary":"Daily Report Latest","description":"Return the most recent daily report snapshot.","operationId":"Daily_Report_Latest_admin_metrics_daily_report_latest_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_Union_DailyReportOut__NoneType__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/metrics/daily-report/series":{"get":{"tags":["Admin","Metrics"],"summary":"Daily Report Series","description":"Return a time-series of daily report snapshots for the given range.","operationId":"Daily_Report_Series_admin_metrics_daily_report_series_get","security":[{"Bearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|180d|1y)$","default":"30d","title":"Range"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceResponse_list_DailyReportPoint__"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/metrics/daily-report/run":{"post":{"tags":["Admin","Metrics"],"summary":"Daily Report Manual Run","description":"Manually trigger the daily report collection asynchronously.\n\nDispatches the Celery task (`send_daily_report.delay()`) and returns 202\nwith the task id immediately. No GA/ES/DB work runs on the request thread,\nso this endpoint cannot be used to exhaust the worker pool or abuse the GA\nquota (CR-01).","operationId":"Daily_Report_Manual_Run_admin_metrics_daily_report_run_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs":{"get":{"tags":["Admin","Request Logs"],"summary":"List Request Logs","description":"List/search request logs (API-01).\n\nSuperuser-only. Excludes request/response bodies and headers from every\nrow (D7). Fail-opens to an empty envelope (total_count 0) when ES is\nunavailable, never 500s (D6).","operationId":"list_request_logs_admin_logs_get","security":[{"Bearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},{"name":"status_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Class"}},{"name":"status_code","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},{"name":"route_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Path"}},{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},{"name":"from_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Ts"}},{"name":"to_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Ts"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Size"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_RequestLogListItem_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs/stats":{"get":{"tags":["Admin","Request Logs"],"summary":"Get Request Log Stats","description":"Cached statistics feed for the console's statistics dashboard\n(API-02).\n\nSuperuser-only. Naive from_ts/to_ts -> 400 (M2); a parameterless call\ndefaults to a 24h window (C2-H2); the span is bounded to\nMAX_STATS_WINDOW_DAYS (M3 — bounds the aggregation cost of any single\nquery; cache-key timestamps are minute-bucketed so unique from/to pairs\ncannot bypass the cache, see WR-04). Served from a 60s Redis cache\n(D7) — a corrupted cache payload or a Redis transport error on get/set\nboth degrade to a cache-miss recompute rather than a 500 (M4/C2). Fail\n-opens to an empty LogStatsOut when the repository is absent, never\n500s (D6).","operationId":"get_request_log_stats_admin_logs_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Ts"}},{"name":"to_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Ts"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogStatsOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs/error-groups":{"get":{"tags":["Admin","Request Logs"],"summary":"Get Error Groups","description":"Recurring error groups feed for the console's error-groups page\n(API-03).\n\nSuperuser-only. Runs the SAME window pipeline as /stats — naive\nfrom_ts/to_ts -> 400 (M2), a parameterless call defaults to a 24h\nwindow (C2-H2), the span is bounded to MAX_STATS_WINDOW_DAYS (M3).\nFail-opens to an empty envelope when the repository is absent, never\n500s (D6). Declared BEFORE /{log_id} (D7 static-before-dynamic).","operationId":"get_error_groups_admin_logs_error_groups_get","security":[{"Bearer":[]}],"parameters":[{"name":"from_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Ts"}},{"name":"to_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Ts"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorGroupsOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs/report":{"post":{"tags":["Admin","Request Logs"],"summary":"Compile Report","description":"Compile a shareable markdown error report for 1..10 selected logs\n(API-05, D1/D2).\n\nSuperuser-only, UNLIMITED — no rate-limit prefix (compile is cheap,\nD6; the `ai_rl:logreport:` prefix only gates the analyze endpoint,\nPlan 02). Missing ids are reported in `data.missing_ids` and the\nreport still compiles for the found subset (partial 200 success); if\nALL ids are missing this 404s instead of building an empty report\n(D6). Declared AFTER `/error-groups` and BEFORE `/{log_id}/related`\n(D7 static-before-dynamic) so this static `/report` path is never\nswallowed by the dynamic `/{log_id}` route.","operationId":"compile_report_admin_logs_report_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs/report/analyze":{"post":{"tags":["Admin","Request Logs"],"summary":"Analyze Report","description":"AI root-cause analysis over a server-recompiled error report\n(API-06, D3/D6).\n\nSuperuser-only. The report is ALWAYS recompiled server-side from\n`log_ids` via `build_error_report` — `AIReportRequest` has no `markdown`\nfield and forbids extras (422), so a smuggled client-supplied markdown\nis rejected at the schema boundary, never accepted as input (T-03-05).\nGuard order: `_ensure_openai_configured()` (503 when `OPENAI_API_KEY` is\nempty) -> `ai_rl:logreport:<admin_user_id>` rate limit (429 on exceed,\nD6) -> fetch loop with the all-missing -> 404 short-circuit BEFORE any\nOpenAI call (P3-M5) -> compile the report -> `await\ncall_openai_log_analysis`. The response carries `missing_ids` so its\npartial-success contract matches `/report` (P3C2-M2). MUST stay\n`async def` — `call_openai_log_analysis` is a coroutine that must be\nawaited (Pitfall 1, RESEARCH.md). Declared immediately after `/report`\nand before `/{log_id}/related` (D7 static-before-dynamic).","operationId":"analyze_report_admin_logs_report_analyze_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs/{log_id}/related":{"get":{"tags":["Admin","Request Logs"],"summary":"Get Request Log Related","description":"Trace-correlated related logs, excluding the log itself (API-04).\n\nSuperuser-only. Declared BEFORE /{log_id} — it is the more specific\nroute of the two, and this ordering is proven by a dedicated routing\ntest (M8) so a future refactor cannot silently swallow `/related` into\nthe single-detail handler. Fail-opens to an empty list when the\nrepository is absent, never 500s (D6).\n\nIN-02 (01-REVIEW.md): 404s when `log_id` itself doesn't exist, matching\nthe sibling `GET /admin/logs/{log_id}` — a genuinely unknown id is no\nlonger indistinguishable from \"this log exists but was never\ntrace-correlated\" (which still returns 200 + []).","operationId":"get_request_log_related_admin_logs__log_id__related_get","security":[{"Bearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequestLogListItem"},"title":"Response Get Request Log Related Admin Logs  Log Id  Related Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/logs/{log_id}":{"get":{"tags":["Admin","Request Logs"],"summary":"Get Request Log Detail","description":"Full single-log document, bodies + error object included (API-04, D7).\n\nSuperuser-only. 404 when the log is not found OR the repository is\nabsent (D6) — a missing log is never distinguishable from \"ES\nunavailable\" to the caller, both are a clean 404 rather than a 500.\nDeclared AFTER every static route AND after /{log_id}/related (D7\nstatic-before-dynamic).","operationId":"get_request_log_detail_admin_logs__log_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogDetailOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/trader-rules/ban-status":{"get":{"tags":["Trader Rules"],"summary":"Ban Status","description":"Allowed: Trader (self), Admin (any trader)\n\nAuthoritative trading-ban state from the persisted suspension record.\nThe mobile app should use this instead of deriving the ban from\nleaderboard aggregates, which lag behind closes when the feed is slow.","operationId":"ban_status_trader_rules_ban_status_get","security":[{"Bearer":[]}],"parameters":[{"name":"trader_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"description":"Admin only: query another trader. Defaults to the caller.","title":"Trader Id"},"description":"Admin only: query another trader. Defaults to the caller."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanStatusResponse"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/algo-trader/traders":{"get":{"tags":["Algo Trader"],"summary":"List Traders","description":"Allowed: Admin. Every non-deleted algo trader, ordered by name.","operationId":"list_traders_algo_trader_traders_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_AlgoTraderOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/algo-trader/traders/{algo_trader_id}":{"get":{"tags":["Algo Trader"],"summary":"Get Trader","description":"Allowed: Admin.","operationId":"get_trader_algo_trader_traders__algo_trader_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"algo_trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Algo Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlgoTraderOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"patch":{"tags":["Algo Trader"],"summary":"Patch Trader","description":"Allowed: Admin.\n\nOnly ``enabled``, ``mode``, ``guard``, ``params`` and ``universe`` are\nwritable; ``strategy_key`` is fixed for the life of the account (an\naccount is its technique — switching it would rewrite the meaning of\nits whole signal history). ``mode=\"live\"`` on a disabled account is\nrefused: a live flag that cannot fire is a trap for the next operator.","operationId":"patch_trader_algo_trader_traders__algo_trader_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"algo_trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Algo Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlgoTraderPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlgoTraderOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/algo-trader/traders/{algo_trader_id}/signals":{"get":{"tags":["Algo Trader"],"summary":"List Signals","description":"Allowed: Admin. Signal log of one algo trader, newest first.","operationId":"list_signals_algo_trader_traders__algo_trader_id__signals_get","security":[{"Bearer":[]}],"parameters":[{"name":"algo_trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Algo Trader Id"}},{"name":"decision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"created | shadow | skipped | error","title":"Decision"},"description":"created | shadow | skipped | error"},{"name":"coin_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_AlgoSignalOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/algo-trader/traders/{algo_trader_id}/status":{"get":{"tags":["Algo Trader"],"summary":"Trader Status","description":"Allowed: Admin. Open setups, ban state and the last-24h decision mix.","operationId":"trader_status_algo_trader_traders__algo_trader_id__status_get","security":[{"Bearer":[]}],"parameters":[{"name":"algo_trader_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Algo Trader Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlgoTraderStatus"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/algo-trader/strategies":{"get":{"tags":["Algo Trader"],"summary":"List Strategies","description":"Allowed: Admin. The strategy registry with defaults and launch overrides.","operationId":"list_strategies_algo_trader_strategies_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyOut"},"title":"Response List Strategies Algo Trader Strategies Get"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/audit/events":{"get":{"tags":["Audit"],"summary":"List Audit Events","description":"List audit events.\nRegular users see only their own events.\nAdmin/SOC users can see all events.","operationId":"list_audit_events_audit_events_get","security":[{"Bearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"risk_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"from_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Ts"}},{"name":"to_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Ts"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Size"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSearchResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/events/{event_id}":{"get":{"tags":["Audit"],"summary":"Get Audit Event","description":"Get a single audit event by event_id.","operationId":"get_audit_event_audit_events__event_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/stats":{"get":{"tags":["Audit"],"summary":"Get Audit Stats","description":"Get audit statistics for the last 24 hours. Admin only.","operationId":"get_audit_stats_audit_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/export":{"post":{"tags":["Audit"],"summary":"Start Export","description":"Start an async audit log export. Admin only.","operationId":"start_export_audit_export_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/export/{task_id}":{"get":{"tags":["Audit"],"summary":"Get Export Status","description":"Check export task status. Admin only.","operationId":"get_export_status_audit_export__task_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/verify":{"post":{"tags":["Audit"],"summary":"Verify Merkle Chain","description":"Run on-demand Merkle chain verification. Admin/SOC only.","operationId":"verify_merkle_chain_audit_verify_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/verify/history":{"get":{"tags":["Audit"],"summary":"Get Verify History","description":"Get recent Merkle verification results. Admin/SOC only.","operationId":"get_verify_history_audit_verify_history_get","security":[{"Bearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VerifyHistoryOut"},"title":"Response Get Verify History Audit Verify History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/alerts":{"get":{"tags":["Audit SIEM"],"summary":"List Alerts","description":"List alerts. Regular users see only their own alerts.","operationId":"list_alerts_audit_alerts_get","security":[{"Bearer":[]}],"parameters":[{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"rule_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Id"}},{"name":"from_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Ts"}},{"name":"to_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Ts"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Size"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/alerts/stats":{"get":{"tags":["Audit SIEM"],"summary":"Get Alert Stats","description":"Alert statistics. Admin only.","operationId":"get_alert_stats_audit_alerts_stats_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/alerts/{alert_id}":{"get":{"tags":["Audit SIEM"],"summary":"Get Alert","description":"Get single alert detail.","operationId":"get_alert_audit_alerts__alert_id__get","security":[{"Bearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Audit SIEM"],"summary":"Update Alert","description":"Update alert status/assignment. Admin/SOC only.","operationId":"update_alert_audit_alerts__alert_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/rules":{"get":{"tags":["Audit SIEM"],"summary":"List Rules","description":"List all correlation rules. Admin/SOC only.","operationId":"list_rules_audit_rules_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CorrelationRuleOut"},"title":"Response List Rules Audit Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Audit SIEM"],"summary":"Create Rule","description":"Create a new correlation rule. Admin only.","operationId":"create_rule_audit_rules_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelationRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/rules/{rule_id}":{"patch":{"tags":["Audit SIEM"],"summary":"Update Rule","description":"Update a rule (enable/disable, suppress_seconds). Admin only.","operationId":"update_rule_audit_rules__rule_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelationRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/settings/notifications":{"get":{"tags":["Audit SIEM"],"summary":"Get Notification Config","description":"Get notification config. Admin only.","operationId":"get_notification_config_audit_settings_notifications_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Audit SIEM"],"summary":"Update Notification Config","description":"Update notification config (upsert). Admin only.","operationId":"update_notification_config_audit_settings_notifications_patch","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit/settings/notifications/test-telegram":{"post":{"tags":["Audit SIEM"],"summary":"Test Telegram","description":"Send a test Telegram message. Admin only.","operationId":"test_telegram_audit_settings_notifications_test_telegram_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/social-rank/me/score":{"get":{"tags":["Social Rank"],"summary":"Get My Social Score","operationId":"get_my_social_score_social_rank_me_score_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Period \"YYYY-MM\".","title":"Period"},"description":"Period \"YYYY-MM\"."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraderSocialScoreOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/social-rank/me/accounts":{"get":{"tags":["Social Rank"],"summary":"List My Accounts","operationId":"list_my_accounts_social_rank_me_accounts_get","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_SocialAccountOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}},"post":{"tags":["Social Rank"],"summary":"Connect My Account","operationId":"connect_my_account_social_rank_me_accounts_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccountCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccountOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/social-rank/me/accounts/{account_id}":{"patch":{"tags":["Social Rank"],"summary":"Update My Account","operationId":"update_my_account_social_rank_me_accounts__account_id__patch","security":[{"Bearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccountOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/social-rank/me/content":{"get":{"tags":["Social Rank"],"summary":"List My Content","operationId":"list_my_content_social_rank_me_content_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_SocialContentOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/social-rank/leaderboard":{"get":{"tags":["Social Rank"],"summary":"Social Leaderboard","operationId":"social_leaderboard_social_rank_leaderboard_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/social-rank/content":{"get":{"tags":["Admin Social Rank"],"summary":"Admin List Content","operationId":"admin_list_content_admin_social_rank_content_get","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"review_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewStatus"},{"type":"null"}],"title":"Review Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListGeneric_SocialContentOut_"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/social-rank/content/{content_id}/review":{"post":{"tags":["Admin Social Rank"],"summary":"Admin Review Content","operationId":"admin_review_content_admin_social_rank_content__content_id__review_post","security":[{"Bearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialContentOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/social-rank/content/ingest":{"post":{"tags":["Admin Social Rank"],"summary":"Admin Ingest Content","operationId":"admin_ingest_content_admin_social_rank_content_ingest_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentIngestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialContentOut"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/social-rank/penalties":{"post":{"tags":["Admin Social Rank"],"summary":"Admin Create Penalty","operationId":"admin_create_penalty_admin_social_rank_penalties_post","security":[{"Bearer":[]}],"parameters":[{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PenaltyCreateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/social-rank/recalc":{"post":{"tags":["Admin Social Rank"],"summary":"Admin Recalc","operationId":"admin_recalc_admin_social_rank_recalc_post","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}},"/admin/social-rank/finalize":{"post":{"tags":["Admin Social Rank"],"summary":"Admin Finalize","operationId":"admin_finalize_admin_social_rank_finalize_post","security":[{"Bearer":[]}],"parameters":[{"name":"period","in":"query","required":true,"schema":{"type":"string","description":"Period \"YYYY-MM\" to finalize.","title":"Period"},"description":"Period \"YYYY-MM\" to finalize."},{"name":"os-name","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Name"}},{"name":"os-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"Os-Version"}},{"name":"app-version","in":"header","required":false,"schema":{"type":"string","default":"","title":"App-Version"}},{"name":"accept-language","in":"header","required":false,"schema":{"type":"string","default":"","title":"Accept-Language"}},{"name":"device-id","in":"header","required":false,"schema":{"type":"string","default":"default","title":"Device-Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"registration-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"Registration-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"302":{"description":"The item was moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"401":{"description":"Could not validate credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"402":{"description":"Payment required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"403":{"description":"Not enough privileges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"404":{"description":"The item was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"409":{"description":"Conflict with current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"429":{"description":"Too many requests (see Retry-After header)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseError"}}}}}}}},"components":{"schemas":{"AIReportRequest":{"properties":{"log_ids":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Log Ids"},"include_related":{"type":"boolean","title":"Include Related","default":true},"question":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Question"}},"additionalProperties":false,"type":"object","required":["log_ids"],"title":"AIReportRequest","description":"Shared request body for `POST /admin/logs/report` (API-05) and\n`/report/analyze` (API-06, Plan 02).\n\n`extra=\"forbid\"` (P3-M2, resolved decision): a client-supplied\n`markdown` field — or ANY unknown field — is REJECTED with 422, never\nsilently ignored. The compiled report markdown is ALWAYS recomputed\nserver-side from `log_ids`; this ConfigDict enforces that invariant at\nthe schema boundary in addition to the handler never reading a\n`markdown` field off the body."},"AccountCashFlowRowOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","enum":["deposit","withdrawal"],"title":"Kind"},"amount":{"type":"string","title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"source_state":{"type":"string","enum":["Credited","Successful","Success"],"title":"Source State"},"fee_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Amount"},"fee_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Currency"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"connection_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Session Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"additionalProperties":false,"type":"object","required":["id","kind","amount","source_state","occurred_at","recorded_at"],"title":"AccountCashFlowRowOut","description":"`GET /copy_trade/me/account/cash-flow` — one settled deposit or\nwithdrawal (D-80.1-14). Emits NO aggregate of any kind: not a sum, not a\nnet, not a per-currency subtotal. `currency`/`fee_currency` are NEVER\ndefaulted — a row with no stated currency renders `null`, and the read\nnever sums across two currencies (the strongest defence against FIN-03's\nfailure mode — one field that could hold either a return or a deposit —\nis having no such field at all).\n\n`kind` and `source_state` are CLOSED vocabularies and are typed as such\n(A-H-04). They shipped as open `str` on the argument that importing the\ntuples would close an import cycle; the cycle was real, the conclusion was\nnot. Both tuples now live in `apps.order_routing.account_facts`, which has\nno module-level app import and is therefore reachable from here — so the\nfields carry `Phase81Vocabulary` descriptors, appear in\n`docs/contracts/phase81-contract.json`, and a widening moves the digest.\nWithout that, a new cash-flow kind reached a hand-written console client\nwith no manifest entry and no signal, which is D-81-107's own documented\nfailure reappearing."},"AcquisitionStats":{"properties":{"referral_users":{"type":"integer","title":"Referral Users","default":0},"organic_users":{"type":"integer","title":"Organic Users","default":0},"referral_pct":{"type":"number","title":"Referral Pct","default":0.0}},"type":"object","title":"AcquisitionStats"},"AddTraderRequest":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"}},"type":"object","required":["trader_id"],"title":"AddTraderRequest"},"AdminAnomalyItem":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"type":{"type":"string","title":"Type"},"amount_credits":{"type":"number","title":"Amount Credits"},"amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Usd"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_id","type","amount_credits","created_at"],"title":"AdminAnomalyItem"},"AdminBalanceListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminBalanceRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AdminBalanceListResponse","description":"`{items, total}` envelope for `GET /admin/credits/balances`.\n\nThe credits-domain envelope, mirroring `CreditLotListResponse` — NOT the\nmarket-domain `ResponseListGeneric` shape (`total_count`/`start`/\n`limit`/`data`)."},"AdminBalanceRow":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"balance":{"type":"number","title":"Balance"},"reserved":{"type":"number","title":"Reserved"},"expiring_soon_credits":{"type":"number","title":"Expiring Soon Credits","default":0.0},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["user_id","balance","reserved"],"title":"AdminBalanceRow","description":"One row of the platform-wide admin balance list —\n`GET /admin/credits/balances` (ACR-01, ACR-02).\n\nBuilt by explicit keyword construction from a `CreditBalance` row\nouter-joined to `User`, plus two SQL-computed expressions\n(`last_activity_at`, `expiring_soon_credits`) — never by\n`model_validate()` on an ORM row, which is why this class carries no\n`model_config = ConfigDict(from_attributes=True)` (see the rule at the\ntop of `CreditPackageItem`'s docstring: `AppBaseModel` is deliberately\nbare, and a schema that never calls `model_validate` on a row does not\nneed it).\n\n**`email` optionality — contract §9 change-log CANDIDATE.** The contract\nrow spec writes `email` without the `?` that marks `name?` and\n`last_activity_at?`, but `User.email` is `nullable=True`\n(`User.email` in apps/user/models.py), so a required `str` here would be a latent 500\nthe moment a balance row belongs to an emailless user — the same\ndelayed-failure class `CLAUDE.md`'s `from_attributes` note documents.\nImplemented as `Optional[str] = None`: identical JSON whenever a value\nexists, and the console is null-tolerant per §6 A3. Recorded, not\nsilently decided — see the plan 90-02 SUMMARY."},"AdminChartDataPoint":{"properties":{"date":{"type":"string","title":"Date"},"earned":{"type":"number","title":"Earned"},"spent":{"type":"number","title":"Spent"},"revenue":{"type":"number","title":"Revenue"}},"type":"object","required":["date","earned","spent","revenue"],"title":"AdminChartDataPoint"},"AdminCreateLinkRequest":{"properties":{"canonical_url":{"type":"string","minLength":1,"title":"Canonical Url"},"slug":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Slug"},"campaign":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Campaign"},"admin_comment":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Admin Comment"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Enforced by an hourly sweep (plan 93-07), not instantly — a link can outlive this stated expiry by up to an hour before it is disabled."}},"additionalProperties":false,"type":"object","required":["canonical_url"],"title":"AdminCreateLinkRequest","description":"``POST /admin/links`` request body (Phase 93 / ADMW-01, ADMW-05,\nADMW-06). The SINGLE invocation point for both validators (D-12): a\nsecond call site cannot bypass either rule, because both are wired\nthrough field validators HERE, never inside the route.\n\n``canonical_url`` is routed through ``validate_admin_target_url``\n(D-10/D-11/D-19) before any row exists. Raising ``LinkTargetError`` (a\n``ValueError`` subclass) from a field validator surfaces as **400**\nthrough this app's global ``RequestValidationError`` handler\n(``app/main.py``), never FastAPI's default 422 — the tests assert\nagainst 400.\n\n``slug`` is OPTIONAL: when omitted, ``admin_create_link`` mints one\nitself via ``url_policy.generate_admin_slug()`` (R-H-2, before the\nsavepoint opens); when supplied, it is validated AND LOWERCASED\n(93-01's check 10 — the deployed Sink instance lowercases server-side)\nby ``validate_admin_slug`` right here, at the schema boundary, before\nthe route ever sees it.\n\n``admin_comment``/``expires_at`` are the two ADMW-02 fields (D-09).\n``admin_comment`` is bounded at 2048 characters (T-93-15) — free\noperator text that no UI renders in this phase (D-01), so a future\nconsole screen inherits the obligation to escape it rather than\nrediscovering the bound. ``expires_at``'s description carries the same\nhourly-sweep enforcement lag as ``ShortLinkAdminDetail.expires_at``\n(R-M-3) — the same field, the same lag, stated on both the read and the\nwrite side of the contract.\n\n``model_config = ConfigDict(extra=\"forbid\")`` for the same reason every\nother body in this module carries it: without it, an unknown key would\nbe silently IGNORED rather than refused."},"AdminCreditAdjustment":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"amount":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Amount"},"note":{"type":"string","minLength":5,"title":"Note"}},"type":"object","required":["trader_id","amount","note"],"title":"AdminCreditAdjustment"},"AdminEarningsSummary":{"properties":{"revenue_total":{"type":"number","title":"Revenue Total"},"subscription_total":{"type":"integer","title":"Subscription Total"},"subscription_trial_count":{"type":"integer","title":"Subscription Trial Count"},"subscription_cancelled_count":{"type":"integer","title":"Subscription Cancelled Count"},"referral_paid_usd":{"type":"number","title":"Referral Paid Usd"},"referral_due_usd":{"type":"number","title":"Referral Due Usd"},"pool_paid_usd":{"type":"number","title":"Pool Paid Usd"},"pool_due_usd":{"type":"number","title":"Pool Due Usd"},"total_due_usd":{"type":"number","title":"Total Due Usd"},"total_paid_usd":{"type":"number","title":"Total Paid Usd"},"total_paid_credits":{"type":"number","title":"Total Paid Credits"}},"type":"object","required":["revenue_total","subscription_total","subscription_trial_count","subscription_cancelled_count","referral_paid_usd","referral_due_usd","pool_paid_usd","pool_due_usd","total_due_usd","total_paid_usd","total_paid_credits"],"title":"AdminEarningsSummary"},"AdminEditLinkRequest":{"properties":{"canonical_url":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Canonical Url"},"admin_comment":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Admin Comment"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Enforced by an hourly sweep (plan 93-07), not instantly — a link can outlive this stated expiry by up to an hour before it is disabled."}},"additionalProperties":false,"type":"object","title":"AdminEditLinkRequest","description":"``PATCH /admin/links/{link_id}`` request body (Phase 93 / ADMW-02,\nplan 93-03). Three independently-editable optional fields — the\ntarget, the comment, the expiry.\n\nDELIBERATELY NO ``slug`` FIELD. The upstream edit identifies the link\nby its slug and cannot rename it; an editable slug here would either\nsilently do nothing upstream or, worse, be misread as pointing at a\ndifferent link. Renaming a slug is not a capability this phase adds.\n\nPRESENCE SEMANTICS (route-level, not schema-level): an ABSENT key means\n\"leave this field alone\"; the route reads ``model_fields_set`` to tell\nan absent key apart from an explicit ``null`` — without that, a\nnullable optional field makes the two indistinguishable. An explicit\n``null`` clears ``admin_comment``/``expires_at``. ``canonical_url`` is\nthe one field this does NOT apply to: it backs a ``NOT NULL`` database\ncolumn, so the route refuses an explicit ``null`` there (400) rather\nthan silently treating it as absent or attempting a write that would\nraise ``IntegrityError``.\n\n``canonical_url`` is routed through the SAME\n``validate_admin_target_url`` (D-12) that ``AdminCreateLinkRequest``\nuses — one validator, one call site each, so the edit path cannot\nbecome a second, weaker door onto the trusted short domain (ADMW-05).\n\n``expires_at``'s field description carries the same hourly-sweep\nenforcement lag (R-M-3) as every other schema exposing this field: a\nlink can outlive its stated expiry by up to an hour before the sweep\n(plan 93-07) disables it.\n\n``model_config = ConfigDict(extra=\"forbid\")`` for the same reason every\nother body in this module carries it: without it, an unknown key would\nbe silently IGNORED rather than refused."},"AdminExpiryStatsResponse":{"properties":{"expiring_next_30d":{"type":"number","title":"Expiring Next 30D"},"expired_in_period":{"type":"number","title":"Expired In Period"},"active_lots_count":{"type":"integer","title":"Active Lots Count"},"total_remaining_in_lots":{"type":"number","title":"Total Remaining In Lots"},"period":{"type":"string","title":"Period"}},"type":"object","required":["expiring_next_30d","expired_in_period","active_lots_count","total_remaining_in_lots","period"],"title":"AdminExpiryStatsResponse"},"AdminLifecycleForceRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","title":"AdminLifecycleForceRequest"},"AdminLifecycleRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminLifecycleRequest"},"AdminLoanRiskItem":{"properties":{"ltv_range":{"type":"string","title":"Ltv Range"},"count":{"type":"integer","title":"Count"},"collateral_usd":{"type":"number","title":"Collateral Usd"}},"type":"object","required":["ltv_range","count","collateral_usd"],"title":"AdminLoanRiskItem"},"AdminMarkFailedRequest":{"properties":{"failure_reason":{"type":"string","maxLength":500,"minLength":3,"title":"Failure Reason"}},"type":"object","required":["failure_reason"],"title":"AdminMarkFailedRequest"},"AdminMarkPaidRequest":{"properties":{"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","title":"AdminMarkPaidRequest"},"AdminPauseCancel":{"properties":{"note":{"type":"string","minLength":3,"title":"Note"}},"type":"object","required":["note"],"title":"AdminPauseCancel"},"AdminRefundRequest":{"properties":{"admin_reason":{"type":"string","maxLength":500,"minLength":3,"title":"Admin Reason"},"scope":{"type":"string","enum":["period","lifetime"],"title":"Scope","default":"period"}},"type":"object","required":["admin_reason"],"title":"AdminRefundRequest"},"AdminRetryPayoutRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminRetryPayoutRequest"},"AdminReviewIn":{"properties":{"review_status":{"$ref":"#/components/schemas/ReviewStatus"},"eligibility_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eligibility Reason"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["review_status"],"title":"AdminReviewIn"},"AdminReviewPayload":{"properties":{"action":{"type":"string","enum":["approve","reject"],"title":"Action"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"}},"type":"object","required":["action"],"title":"AdminReviewPayload"},"AdminSendPayoutRequest":{"properties":{"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["external_ref"],"title":"AdminSendPayoutRequest"},"AdminStatsResponse":{"properties":{"total_credits_in_circulation":{"type":"number","title":"Total Credits In Circulation"},"total_revenue_usd":{"type":"number","title":"Total Revenue Usd"},"active_loans_count":{"type":"integer","title":"Active Loans Count"},"total_collateral_usd":{"type":"number","title":"Total Collateral Usd"},"anomaly_count":{"type":"integer","title":"Anomaly Count"},"total_earned":{"type":"number","title":"Total Earned"},"total_spent":{"type":"number","title":"Total Spent"},"period":{"type":"string","title":"Period"}},"type":"object","required":["total_credits_in_circulation","total_revenue_usd","active_loans_count","total_collateral_usd","anomaly_count","total_earned","total_spent","period"],"title":"AdminStatsResponse"},"AdminSubscriptionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminSubscriptionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AdminSubscriptionListResponse"},"AdminSubscriptionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"market":{"type":"string","title":"Market"},"transaction_id":{"type":"string","title":"Transaction Id"},"start_date":{"type":"string","format":"date-time","title":"Start Date"},"expire_date":{"type":"string","format":"date-time","title":"Expire Date"},"is_expired":{"type":"boolean","title":"Is Expired"},"is_cancelled":{"type":"boolean","title":"Is Cancelled"},"is_trial":{"type":"boolean","title":"Is Trial"},"is_payment_received":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payment Received"},"auto_renew_status":{"type":"boolean","title":"Auto Renew Status"},"auto_renew_product_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Renew Product Code"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"user":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionUserInfo"},{"type":"null"}]}},"type":"object","required":["id","user_id","market","transaction_id","start_date","expire_date","is_expired","is_cancelled","is_trial","auto_renew_status"],"title":"AdminSubscriptionResponse"},"AdminTopUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"total":{"type":"number","title":"Total"},"last_activity":{"type":"string","title":"Last Activity"}},"type":"object","required":["user_id","total","last_activity"],"title":"AdminTopUser"},"AdminTopUsersResponse":{"properties":{"top_spenders":{"items":{"$ref":"#/components/schemas/AdminTopUser"},"type":"array","title":"Top Spenders"},"top_earners":{"items":{"$ref":"#/components/schemas/AdminTopUser"},"type":"array","title":"Top Earners"}},"type":"object","required":["top_spenders","top_earners"],"title":"AdminTopUsersResponse"},"AdminTxItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"type":{"type":"string","title":"Type"},"amount_credits":{"type":"number","title":"Amount Credits"},"amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Usd"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"anomaly_flag":{"type":"boolean","title":"Anomaly Flag","default":false},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"source":{"type":"string","title":"Source"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},"type":"object","required":["id","created_at","type","amount_credits","user_id","source"],"title":"AdminTxItem","description":"`TxItem`'s seven wire fields plus the four admin-only fields this\nphase adds — `GET /admin/credits/transactions` (ACR-04, ACR-05).\n\nDeclared as a SUBCLASS of `TxItem`, not a copy: \"wire `TxItem` plus four\"\nis then structural rather than something that can drift silently. Plan\n90-04 pins the resulting field set so an edit to `TxItem` fails loudly\ninstead of silently changing the admin wire shape."},"AdminTxListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminTxItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AdminTxListResponse","description":"`{items, total}` envelope for `GET /admin/credits/transactions`.\n\nDeliberately carries NO envelope-level `user_id` (§3.3) — unlike\n`HistoryResponse`, which `admin_user_history` still returns as the\nper-user dossier this route is NOT."},"AdminWithdrawalCompleteRequest":{"properties":{"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash"},"bank_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Reference"}},"type":"object","title":"AdminWithdrawalCompleteRequest"},"AdminWithdrawalRejectRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"AdminWithdrawalRejectRequest"},"AdminWithdrawalStatsResponse":{"properties":{"pending_count":{"type":"integer","title":"Pending Count"},"completed_usd":{"type":"number","title":"Completed Usd"},"total_fees_usd":{"type":"number","title":"Total Fees Usd"},"period":{"type":"string","title":"Period"}},"type":"object","required":["pending_count","completed_usd","total_fees_usd","period"],"title":"AdminWithdrawalStatsResponse"},"AdoptLinkRequest":{"properties":{"entity_type":{"type":"string","maxLength":32,"minLength":1,"title":"Entity Type"},"entity_id":{"type":"string","maxLength":64,"minLength":1,"title":"Entity Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"campaign":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Campaign"}},"additionalProperties":false,"type":"object","required":["entity_type","entity_id"],"title":"AdoptLinkRequest","description":"``POST /admin/links/{id}/adopt`` request body (Phase 92 / ADMR-05,\nplan 92-07). Per D-12's adoption model: the discovery sweep opens a\nSink-origin row with no attribution at all, and this body is the\nsuperuser's explicit action attaching meaning to it.\n\n``entity_type`` and ``entity_id`` are both required — an adopt call\nalways assigns a concrete entity, never a partial one. ``user_id`` is\noptional: an operator may adopt a row to an entity/campaign with no\nowning user, which the partial unique index and\n``ck_short_link_share_attribution`` both permit (a NULL ``user_id`` row\nnever participates in the D-1 share-identity uniqueness at all).\n``campaign`` defaults to the existing ``\"organic\"`` sentinel when\nomitted, matching every other writer of this column.\n\n``entity_id`` is a plain string, not a UUID — the same reason\n``ShareRequest.entity_id``'s docstring already gives: the registry's\nslots address their entities three different ways, and a UUID column\nwould force a migration on a live idempotency ledger the moment a\nnon-UUID-keyed entity type is adopted through.\n\n``model_config = ConfigDict(extra=\"forbid\")`` for the same reason\n``ShareRequest`` carries it: ``AppBaseModel`` declares no ``extra``\npolicy, so without this a caller-supplied key beyond the four declared\nfields would be silently IGNORED rather than rejected — and this body\nwrites directly into the idempotency ledger's attribution columns,\nwhere a silently-ignored field is a silent partial adoption."},"Ads":{"properties":{"ads_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Id"},"ads_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Group Id"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"video":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"pages":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pages"},"campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"sort_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort No"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Ads"},"AdsCreate":{"properties":{"ads_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Id"},"ads_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Group Id"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"video":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"pages":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pages"},"campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"sort_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort No"}},"type":"object","title":"AdsCreate"},"AdsUpdate":{"properties":{"ads_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Id"},"ads_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ads Group Id"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"video":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"pages":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pages"},"campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"sort_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort No"}},"type":"object","title":"AdsUpdate"},"AiHealthResponse":{"properties":{"upstream_configured":{"type":"boolean","title":"Upstream Configured"},"upstream_reachable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Upstream Reachable"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["upstream_configured"],"title":"AiHealthResponse"},"AlertListResponse":{"properties":{"alerts":{"items":{"$ref":"#/components/schemas/AlertOut"},"type":"array","title":"Alerts","default":[]},"total":{"type":"integer","title":"Total","default":0},"unresolved_count":{"type":"integer","title":"Unresolved Count","default":0}},"type":"object","title":"AlertListResponse"},"AlertOut":{"properties":{"rule_id":{"type":"string","format":"uuid","title":"Rule Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"severity":{"type":"string","title":"Severity"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body","default":""},"status":{"type":"string","enum":["open","investigating","resolved","false_positive"],"title":"Status","default":"open"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"}},"type":"object","required":["rule_id","event_id","severity","title","id"],"title":"AlertOut"},"AlertStatsOut":{"properties":{"open_count":{"type":"integer","title":"Open Count","default":0},"last_24h_count":{"type":"integer","title":"Last 24H Count","default":0},"avg_resolution_hours":{"type":"number","title":"Avg Resolution Hours","default":0.0},"false_positive_rate":{"type":"number","title":"False Positive Rate","default":0.0},"severity_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Severity Distribution","default":{}}},"type":"object","title":"AlertStatsOut"},"AlertUpdate":{"properties":{"status":{"anyOf":[{"type":"string","enum":["open","investigating","resolved","false_positive"]},{"type":"null"}],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"}},"type":"object","title":"AlertUpdate"},"AlgoSignalOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"algo_trader_id":{"type":"string","format":"uuid","title":"Algo Trader Id"},"coin_name":{"type":"string","title":"Coin Name"},"bar":{"type":"string","title":"Bar"},"bar_ts":{"type":"integer","title":"Bar Ts"},"position":{"type":"string","title":"Position"},"entry":{"type":"number","title":"Entry"},"stop":{"type":"number","title":"Stop"},"tp1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp1"},"tp2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp2"},"tp3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tp3"},"r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R Value"},"decision":{"type":"string","title":"Decision"},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"},"setup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"features":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Features"},"mode":{"type":"string","title":"Mode"},"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"},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false}},"type":"object","required":["id","algo_trader_id","coin_name","bar","bar_ts","position","entry","stop","decision","mode"],"title":"AlgoSignalOut"},"AlgoTraderOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"strategy_key":{"type":"string","title":"Strategy Key"},"bar":{"type":"string","title":"Bar"},"universe":{"type":"string","title":"Universe"},"params":{"type":"object","title":"Params","default":{}},"guard":{"type":"object","title":"Guard","default":{}},"enabled":{"type":"boolean","title":"Enabled"},"mode":{"type":"string","title":"Mode"},"state":{"type":"object","title":"State","default":{}},"last_tick_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Tick At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"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"},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"strategy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Name"},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"risk_profile":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Risk Profile"}},"type":"object","required":["id","user_id","name","strategy_key","bar","universe","enabled","mode"],"title":"AlgoTraderOut","description":"One ``algo_trader`` row plus registry / account decoration.\n\n``strategy_name`` and ``family`` come from the strategy registry,\n``user_email`` / ``user_name`` from the owning ``User`` — the handler\nfills them after ``model_validate(row)``."},"AlgoTraderPatch":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"mode":{"anyOf":[{"type":"string","enum":["shadow","live"]},{"type":"null"}],"title":"Mode"},"guard":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Guard"},"params":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Params"},"universe":{"anyOf":[{"type":"string","enum":["core","ext"]},{"type":"null"}],"title":"Universe"}},"additionalProperties":false,"type":"object","title":"AlgoTraderPatch","description":"Operator-editable fields. ``strategy_key``, ``bar``, ``name`` and the\nruntime ``state`` are not patchable — an unknown key is rejected rather\nthan silently dropped so a typo never passes as a no-op."},"AlgoTraderStatus":{"properties":{"trader":{"$ref":"#/components/schemas/AlgoTraderOut"},"open_setups":{"type":"integer","title":"Open Setups","default":0},"ban":{"type":"object","title":"Ban","default":{}},"signals_24h":{"additionalProperties":{"type":"integer"},"type":"object","title":"Signals 24H","default":{}},"last_signal_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Signal At"}},"type":"object","required":["trader"],"title":"AlgoTraderStatus"},"AnalystStatus":{"properties":{"analysts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysts","description":"Analyst Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Analyst Profile Image"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl","description":"Profit and Loss"},"net_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Pnl","description":"Net PnL"},"success":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Success","description":"Success"},"stopped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stopped","description":"Stopped"},"winrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Winrate","description":"Win Rate"},"r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R","description":"Cumulative PnL %"},"net_r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net R","description":"Net Cumulative PnL %"}},"type":"object","title":"AnalystStatus"},"AnalystStatusResponse":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AnalystStatus"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"AnalystStatusResponse"},"AnalyzeRequest":{"properties":{"analysis_type":{"type":"string","enum":["team","trader","app_status","recommend_team"],"title":"Analysis Type"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"trader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Id"},"team_style":{"type":"string","title":"Team Style","default":"general"},"context":{"anyOf":[{"$ref":"#/components/schemas/AssistantContext"},{"type":"null"}]}},"type":"object","required":["analysis_type","message"],"title":"AnalyzeRequest","description":"Request body for POST /ai/assistant/analyze.\n\nINTENTIONALLY has no user_id field: user_id comes from the authenticated\nsession, never from the client body (Codex HIGH #1).\n\nINTENTIONALLY has no team_id field: the Flutter 'team' analysis flow always\nanalyzes the authenticated user's own team and never sends a team identifier.\nAdding team_id would be dead surface that falsely implies cross-team selection\n(Codex cycle-2 LOW — removed for Phase 2)."},"ApiKeyCreate":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"items":{"$ref":"#/components/schemas/ApiKeyScopeEnum"},"type":"array","title":"Scopes"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["name","scopes","expires_at"],"title":"ApiKeyCreate"},"ApiKeyCreatedOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"is_active":{"type":"boolean","title":"Is Active"},"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"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","scopes","is_active","key"],"title":"ApiKeyCreatedOut"},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"is_active":{"type":"boolean","title":"Is Active"},"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"}},"type":"object","required":["id","name","key_prefix","scopes","is_active"],"title":"ApiKeyOut"},"ApiKeyScopeEnum":{"type":"string","enum":["setup:read","setup:write","watchlist:read","watchlist:write","portfolio:read","market:read","webhook:manage","user:read","foxy:snapshot","foxy:ask","foxy:vision","foxy:alerts"],"title":"ApiKeyScopeEnum"},"ApiKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApiKeyScopeEnum"},"type":"array"},{"type":"null"}],"title":"Scopes"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ApiKeyUpdate"},"AssistantChatRequest":{"properties":{"intent":{"type":"string","maxLength":64,"title":"Intent"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/HistoryMessage"},"type":"array","maxItems":50},{"type":"null"}],"title":"History"},"context":{"anyOf":[{"$ref":"#/components/schemas/AssistantContext"},{"type":"null"}]}},"type":"object","required":["intent","message"],"title":"AssistantChatRequest","description":"Request body for POST /ai/assistant/chat (D-01 breaking shape).\n\nThe Phase 1 { message, history, model? } shape is replaced by the D-01 contract.\nmodel field is intentionally absent — D-02: backend owns model selection."},"AssistantContext":{"properties":{"language":{"type":"string","maxLength":10,"title":"Language","default":"en"},"personality":{"type":"string","maxLength":32,"title":"Personality","default":"friendly"},"app_state":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"App State"}},"type":"object","title":"AssistantContext","description":"Per-request context sent by the client (language/personality hints only).\n\napp_state is an optional client hint; the 6a backend layer ignores it and\npulls authoritative data from its own DB + live market feed."},"AuditEventOut":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_type":{"type":"string","enum":["human","system","api"],"title":"User Type","default":"human"},"action":{"type":"string","title":"Action"},"resource_type":{"type":"string","title":"Resource Type","default":""},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"outcome":{"type":"string","enum":["SUCCESS","FAILURE"],"title":"Outcome","default":"SUCCESS"},"risk_level":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"],"title":"Risk Level","default":"LOW"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"geo_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geo Country"},"old_value":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Old Value"},"new_value":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"New Value"},"merkle_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merkle Hash"},"prev_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Hash"}},"type":"object","required":["action"],"title":"AuditEventOut"},"AuditSearchResult":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AuditEventOut"},"type":"array","title":"Events","default":[]},"total":{"type":"integer","title":"Total","default":0},"page":{"type":"integer","title":"Page","default":0}},"type":"object","title":"AuditSearchResult"},"AuditStatsOut":{"properties":{"total_24h":{"type":"integer","title":"Total 24H","default":0},"risk_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Risk Distribution","default":{}},"top_actions":{"items":{"type":"object"},"type":"array","title":"Top Actions","default":[]}},"type":"object","title":"AuditStatsOut"},"BalanceAllocationPayload":{"properties":{"exchange":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange"},"spot_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spot Balance"},"futures_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Futures Balance"},"use_earned_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Earned Balance"},"spot_max_total_risk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spot Max Total Risk"},"futures_max_total_risk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Futures Max Total Risk"}},"type":"object","title":"BalanceAllocationPayload"},"BalanceStateEnum":{"type":"string","enum":["not_set","low_balance","not_enough","ok","unknown"],"title":"BalanceStateEnum"},"BalanceWithExpiryResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"balance":{"type":"number","title":"Balance"},"expiring_soon_credits":{"type":"number","title":"Expiring Soon Credits","default":0.0},"expiring_soon_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiring Soon Date"}},"type":"object","required":["user_id","balance"],"title":"BalanceWithExpiryResponse"},"BanLimits":{"properties":{"daily":{"type":"number","title":"Daily"},"weekly":{"type":"number","title":"Weekly"},"monthly":{"type":"number","title":"Monthly"}},"type":"object","required":["daily","weekly","monthly"],"title":"BanLimits"},"BanStatusResponse":{"properties":{"banned":{"type":"boolean","title":"Banned"},"rule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"banned_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Banned Until"},"ban_r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ban R"},"daily_r":{"type":"number","title":"Daily R"},"weekly_r":{"type":"number","title":"Weekly R"},"monthly_r":{"type":"number","title":"Monthly R"},"limits":{"$ref":"#/components/schemas/BanLimits"}},"type":"object","required":["banned","daily_r","weekly_r","monthly_r","limits"],"title":"BanStatusResponse","description":"Authoritative trading-ban state, served to the mobile app.\n\nReplaces the client-side leaderboard-based ban computation, which\nproduced false bans whenever feed data was stale (2026-07-12 hakoi)."},"BankAccountListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BankAccountResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"BankAccountListResponse"},"BankAccountRequest":{"properties":{"iban":{"type":"string","title":"Iban"},"account_holder":{"type":"string","title":"Account Holder"},"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Name"},"swift_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swift Code"},"currency":{"type":"string","title":"Currency","default":"USD"}},"type":"object","required":["iban","account_holder"],"title":"BankAccountRequest"},"BankAccountResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"iban":{"type":"string","title":"Iban"},"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Name"},"account_holder":{"type":"string","title":"Account Holder"},"swift_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swift Code"},"currency":{"type":"string","title":"Currency"},"is_verified":{"type":"boolean","title":"Is Verified"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","user_id","iban","account_holder","currency","is_verified"],"title":"BankAccountResponse"},"Body_Update_Personal_Image_user_me_image_patch":{"properties":{"image_file":{"type":"string","format":"binary","title":"Image File"}},"type":"object","required":["image_file"],"title":"Body_Update_Personal_Image_user_me_image_patch"},"Body_Update_Profile_Image_trader_me_profile_image_patch":{"properties":{"image_file":{"type":"string","format":"binary","title":"Image File"}},"type":"object","required":["image_file"],"title":"Body_Update_Profile_Image_trader_me_profile_image_patch"},"Body_create_setup_setup_put":{"properties":{"item_in":{"type":"string","title":"Item In"},"image_file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Image File"}},"type":"object","required":["item_in"],"title":"Body_create_setup_setup_put"},"Body_login_auth_email_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"password"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_auth_email_login_post"},"Body_login_auth_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"password"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_auth_login_post"},"Body_update_setup_setup__setup_id__patch":{"properties":{"item_in":{"type":"string","title":"Item In"},"image_file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Image File"}},"type":"object","required":["item_in"],"title":"Body_update_setup_setup__setup_id__patch"},"Body_update_shop_image_market_shops__shop_id__image_patch":{"properties":{"image_file":{"type":"string","format":"binary","title":"Image File"}},"type":"object","required":["image_file"],"title":"Body_update_shop_image_market_shops__shop_id__image_patch"},"Body_update_success_image_setup__setup_id__success_image_patch":{"properties":{"image_file":{"type":"string","format":"binary","title":"Image File"}},"type":"object","required":["image_file"],"title":"Body_update_success_image_setup__setup_id__success_image_patch"},"BoostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"tier_name":{"type":"string","title":"Tier Name"},"daily_price_credits":{"type":"number","title":"Daily Price Credits"},"total_credits":{"type":"number","title":"Total Credits"},"days":{"type":"integer","title":"Days"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","target_type","target_id","tier_name","daily_price_credits","total_credits","days","expires_at","status"],"title":"BoostResponse"},"BoostTierResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"target_type":{"type":"string","title":"Target Type"},"daily_price_credits":{"type":"number","title":"Daily Price Credits"},"visibility_multiplier":{"type":"number","title":"Visibility Multiplier"},"is_featured":{"type":"boolean","title":"Is Featured"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","name","target_type","daily_price_credits","visibility_multiplier","is_featured","sort_order"],"title":"BoostTierResponse"},"BrandMetrics":{"properties":{"total_followers":{"type":"integer","title":"Total Followers","default":0},"new_followers_this_week":{"type":"integer","title":"New Followers This Week","default":0},"follower_growth_pct":{"type":"number","title":"Follower Growth Pct","default":0.0},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"leaderboard_position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Leaderboard Position"}},"type":"object","title":"BrandMetrics"},"BreakthroughPatch":{"properties":{"category":{"type":"string","title":"Category"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["category","enabled"],"title":"BreakthroughPatch"},"CalendarBase":{"properties":{"data_event_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Event Id"},"data_ecobaseid":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Ecobaseid"},"date":{"anyOf":[{},{"type":"null"}],"title":"Date"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"actual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual"},"forecast":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast"},"previous":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"measures":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Measures"},"usual_effect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usual Effect"},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency"},"next_release":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Release"},"cc_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cc Notes"},"why_traderscare":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why Traderscare"},"derived_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Derived Via"},"acro_expand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acro Expand"},"also_called":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Also Called"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"speaker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker"},"event_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Event Datetime"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"cc_notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cc Notice"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"}},"type":"object","title":"CalendarBase"},"CalendarList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CalendarBase"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"CalendarList"},"CampaignCreate":{"properties":{"title":{"type":"string","maxLength":120,"title":"Title"},"format":{"type":"string","enum":["banner","listing","push","infeed"],"title":"Format"},"pricing_model":{"type":"string","enum":["cpm","cpc"],"title":"Pricing Model","default":"cpm"},"content":{"type":"object","title":"Content"},"targeting":{"type":"object","title":"Targeting","default":{}},"total_budget":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Total Budget"},"daily_limit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Daily Limit"},"unit_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Unit Price"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"}},"type":"object","required":["title","format","content","total_budget","unit_price","ends_at"],"title":"CampaignCreate"},"CampaignUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Title"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"daily_limit":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Daily Limit"},"total_budget":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Total Budget"},"format":{"anyOf":[{"type":"string","enum":["banner","listing","push","infeed"]},{"type":"null"}],"title":"Format"},"pricing_model":{"anyOf":[{"type":"string","enum":["cpm","cpc"]},{"type":"null"}],"title":"Pricing Model"},"content":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Content"},"targeting":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Targeting"},"unit_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Unit Price"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"}},"type":"object","title":"CampaignUpdate"},"CanUpdate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id"],"title":"CanUpdate"},"CanUpdateCreate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","title":"CanUpdateCreate"},"CategoriesEnum":{"type":"string","enum":["spot","futures"],"title":"CategoriesEnum"},"CategoryCatalogEntry":{"properties":{"key":{"type":"string","title":"Key"},"quiet_hours_breakthrough_allowed":{"type":"boolean","title":"Quiet Hours Breakthrough Allowed"}},"type":"object","required":["key","quiet_hours_breakthrough_allowed"],"title":"CategoryCatalogEntry"},"CategoryPerformance":{"properties":{"category":{"type":"string","title":"Category"},"count":{"type":"integer","title":"Count","default":0},"win_rate":{"type":"number","title":"Win Rate","default":0.0},"total_pnl":{"type":"number","title":"Total Pnl","default":0.0}},"type":"object","required":["category"],"title":"CategoryPerformance"},"ChannelValveState":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"layer":{"type":"string","title":"Layer"}},"type":"object","required":["enabled","layer"],"title":"ChannelValveState","description":"One channel's live valve decision for one event (catalog + env layer\nonly — the DB layer does not exist until Phase 110)."},"ChatRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"minLength":1,"title":"Prompt"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session","default":false},"focus_coin":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Focus Coin","description":"Optional coin pair like BTCUSDT — if given the LLM will fetch a CoinGlass + Arkham snapshot and include it in the prompt."}},"type":"object","required":["prompt"],"title":"ChatRequest","description":"Trader-facing AI Coach chat request.\n\n`session_id` is optional — server will mint one when missing or when\n`is_new_session=True`. Trader context is fetched from DB; the frontend\nnever sends a trader_id."},"ChatResponse":{"properties":{"message":{"type":"string","title":"Message"},"answer_kind":{"type":"string","title":"Answer Kind","default":"generated"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Information only. No order execution or investment advice."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"total_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Token"},"market_snapshot":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Market Snapshot"},"evidence":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["message","is_new_session"],"title":"ChatResponse"},"CheckoutRequest":{"properties":{"usd_amount":{"type":"number","exclusiveMinimum":0.0,"title":"Usd Amount"}},"type":"object","required":["usd_amount"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse"},"ClassifyRequest":{"properties":{"kind":{"type":"string","enum":["crypto","trader_query"],"title":"Kind"},"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"context":{"anyOf":[{"$ref":"#/components/schemas/AssistantContext"},{"type":"null"}]}},"type":"object","required":["kind","message"],"title":"ClassifyRequest","description":"Request body for POST /ai/assistant/classify."},"ClickPayload":{"properties":{"campaign_id":{"type":"integer","title":"Campaign Id"}},"type":"object","required":["campaign_id"],"title":"ClickPayload"},"Coin":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_spot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Spot"},"is_futures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Futures"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"code_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Name"},"has_active_setup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Active Setup"},"has_incoming_setup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Incoming Setup"}},"type":"object","title":"Coin","example":{"code":"BTC/USDT","image":"https://static.coincost.net/logo/cryptocurrency/bitcoin.png","is_futures":true,"is_spot":true,"name":"Bitcoin"}},"CoinCreate":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_spot":{"type":"boolean","title":"Is Spot"},"is_futures":{"type":"boolean","title":"Is Futures"}},"type":"object","required":["name","code","is_spot","is_futures"],"title":"CoinCreate","example":{"code":"BTC/USDT","image":"https://static.coincost.net/logo/cryptocurrency/bitcoin.png","is_futures":true,"is_spot":true,"name":"Bitcoin"}},"CoinPerformance":{"properties":{"coin":{"type":"string","title":"Coin"},"count":{"type":"integer","title":"Count","default":0},"total_pnl":{"type":"number","title":"Total Pnl","default":0.0}},"type":"object","required":["coin"],"title":"CoinPerformance"},"CoinUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_spot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Spot"},"is_futures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Futures"}},"type":"object","title":"CoinUpdate","example":{"code":"BTC/USDT","image":"https://static.coincost.net/logo/cryptocurrency/bitcoin.png","is_futures":true,"is_spot":true,"name":"Bitcoin"}},"CompareData":{"properties":{"traders":{"items":{"$ref":"#/components/schemas/TraderCompareItem"},"type":"array","title":"Traders","default":[]}},"type":"object","title":"CompareData"},"ConsentDraftIn":{"properties":{"purpose":{"type":"string","const":"marketing","title":"Purpose"},"regime":{"type":"string","enum":["eu_eea","turkey"],"title":"Regime"},"is_material":{"type":"boolean","title":"Is Material"},"bodies":{"additionalProperties":{"type":"string"},"type":"object","title":"Bodies"}},"type":"object","required":["purpose","regime","is_material","bodies"],"title":"ConsentDraftIn","description":"The operator create-draft request (plan 06, D-04/114 D-09) — mirrors\n`apps.notification.consent.schemas.ConsentTextPublishIn`'s shape."},"ConsentDraftPatch":{"properties":{"regime":{"anyOf":[{"type":"string","enum":["eu_eea","turkey"]},{"type":"null"}],"title":"Regime"},"is_material":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Material"},"bodies":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Bodies"}},"type":"object","title":"ConsentDraftPatch","description":"Every field optional — a patch only changes what it names."},"ConsentTextPublishIn":{"properties":{"purpose":{"type":"string","const":"marketing","title":"Purpose"},"regime":{"type":"string","enum":["eu_eea","turkey"],"title":"Regime"},"is_material":{"type":"boolean","title":"Is Material"},"bodies":{"additionalProperties":{"type":"string"},"type":"object","title":"Bodies"}},"type":"object","required":["purpose","regime","is_material","bodies"],"title":"ConsentTextPublishIn","description":"The operator publish request (D-09). `regime` is closed to the two\npublishable regimes — `unknown_other` has no text because nothing is\never sendable under it (plan 01)."},"ContentIngestIn":{"properties":{"trader_id":{"type":"string","title":"Trader Id"},"platform":{"$ref":"#/components/schemas/SocialPlatform"},"platform_content_id":{"type":"string","title":"Platform Content Id"},"content_type":{"$ref":"#/components/schemas/SocialContentType"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"caption_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption Text"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"has_bottomup_app_link":{"type":"boolean","title":"Has Bottomup App Link","default":false},"has_performance_screenshot":{"type":"boolean","title":"Has Performance Screenshot","default":false},"media_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Hash"},"metrics":{"anyOf":[{"$ref":"#/components/schemas/ContentMetricsIn"},{"type":"null"}]},"follower_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Follower Count"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"follower_count_at_post_time":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Follower Count At Post Time"}},"type":"object","required":["trader_id","platform","platform_content_id","content_type","published_at"],"title":"ContentIngestIn"},"ContentMetricsIn":{"properties":{"likes":{"type":"integer","minimum":0.0,"title":"Likes","default":0},"comments":{"type":"integer","minimum":0.0,"title":"Comments","default":0},"shares":{"type":"integer","minimum":0.0,"title":"Shares","default":0},"saves":{"type":"integer","minimum":0.0,"title":"Saves","default":0},"views":{"type":"integer","minimum":0.0,"title":"Views","default":0},"link_clicks":{"type":"integer","minimum":0.0,"title":"Link Clicks","default":0}},"type":"object","title":"ContentMetricsIn"},"CopierFillOut":{"properties":{"fill_kind":{"type":"string","enum":["exit_close","exit_partial"],"title":"Fill Kind"},"percent_of_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percent Of Remaining"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"additionalProperties":false,"type":"object","required":["fill_kind","occurred_at"],"title":"CopierFillOut","description":"One partial-close fact, limited to what a fill can honestly say.\n\nThere is deliberately NO `quantity` field and NO `price` field on this\nmodel at all. `quantity` is NULL on every shipped row and is never derived\nfrom `percent_of_remaining` (D-80-03-D); `price` is NULL on every\n`exit_partial` (`models.py:5147-5170`), so a price key here would be a\nslot that is null for exactly the rows this model mostly describes. The\nclosing price ships on the trade row as `exit_price`, sourced only from an\n`exit_close` fill, which makes \"no partial-exit price\" an exact key-set\nproperty rather than a value that happens to be null."},"CopierTradeRowOut":{"properties":{"copy_attempt_id":{"type":"string","format":"uuid","title":"Copy Attempt Id"},"attempt_no":{"type":"integer","title":"Attempt No"},"setup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"connection_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Session Id"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"},"session_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Session Archived"},"remote_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote State"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"terminal_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terminal At"},"value_state":{"type":"string","enum":["totalled","not_totalled"],"title":"Value State"},"gross_realised":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gross Realised"},"refusal_reason_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal Reason Text"},"fee_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Amount"},"fee_amount_basis":{"anyOf":[{"type":"string","enum":["trade_cumulative","leg_incremental","unknown","bill_scoped"]},{"type":"null"}],"title":"Fee Amount Basis"},"fee_is_summable":{"type":"boolean","title":"Fee Is Summable","default":false},"fee_withheld_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fee Withheld Reason"},"net_value_state":{"type":"string","enum":["totalled","not_totalled"],"title":"Net Value State"},"net_realised":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Net Realised"},"net_withheld_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Net Withheld Reason"},"exit_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exit Price"},"partial_closes":{"items":{"$ref":"#/components/schemas/CopierFillOut"},"type":"array","title":"Partial Closes","default":[]}},"additionalProperties":false,"type":"object","required":["copy_attempt_id","attempt_no","value_state","net_value_state"],"title":"CopierTradeRowOut","description":"One economic-trade lifecycle — one `CopyAttempt` (D-10).\n\nThe realised disposition comes from the SAME selector call the summary and\nthe series use, so a row and the total that would have contained it can\nnever disagree. A refused row carries `gross_realised: null` and its\nrefusal prose; withholding is a property of the TOTAL, not of the facts,\nso the row still renders.\n\nOpen/closed state is read from `RemoteCopyBinding.remote_state`\n(`models.py:4777`, UNIQUE per attempt at `:4782`), never from\n`CopyAttempt.state` — that is the attempt's OUTCOME and may not be moved\nout of `error` by any callback."},"CopyTrade":{"properties":{"profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"profit_taking_amount_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 1"},"profit_taking_amount_2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 2"},"profit_taking_amount_3":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 3"},"category":{"$ref":"#/components/schemas/CategoriesEnum","default":"spot"},"order_type":{"$ref":"#/components/schemas/OrderTypeEnum","default":"limit"},"status":{"$ref":"#/components/schemas/StatusesEnum","default":"incoming"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value"},"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R Value"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"duration":{"anyOf":[{"$ref":"#/components/schemas/DurationsEnum"},{"type":"null"}]},"entry_value_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value End"},"position":{"anyOf":[{"$ref":"#/components/schemas/PositionsEnum"},{"type":"null"}]},"id":{"type":"string","format":"uuid","title":"Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_targeted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Targeted"},"is_hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hidden"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date"},"activation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activation Date"},"activated_stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Activated Stop Value"},"tags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tags"},"open_leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Leverage"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"sub_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Status"},"is_watchlisted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Watchlisted"},"is_clap":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Clap"},"is_copied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copied"},"copy_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy State"},"copy_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Message"},"copy_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Code"},"copy_error_message_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Message Key"},"copy_error_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Reason"},"copy_error_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Action"},"copy_retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Retryable"},"copy_next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Copy Next Retry At"},"copy_attempt_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Copy Attempt No"},"copy_connection_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Connection Session Id"},"copy_session_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Session Archived"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"is_tp1":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp1"},"is_tp2":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp2"},"is_tp3":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp3"},"tp1_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp1 Date"},"tp2_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp2 Date"},"tp3_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp3 Date"},"close_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Close Price"},"close_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Close Date"},"remaining_size_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Remaining Size Pct","default":100.0},"partial_closes":{"anyOf":[{"items":{"$ref":"#/components/schemas/SetupPartialCloseOut"},"type":"array"},{"type":"null"}],"title":"Partial Closes"},"risk_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Ratio"},"initial_risk_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Risk Ratio"},"previous_entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Entry Value"},"previous_entry_value_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Entry Value End"},"previous_profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking 1"},"previous_profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking 2"},"previous_profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking 3"},"previous_profit_taking_amount_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking Amount 1"},"previous_profit_taking_amount_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking Amount 2"},"previous_profit_taking_amount_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking Amount 3"},"previous_stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Stop Value"},"stop_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Distance"},"is_stop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Stop"},"stop_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stop Date"},"image_success":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Success"},"view_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"View Count"},"clap_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clap Count"},"coin_icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Icon"},"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"},"trader":{"anyOf":[{"$ref":"#/components/schemas/TraderInfo"},{"type":"null"}]},"price_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Credits","default":0},"is_purchased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Purchased"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"copy_trade":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeUpdate-Output"},{"type":"null"}]},"is_expiry_warning":{"type":"boolean","title":"Is Expiry Warning","description":"Futures işlemlerde aktivasyondan 21+ gün geçmişse True döner.\nTrader panelinde ünlem işareti göstermek için kullanılır.","readOnly":true}},"type":"object","required":["is_expiry_warning"],"title":"CopyTrade"},"CopyTradeBestWorst":{"properties":{"coin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin"},"pnl":{"type":"number","title":"Pnl","default":0.0}},"type":"object","title":"CopyTradeBestWorst"},"CopyTradeByMarket":{"properties":{"market":{"type":"string","title":"Market"},"trades":{"type":"integer","title":"Trades","default":0},"pnl":{"type":"number","title":"Pnl","default":0.0}},"type":"object","required":["market"],"title":"CopyTradeByMarket"},"CopyTradeList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CopyTrade"},"type":"array"},{"type":"null"}],"title":"Data"},"total_active_risk_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Active Risk Usd"}},"type":"object","title":"CopyTradeList"},"CopyTradeOrder":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/StatusesEnum"},{"type":"null"}],"description":"Status"},"status_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Status At","description":"Status Datetime"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","description":"Status message"},"requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested At","description":"Requested Datetime"},"request_sz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Request Sz","description":"Request size"},"request_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Request Px","description":"Request Price"},"take_profit_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Take Profit Px","description":"Profit Taking Price"},"stop_loss_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Loss Px","description":"Stop-loss Price"},"act_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Act Px","description":"Accumulated Price"},"act_sz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Act Sz","description":"Accumulated Size"},"percentage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percentage","description":"Percentage of buying amount"}},"type":"object","title":"CopyTradeOrder"},"CopyTradeOrderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"side":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Side"},"tp_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tp Value"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"status_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Status At"},"request_sz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Request Sz"},"request_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Request Px"},"act_sz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Act Sz"},"act_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Act Px"},"exchange_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange Order Id"}},"type":"object","required":["id"],"title":"CopyTradeOrderResponse"},"CopyTradeOrders-Input":{"properties":{"entry":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrder"},{"type":"null"}],"description":"Buying Order"},"exit":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrder"},{"type":"null"}],"description":"Selling Order"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"TogetherService leg-level structured rejection reason, Phase 112"},"okx_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Okx Error Code","description":"Raw OKX sCode for this leg's rejection, Phase 112"}},"type":"object","title":"CopyTradeOrders"},"CopyTradeOrders-Output":{"properties":{"entry":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrder"},{"type":"null"}],"description":"Buying Order"},"exit":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrder"},{"type":"null"}],"description":"Selling Order"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"TogetherService leg-level structured rejection reason, Phase 112"},"okx_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Okx Error Code","description":"Raw OKX sCode for this leg's rejection, Phase 112"}},"type":"object","title":"CopyTradeOrders"},"CopyTradePerformance":{"properties":{"active_trades":{"type":"integer","title":"Active Trades","default":0},"total_trades":{"type":"integer","title":"Total Trades","default":0},"total_pnl":{"type":"number","title":"Total Pnl","default":0.0},"win_rate":{"type":"number","title":"Win Rate","default":0.0},"best_trade":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeBestWorst"},{"type":"null"}]},"worst_trade":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeBestWorst"},{"type":"null"}]},"by_market":{"items":{"$ref":"#/components/schemas/CopyTradeByMarket"},"type":"array","title":"By Market","default":[]}},"type":"object","title":"CopyTradePerformance"},"CopyTradeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"setup_id":{"type":"string","format":"uuid","title":"Setup Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"error_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error No"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market"},"copied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Copied At"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"},"realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Pnl"},"roe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roe"},"leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leverage"},"orders":{"anyOf":[{"items":{"$ref":"#/components/schemas/CopyTradeOrderResponse"},"type":"array"},{"type":"null"}],"title":"Orders"}},"type":"object","required":["id","user_id","trader_id","setup_id"],"title":"CopyTradeResponse"},"CopyTradeState":{"properties":{"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market","examples":["Okx"]},"market_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Uid","examples":["1234567890"]},"is_connected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Connected"},"is_paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Paused"},"can_copy_trade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Copy Trade"}},"type":"object","title":"CopyTradeState"},"CopyTradeUpdate-Input":{"properties":{"state":{"anyOf":[{"$ref":"#/components/schemas/SetupOrderStateEnum"},{"type":"null"}],"description":"Status"},"error_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error No","description":"Error No"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Status message"},"copied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Copied At","description":"Copied Datetime"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At","description":"Activated Datetime"},"realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Pnl","description":"Realized PNL"},"roe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roe","description":"Return on Equity"},"leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leverage","description":"Leverage"},"pnl_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl Percentage","description":"PNL Percentage"},"position_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Size","description":"Position Size"},"position_size_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Size Usd","description":"Position Size USD"},"starting_equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Starting Equity","description":"Starting Equity"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market"},"setup_id":{"type":"string","format":"uuid","title":"Setup Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"tp1":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrders-Input"},{"type":"null"}],"description":"Orders for profit taking 1"},"tp2":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrders-Input"},{"type":"null"}],"description":"Orders for profit taking 2"},"tp3":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrders-Input"},{"type":"null"}],"description":"Orders for profit taking 3"},"unrealized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unrealized Pnl","description":"Unrealized PNL"},"partial_close_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Partial Close Id","description":"setup_partial_close.id for this reduce"}},"type":"object","required":["setup_id","user_id"],"title":"CopyTradeUpdate"},"CopyTradeUpdate-Output":{"properties":{"state":{"anyOf":[{"$ref":"#/components/schemas/SetupOrderStateEnum"},{"type":"null"}],"description":"Status"},"error_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error No","description":"Error No"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Status message"},"copied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Copied At","description":"Copied Datetime"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At","description":"Activated Datetime"},"realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Pnl","description":"Realized PNL"},"roe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roe","description":"Return on Equity"},"leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leverage","description":"Leverage"},"pnl_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl Percentage","description":"PNL Percentage"},"position_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Size","description":"Position Size"},"position_size_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Size Usd","description":"Position Size USD"},"starting_equity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Starting Equity","description":"Starting Equity"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market"},"setup_id":{"type":"string","format":"uuid","title":"Setup Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"tp1":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrders-Output"},{"type":"null"}],"description":"Orders for profit taking 1"},"tp2":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrders-Output"},{"type":"null"}],"description":"Orders for profit taking 2"},"tp3":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeOrders-Output"},{"type":"null"}],"description":"Orders for profit taking 3"},"unrealized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unrealized Pnl","description":"Unrealized PNL"},"partial_close_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Partial Close Id","description":"setup_partial_close.id for this reduce"}},"type":"object","required":["setup_id","user_id"],"title":"CopyTradeUpdate"},"CorrelationRuleCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"enabled":{"type":"boolean","title":"Enabled","default":true},"conditions":{"items":{"$ref":"#/components/schemas/RuleCondition"},"type":"array","title":"Conditions","default":[]},"correlation_type":{"type":"string","enum":["threshold","sequence","aggregation"],"title":"Correlation Type"},"window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Seconds"},"threshold_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Threshold Count"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By"},"sequence_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/RuleCondition"},"type":"array"},{"type":"null"}],"title":"Sequence Steps"},"sequence_max_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Max Seconds"},"aggregate_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate Field"},"aggregate_fn":{"anyOf":[{"type":"string","enum":["sum","count","max"]},{"type":"null"}],"title":"Aggregate Fn"},"aggregate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate Threshold"},"aggregate_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aggregate Window Days"},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"],"title":"Severity","default":"MEDIUM"},"alert_title":{"type":"string","title":"Alert Title","default":""},"alert_template":{"type":"string","title":"Alert Template","default":""},"suppress_seconds":{"type":"integer","title":"Suppress Seconds","default":300}},"type":"object","required":["name","correlation_type"],"title":"CorrelationRuleCreate"},"CorrelationRuleOut":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"enabled":{"type":"boolean","title":"Enabled","default":true},"conditions":{"items":{"$ref":"#/components/schemas/RuleCondition"},"type":"array","title":"Conditions","default":[]},"correlation_type":{"type":"string","enum":["threshold","sequence","aggregation"],"title":"Correlation Type"},"window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window Seconds"},"threshold_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Threshold Count"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By"},"sequence_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/RuleCondition"},"type":"array"},{"type":"null"}],"title":"Sequence Steps"},"sequence_max_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Max Seconds"},"aggregate_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate Field"},"aggregate_fn":{"anyOf":[{"type":"string","enum":["sum","count","max"]},{"type":"null"}],"title":"Aggregate Fn"},"aggregate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aggregate Threshold"},"aggregate_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aggregate Window Days"},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"],"title":"Severity","default":"MEDIUM"},"alert_title":{"type":"string","title":"Alert Title","default":""},"alert_template":{"type":"string","title":"Alert Template","default":""},"suppress_seconds":{"type":"integer","title":"Suppress Seconds","default":300},"rule_id":{"type":"string","format":"uuid","title":"Rule Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["name","correlation_type","rule_id"],"title":"CorrelationRuleOut"},"CorrelationRuleUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"suppress_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Suppress Seconds"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CorrelationRuleUpdate"},"CreateBoostRequest":{"properties":{"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"tier_name":{"type":"string","title":"Tier Name"},"days":{"type":"integer","maximum":30.0,"minimum":7.0,"title":"Days"}},"type":"object","required":["target_type","target_id","tier_name","days"],"title":"CreateBoostRequest"},"CreateDisputeRequest":{"properties":{"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"reason":{"type":"string","maxLength":64,"title":"Reason"},"description":{"type":"string","maxLength":2048,"title":"Description"}},"type":"object","required":["shop_id","reason","description"],"title":"CreateDisputeRequest"},"CreditLotItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_type":{"type":"string","title":"Source Type"},"original_amount":{"type":"number","title":"Original Amount"},"remaining_amount":{"type":"number","title":"Remaining Amount"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","source_type","original_amount","remaining_amount"],"title":"CreditLotItem"},"CreditLotListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditLotItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CreditLotListResponse"},"CreditPackageAdminResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"credits":{"type":"number","title":"Credits"},"bonus_credits":{"type":"number","title":"Bonus Credits"},"price_usd":{"type":"number","title":"Price Usd"},"apple_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apple Product Id"},"google_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Product Id"},"is_active":{"type":"boolean","title":"Is Active"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At"},"display_order":{"type":"integer","title":"Display Order","default":0},"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"}},"type":"object","required":["id","name","credits","bonus_credits","price_usd","is_active"],"title":"CreditPackageAdminResponse","description":"One credit package as the *operator* sees it.\n\nDeliberately wider than `CreditPackageItem`: it shows retired packages and\nthe retirement stamp, so an operator can audit the full catalog. It is\nsuperuser-only (D-85-12), so the extra visibility is not a client-facing\ndisclosure.\n\n`model_config` is declared HERE, on the schema itself, and must stay here.\n`AppBaseModel` (apps/schemas.py:7) is deliberately bare and has never\ncarried `from_attributes`; putting it there would change validation\nsemantics for all 400+ subclasses. Omitting it here is not a validation\nwarning but a 500 at the serialization boundary, latent until the table\nholds its first row."},"CreditPackageCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"credits":{"type":"number","exclusiveMinimum":0.0,"title":"Credits"},"bonus_credits":{"type":"number","minimum":0.0,"title":"Bonus Credits","default":0.0},"price_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Price Usd"},"apple_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apple Product Id"},"google_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Product Id"},"is_active":{"type":"boolean","title":"Is Active","default":true},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["name","credits","price_usd"],"title":"CreditPackageCreateRequest","description":"Operator payload for adding a package to the catalog (PKG-03).\n\nThe `gt=0` bounds on `credits` and `price_usd` are what make a zero-credit\nor zero-price package structurally unreachable, so the client-facing list\ncan never contain one."},"CreditPackageItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"credits":{"type":"number","title":"Credits"},"bonus_credits":{"type":"number","title":"Bonus Credits"},"total_credits":{"type":"number","title":"Total Credits","default":0.0},"price_usd":{"type":"number","title":"Price Usd"},"apple_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apple Product Id"},"google_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Product Id"},"display_order":{"type":"integer","title":"Display Order","default":0},"credits_expire_after_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Expire After Days"}},"type":"object","required":["id","name","credits","bonus_credits","price_usd"],"title":"CreditPackageItem","description":"One purchasable credit bundle as the client sees it.\n\n`model_config` is declared HERE, on the schema itself, and must stay here.\n`AppBaseModel` (apps/schemas.py:7) is deliberately bare and has never\ncarried `from_attributes`; putting it there instead would change validation\nsemantics for all 400+ subclasses, many of which validate plain dicts.\n\nThe failure mode of omitting it is not a validation warning — it is a 500\nraised at the serialization boundary by `model_validate(orm_row)`, and it\nstays latent while the table is empty (an empty catalog serializes fine),\nso it would surface only once the first real package is created. That is\nhow seven of these reached production in July 2026.\n\nD-85-03: no field here exposes the internal USD-per-credit rate. The client\ncontract is the explicit per-package numbers."},"CreditPackageUpdateRequest":{"properties":{"credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits"},"bonus_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bonus Credits"},"apple_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apple Product Id"},"google_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Product Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"price_usd":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Price Usd"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"CreditPackageUpdateRequest","description":"Operator payload for repricing / retiring a package (PKG-03).\n\nThis is deliberately NOT a blanket `Optional` mirror of the create request.\nFour fields are **immutable after create**:\n\n| Field               | Update    | Why |\n|---------------------|-----------|-----|\n| `credits`           | immutable | Phase 86 resolves a receipt against the live row; changing this rewrites what an in-flight purchase grants |\n| `bonus_credits`     | immutable | same — it is part of the granted amount |\n| `apple_product_id`  | immutable | the id a receipt resolves *by*; moving it re-points an already-published SKU at different terms |\n| `google_product_id` | immutable | same |\n| `name`              | mutable   | display only |\n| `price_usd`         | mutable   | display-only reference (D-85-04); the store charges, so repricing grants nobody anything different |\n| `is_active`         | mutable   | the \"retire\" half of PKG-03 (reactivation is refused) |\n| `display_order`     | mutable   | display only |\n\nThe four immutable fields are still *declared* here — rather than omitted,\nor excluded via `extra=\"forbid\"` — so that naming one produces an explicit,\nactionable 400 saying which field it was and that it cannot change after\ncreate. `extra=\"forbid\"` would produce a generic 422 that tells the operator\nnothing; omitting the fields would silently drop them.\n\nThe route MUST drive off `model_fields_set` / `model_dump(exclude_unset=True)`,\nnever `if payload.X is not None`: with every field defaulting to `None`, the\n`is not None` form cannot tell an explicit JSON `null` (\"clear this\") from an\nomitted field (\"leave it\"), which would make every refusal an unreachable\nno-op that returns 200."},"CreditPurchaseValidateRequest":{"properties":{"store":{"type":"string","enum":["apple","google"],"title":"Store"},"receipt":{"anyOf":[{"type":"object"},{"type":"string"}],"title":"Receipt"}},"type":"object","required":["store","receipt"],"title":"CreditPurchaseValidateRequest","description":"Client payload for `POST /credits/purchases/validate`.\n\nThis is a TYPED model, not the untyped `Body(...)` the legacy membership\nroute uses, so the contract is discoverable from OpenAPI and a generated\nclient can find it.\n\n**The receipt encoding is asymmetric between the stores, and that asymmetry\nis deliberate.** `mobile/lib/module/api/purchase_api_client.dart:9-21`\nrecords that Google's `originalJson` must travel as a JSON *object* while\nApple's `serverVerificationData` must travel as a JSON-encoded *string* —\nwrapping the Google object in quotes broke it in production once already.\nRather than ask the client to change its encoding, this field accepts\neither shape and the route disambiguates on `store`:\n\n* `store=\"apple\"` → `receipt` MUST be the raw JWS **string**. A dict is\n  rejected at validation time (422): an Apple receipt is never an object.\n* `store=\"google\"` → `receipt` is the `originalJson` **object**. A string\n  is also accepted and `json.loads`-ed by the route; a string that does not\n  parse into an object becomes a coded\n  `credit_purchase_store_verification_failed` (400), not a 500."},"CreditPurchaseValidateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"store":{"type":"string","title":"Store"},"product_id":{"type":"string","title":"Product Id"},"package_id":{"type":"string","format":"uuid","title":"Package Id"},"credits_granted":{"type":"number","title":"Credits Granted"},"status":{"type":"string","title":"Status"},"balance":{"type":"number","title":"Balance","default":0.0},"duplicate":{"type":"boolean","title":"Duplicate","default":false}},"type":"object","required":["id","store","product_id","package_id","credits_granted","status"],"title":"CreditPurchaseValidateResponse","description":"The result of redeeming one store receipt.\n\n`model_config` is declared HERE, on the schema itself, and must stay here.\n`AppBaseModel` (apps/schemas.py:7) is deliberately bare and has never\ncarried `from_attributes`; putting it there instead would change validation\nsemantics for all 400+ subclasses, many of which validate plain dicts.\n\nThe failure mode of omitting it is not a validation warning — it is a 500\nraised at the serialization boundary by `model_validate(orm_row)`, latent\nwhile the table is empty and surfacing only once a real row exists. That is\nhow seven of these reached production in July 2026.\n\n`balance` and `duplicate` are computed by the route, not columns, so they\ncarry defaults that survive `model_validate(purchase_row)` and are assigned\nafterwards.\n\n`duplicate` is true when this call was an idempotent replay of the\n*caller's own* earlier grant (D-86-05). A replay of somebody else's receipt\nis not a duplicate — it is a 409 `credit_purchase_already_claimed`."},"CryptoStreamRequest":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/HistoryMessage"},"type":"array","maxItems":50},{"type":"null"}],"title":"History"},"context":{"anyOf":[{"$ref":"#/components/schemas/AssistantContext"},{"type":"null"}]}},"type":"object","required":["message"],"title":"CryptoStreamRequest","description":"Request body for POST /ai/assistant/crypto/stream (D-04, D-07).\n\nBackend owns prompt construction — client sends only message + optional history.\nNo app_state injection (D-07: crypto stream is app-context-free).\ncontext carries only a language hint (personality unused for crypto)."},"CryptoWalletConnectRequest":{"properties":{"address":{"type":"string","title":"Address"},"chain":{"type":"string","title":"Chain"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"}},"type":"object","required":["address","chain"],"title":"CryptoWalletConnectRequest"},"CryptoWalletListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CryptoWalletResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CryptoWalletListResponse"},"CryptoWalletResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"address":{"type":"string","title":"Address"},"chain":{"type":"string","title":"Chain"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_verified":{"type":"boolean","title":"Is Verified"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","user_id","address","chain","is_verified"],"title":"CryptoWalletResponse"},"DailyNewSubscription":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["date","count"],"title":"DailyNewSubscription"},"DailyReportOut":{"properties":{"report_date":{"type":"string","format":"date-time","title":"Report Date"},"premium_users":{"type":"integer","title":"Premium Users","default":0},"premium_users_apple":{"type":"integer","title":"Premium Users Apple","default":0},"premium_users_google":{"type":"integer","title":"Premium Users Google","default":0},"signins_today":{"type":"integer","title":"Signins Today","default":0},"installs_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installs Total"},"installs_ios":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installs Ios"},"installs_android":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installs Android"}},"type":"object","required":["report_date"],"title":"DailyReportOut","description":"Full snapshot record — used for the /latest endpoint."},"DailyReportPoint":{"properties":{"report_date":{"type":"string","format":"date-time","title":"Report Date"},"premium_users":{"type":"integer","title":"Premium Users","default":0},"premium_users_apple":{"type":"integer","title":"Premium Users Apple","default":0},"premium_users_google":{"type":"integer","title":"Premium Users Google","default":0},"signins_today":{"type":"integer","title":"Signins Today","default":0},"installs_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installs Total"},"installs_ios":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installs Ios"},"installs_android":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installs Android"}},"type":"object","required":["report_date"],"title":"DailyReportPoint","description":"A single time-series point — used for the /series endpoint."},"DecisionStepBatchIn":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/DecisionStepIn"},"type":"array","maxItems":100,"minItems":1,"title":"Steps"}},"type":"object","required":["steps"],"title":"DecisionStepBatchIn","description":"Batch wrapper for the ingest endpoint.\n\n`min_length=1` rejects empty payloads; `max_length=100` enforces D-11.\nBoth bounds raise Pydantic ValidationError → FastAPI 422 BEFORE the\nhandler runs (per D-11 these are caller bugs, not per-step failures)."},"DecisionStepIn":{"properties":{"trace_id":{"type":"string","maxLength":36,"title":"Trace Id"},"copier_user_id":{"type":"string","format":"uuid","title":"Copier User Id"},"setup_id":{"type":"string","format":"uuid","title":"Setup Id"},"step":{"type":"string","maxLength":200,"title":"Step"},"outcome":{"type":"string","enum":["pass","fail"],"title":"Outcome"},"detail":{"anyOf":[{},{"type":"null"}],"title":"Detail"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"additionalProperties":false,"type":"object","required":["trace_id","copier_user_id","setup_id","step","outcome","event_id"],"title":"DecisionStepIn","description":"Real-ingest projection of a copy-decision-funnel step (Plan 20-02).\n\nMirrors the (trace_id, copier_user_id, setup_id, step) idempotency key\nof Phase 19's `DecisionStepKey` and adds the persistence-side fields\n(outcome, detail, event_id). Does NOT inherit from `DecisionStepKey`\nbecause that parent declares `attempt: Optional[int] = None` — extras\nmust FORBID an explicit `attempt` per D-06 (server-computed), and an\n`extra=\"forbid\"` ConfigDict cannot reject a field declared on the\nparent. Redeclaring keeps the contract tight."},"DeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"DeleteResponse"},"DeletedIdentityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Hash"},"phone_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Hash"},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At"},"former_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Former User Id"},"former_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Former Created At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","deleted_at"],"title":"DeletedIdentityOut","description":"OPS-01: append-only campaign-abuse identity ledger row.\n\nHashed-only per locked decision #5 + T-53-04-V8 — the source model\nstores no plaintext email/phone, so this out-model must never expose or\nre-derive one."},"DeletionCheck":{"properties":{"can_delete":{"type":"boolean","title":"Can Delete"},"blockers":{"items":{"$ref":"#/components/schemas/DeletionCheckItem"},"type":"array","title":"Blockers","default":[]},"warnings":{"items":{"$ref":"#/components/schemas/DeletionCheckItem"},"type":"array","title":"Warnings","default":[]}},"type":"object","required":["can_delete"],"title":"DeletionCheck"},"DeletionCheckItem":{"properties":{"code":{"type":"string","title":"Code"},"count":{"type":"integer","title":"Count"},"detail":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["code","count"],"title":"DeletionCheckItem"},"DeliveryHealthChannel":{"properties":{"channel":{"type":"string","title":"Channel"},"total":{"type":"integer","title":"Total","default":0},"by_state":{"additionalProperties":{"type":"integer"},"type":"object","title":"By State","default":{}},"attempted":{"type":"integer","title":"Attempted","default":0},"failed":{"type":"integer","title":"Failed","default":0},"failure_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Failure Rate"},"suppressed":{"type":"integer","title":"Suppressed","default":0},"suppression_reasons":{"additionalProperties":{"type":"integer"},"type":"object","title":"Suppression Reasons","default":{}},"retries":{"type":"integer","title":"Retries","default":0},"dead_letters":{"type":"integer","title":"Dead Letters","default":0},"backlog":{"type":"integer","title":"Backlog","default":0}},"type":"object","required":["channel"],"title":"DeliveryHealthChannel","description":"One `notification_delivery` channel's health (114 D-06).\n\n`failure_rate` is None — never 0.0 — when `attempted` is 0: an empty\nchannel and a healthy one must never render the same number."},"DeliveryHealthErrorCode":{"properties":{"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"DeliveryHealthErrorCode"},"DeliveryHealthProviderEvent":{"properties":{"provider":{"type":"string","title":"Provider"},"kind":{"type":"string","title":"Kind"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["provider","kind"],"title":"DeliveryHealthProviderEvent","description":"One (provider, kind, outcome) webhook count over the window."},"DeliveryHealthRecipient":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"notifications":{"type":"integer","title":"Notifications","default":0},"deliveries":{"type":"integer","title":"Deliveries","default":0},"fanout_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fanout Ratio"}},"type":"object","title":"DeliveryHealthRecipient"},"DeliveryHealthRepeatType":{"properties":{"notification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Type"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"DeliveryHealthRepeatType"},"DeliveryHealthRepeats":{"properties":{"total":{"type":"integer","title":"Total","default":0},"window_minutes":{"type":"integer","title":"Window Minutes","default":0},"by_type":{"items":{"$ref":"#/components/schemas/DeliveryHealthRepeatType"},"type":"array","title":"By Type","default":[]}},"type":"object","title":"DeliveryHealthRepeats","description":"Identical notifications re-delivered to the same person.\n\nOnly counts when title AND body match and the two sends fall inside\n`window_minutes`. Both conditions matter: the same (setup, type)\nlegitimately recurs with different wording, and a real second event days\nlater is not a double-dispatch."},"DeliveryHealthResponse":{"properties":{"window_days":{"type":"integer","title":"Window Days"},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"},"totals":{"$ref":"#/components/schemas/DeliveryHealthTotals"},"by_type":{"items":{"$ref":"#/components/schemas/DeliveryHealthType"},"type":"array","title":"By Type","default":[]},"top_recipients":{"items":{"$ref":"#/components/schemas/DeliveryHealthRecipient"},"type":"array","title":"Top Recipients","default":[]},"error_codes":{"items":{"$ref":"#/components/schemas/DeliveryHealthErrorCode"},"type":"array","title":"Error Codes","default":[]},"repeat_sends":{"$ref":"#/components/schemas/DeliveryHealthRepeats"},"channels":{"items":{"$ref":"#/components/schemas/DeliveryHealthChannel"},"type":"array","title":"Channels","default":[]},"channel_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Channel Since"},"excluded_test_deliveries":{"type":"integer","title":"Excluded Test Deliveries","default":0},"provider_events":{"items":{"$ref":"#/components/schemas/DeliveryHealthProviderEvent"},"type":"array","title":"Provider Events","default":[]},"push_command_queue_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Push Command Queue Depth"},"push_dead_letter_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Push Dead Letter Depth"}},"type":"object","required":["window_days","totals","repeat_sends"],"title":"DeliveryHealthResponse"},"DeliveryHealthTotals":{"properties":{"logs":{"type":"integer","title":"Logs","default":0},"unmeasured_logs":{"type":"integer","title":"Unmeasured Logs","default":0},"deliveries":{"type":"integer","title":"Deliveries","default":0},"recipients":{"type":"integer","title":"Recipients","default":0},"delivered":{"type":"integer","title":"Delivered","default":0},"failed":{"type":"integer","title":"Failed","default":0},"fanout_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fanout Ratio"},"failure_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Failure Rate"}},"type":"object","title":"DeliveryHealthTotals"},"DeliveryHealthType":{"properties":{"notification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Type"},"recipients":{"type":"integer","title":"Recipients","default":0},"deliveries":{"type":"integer","title":"Deliveries","default":0},"failed":{"type":"integer","title":"Failed","default":0},"fanout_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fanout Ratio"}},"type":"object","title":"DeliveryHealthType"},"DeliveryListItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"event_key":{"type":"string","title":"Event Key"},"category":{"type":"string","title":"Category"},"channel":{"type":"string","title":"Channel"},"state":{"type":"string","title":"State"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"decision_source":{"type":"string","title":"Decision Source"},"suppression_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suppression Reason"},"overridden_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overridden Reason"},"fallback_of_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Fallback Of Id"},"fallback_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Reason"},"group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Group Id"},"is_test":{"type":"boolean","title":"Is Test"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attempt_count":{"type":"integer","title":"Attempt Count"},"last_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Code"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"provider_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Message Id"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"setup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"possible_duplicate":{"type":"boolean","title":"Possible Duplicate","readOnly":true}},"type":"object","required":["id","created_at","event_id","event_key","category","channel","state","user_id","decision_source","is_test","attempt_count","possible_duplicate"],"title":"DeliveryListItemOut","description":"One row of `GET /admin/notifications/deliveries` — also the base\nevery detail response extends."},"DetectLanguageRequest":{"properties":{"text":{"type":"string","maxLength":5000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"DetectLanguageRequest","description":"Request body for POST /ai/assistant/detect-language (D-14)."},"DeviceBreakdownItem":{"properties":{"os_name":{"type":"string","title":"Os Name"},"count":{"type":"integer","title":"Count","default":0},"pct":{"type":"number","title":"Pct","default":0.0}},"type":"object","required":["os_name"],"title":"DeviceBreakdownItem"},"DigestPreferencePatch":{"properties":{"risk_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Profile"},"recommendation_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Frequency"},"local_hour":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Local Hour"}},"type":"object","title":"DigestPreferencePatch"},"DisputeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"reason":{"type":"string","title":"Reason"},"description":{"type":"string","title":"Description"},"status":{"type":"string","title":"Status"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"},"resolved_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved By"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"refund_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Refund Amount"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","shop_id","user_id","reason","description","status"],"title":"DisputeOut"},"DurationsEnum":{"type":"string","enum":["shortterm","midterm","longterm"],"title":"DurationsEnum"},"EarningOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"gross_credits":{"type":"number","title":"Gross Credits"},"commission_rate":{"type":"number","title":"Commission Rate"},"commission_credits":{"type":"number","title":"Commission Credits"},"net_credits":{"type":"number","title":"Net Credits"},"earned_at":{"type":"string","format":"date-time","title":"Earned At"},"available_after":{"type":"string","format":"date-time","title":"Available After"},"paid_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Out At"},"earning_type":{"type":"string","title":"Earning Type"},"payout_status":{"type":"string","title":"Payout Status","default":"pending"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"}},"type":"object","required":["id","shop_id","user_id","subscription_id","gross_credits","commission_rate","commission_credits","net_credits","earned_at","available_after","earning_type"],"title":"EarningOut"},"EarningsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EarningOut"},"type":"array","title":"Data","default":[]},"total_count":{"type":"integer","title":"Total Count","default":0},"summary":{"$ref":"#/components/schemas/apps__market__schemas__EarningsSummary","default":{"total_earnings":0.0,"pending_earnings":0.0,"paid_earnings":0.0}}},"type":"object","title":"EarningsResponse"},"EngagementStats":{"properties":{"avg_sessions_per_user":{"type":"number","title":"Avg Sessions Per User","default":0.0},"device_breakdown":{"items":{"$ref":"#/components/schemas/DeviceBreakdownItem"},"type":"array","title":"Device Breakdown","default":[]}},"type":"object","title":"EngagementStats"},"EnvLayerState":{"properties":{"global_kill_switch":{"type":"boolean","title":"Global Kill Switch"},"channels":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Channels"},"killed_event_keys":{"items":{"type":"string"},"type":"array","title":"Killed Event Keys"},"verified_mail_streams":{"items":{"type":"string"},"type":"array","title":"Verified Mail Streams"}},"type":"object","required":["global_kill_switch","channels","killed_event_keys","verified_mail_streams"],"title":"EnvLayerState","description":"The env layer's own current state, reported so the console can show\nan operator exactly what would decide a send today (D-15)."},"ErrorGroupOut":{"properties":{"route_path":{"type":"string","title":"Route Path"},"status_code":{"type":"integer","title":"Status Code"},"error_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Class"},"sample_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Message"},"count":{"type":"integer","title":"Count","default":0},"first_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Seen"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"affected_users":{"type":"integer","title":"Affected Users","default":0},"sample_log_ids":{"items":{"type":"string"},"type":"array","title":"Sample Log Ids","default":[]}},"type":"object","required":["route_path","status_code"],"title":"ErrorGroupOut","description":"One recurring error group — a (route_path, status_code) composite\nbucket rendered in Python after count-sorting (API-03, D7/D8).\n\n`error_class` is Optional because it is only populated from a 5xx\nsample (never a 4xx bucket); `sample_log_ids` are sourced from each\n`top_hits` sample's hit-level `_id` (H2 — never a `_source` field)."},"ErrorGroupsOut":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/ErrorGroupOut"},"type":"array","title":"Groups","default":[]},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","title":"ErrorGroupsOut","description":"GET /admin/logs/error-groups wire shape (API-03).\n\n`truncated` is honestly set True only when the composite agg's\nafter_key-paginated loop hit MAX_COMPOSITE_PAGES with an after_key still\nremaining — never silently dropping high-count groups (M7)."},"EventCatalogEntry":{"properties":{"key":{"type":"string","title":"Key"},"domain":{"type":"string","title":"Domain"},"category":{"type":"string","title":"Category"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"critical":{"type":"boolean","title":"Critical"},"channel_defaults":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Channel Defaults"},"mandatory_channels":{"items":{"type":"string"},"type":"array","title":"Mandatory Channels"},"payload_schema_name":{"type":"string","title":"Payload Schema Name"},"valve_state":{"additionalProperties":{"$ref":"#/components/schemas/ChannelValveState"},"type":"object","title":"Valve State"},"template_key":{"type":"string","title":"Template Key"},"from_address_key":{"type":"string","title":"From Address Key"},"deeplink":{"type":"string","title":"Deeplink"},"legacy_message_type":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legacy Message Type"}},"type":"object","required":["key","domain","category","kind","status","critical","channel_defaults","mandatory_channels","payload_schema_name","valve_state","template_key","from_address_key","deeplink"],"title":"EventCatalogEntry","description":"Every `EventSpec` field except `payload_schema` (which has no wire\nrepresentation), plus the derived `payload_schema_name` and the live\n`valve_state` per channel."},"EvidenceBlock":{"properties":{"source":{"type":"string","title":"Source"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"freshness_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Freshness Seconds"},"stale":{"type":"boolean","title":"Stale"},"kind":{"type":"string","enum":["observed","calculated"],"title":"Kind"},"units":{"additionalProperties":{"type":"string"},"type":"object","title":"Units"},"value":{"type":"object","title":"Value"}},"type":"object","required":["source","as_of","freshness_seconds","stale","kind","units","value"],"title":"EvidenceBlock"},"ExchangeConnectPayload":{"properties":{"exchange":{"type":"string","title":"Exchange"},"api_key":{"type":"string","title":"Api Key"},"secret_key":{"type":"string","title":"Secret Key"},"pass_phrase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pass Phrase"},"is_demo":{"type":"boolean","title":"Is Demo","default":false}},"type":"object","required":["exchange","api_key","secret_key"],"title":"ExchangeConnectPayload","description":"Request body for POST /exchange/connect (CRED-01).\n\nCredentials must travel in the body. A query string is recorded verbatim by\nreverse-proxy access logs, browser history, Referer headers and APM\ntransaction URLs — none of which this service can scrub."},"ExportRequest":{"properties":{"from_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Ts"},"to_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Ts"},"format":{"type":"string","enum":["csv","json"],"title":"Format","default":"csv"}},"type":"object","title":"ExportRequest"},"ExportStatusOut":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["task_id","status"],"title":"ExportStatusOut"},"FinancialStats":{"properties":{"mrr":{"type":"number","title":"Mrr","default":0.0},"mrr_growth_pct":{"type":"number","title":"Mrr Growth Pct","default":0.0},"churn_rate":{"type":"number","title":"Churn Rate","default":0.0},"arpu":{"type":"number","title":"Arpu","default":0.0},"net_revenue":{"type":"number","title":"Net Revenue","default":0.0},"commission_earned":{"type":"number","title":"Commission Earned","default":0.0},"pending_payouts":{"type":"number","title":"Pending Payouts","default":0.0},"total_paid_out":{"type":"number","title":"Total Paid Out","default":0.0}},"type":"object","title":"FinancialStats"},"FoxyAlertCreate":{"properties":{"pair":{"type":"string","title":"Pair"},"metric":{"type":"string","enum":["price.last","funding_rate.fr_close","open_interest.oi_vs_avg_pct","liquidation.long_liq_usd","liquidation.short_liq_usd"],"title":"Metric"},"operator":{"type":"string","enum":["gt","gte","lt","lte"],"title":"Operator"},"threshold":{"type":"number","title":"Threshold"},"webhook_url":{"type":"string","maxLength":2048,"minLength":1,"title":"Webhook Url"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"}},"type":"object","required":["pair","metric","operator","threshold","webhook_url"],"title":"FoxyAlertCreate"},"FoxyAlertResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"pair":{"type":"string","title":"Pair"},"metric":{"type":"string","enum":["price.last","funding_rate.fr_close","open_interest.oi_vs_avg_pct","liquidation.long_liq_usd","liquidation.short_liq_usd"],"title":"Metric"},"operator":{"type":"string","enum":["gt","gte","lt","lte"],"title":"Operator"},"threshold":{"type":"number","title":"Threshold"},"webhook_url":{"type":"string","title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","pair","metric","operator","threshold","webhook_url","is_active"],"title":"FoxyAlertResponse"},"FoxyAskRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"title":"Prompt","default":""},"pair":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pair"},"language":{"type":"string","enum":["tr","en"],"title":"Language","default":"en"},"session_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session","default":true},"chart_image":{"anyOf":[{"type":"string","maxLength":1400000},{"type":"null"}],"title":"Chart Image"}},"type":"object","title":"FoxyAskRequest"},"FoxyAskResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"answer":{"type":"string","title":"Answer"},"language":{"type":"string","enum":["tr","en"],"title":"Language"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"model_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Version"},"prompt_version":{"type":"string","title":"Prompt Version"},"policy_version":{"type":"string","title":"Policy Version"},"answer_kind":{"type":"string","const":"generated","title":"Answer Kind","default":"generated"},"disclaimer":{"type":"string","title":"Disclaimer"},"snapshot":{"anyOf":[{"$ref":"#/components/schemas/FoxySnapshotResponse"},{"type":"null"}]},"sources":{"items":{"type":"object"},"type":"array","title":"Sources"}},"type":"object","required":["request_id","answer","language","session_id","model_version","prompt_version","policy_version","disclaimer","snapshot","sources"],"title":"FoxyAskResponse"},"FoxyChangesResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"pair":{"type":"string","title":"Pair"},"window":{"type":"string","title":"Window"},"from_snapshot_id":{"type":"string","format":"uuid","title":"From Snapshot Id"},"to_snapshot_id":{"type":"string","format":"uuid","title":"To Snapshot Id"},"from_observed_at":{"type":"string","format":"date-time","title":"From Observed At"},"to_observed_at":{"type":"string","format":"date-time","title":"To Observed At"},"changes":{"additionalProperties":{"$ref":"#/components/schemas/NumericChange"},"type":"object","title":"Changes"}},"type":"object","required":["request_id","pair","window","from_snapshot_id","to_snapshot_id","from_observed_at","to_observed_at","changes"],"title":"FoxyChangesResponse"},"FoxyChatRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"minLength":1,"title":"Prompt"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session","default":false},"focus_coin":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Focus Coin"},"personality_mode":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Personality Mode","description":"Foxy personality preset id from mobile settings."},"personality_modifier":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Personality Modifier","description":"Full personality instruction text from the app (preferred)."},"user_language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"User Language","description":"ISO-ish language hint, e.g. en or tr."},"app_context":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"App Context"}},"type":"object","required":["prompt"],"title":"FoxyChatRequest","description":"Foxy chat for BottomUP mobile app users (customers and traders)."},"FoxyChatResponse":{"properties":{"message":{"type":"string","title":"Message"},"answer_kind":{"type":"string","title":"Answer Kind","default":"generated"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Information only. No order execution or investment advice."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"total_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Token"},"market_snapshot":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Market Snapshot"},"evidence":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["message","is_new_session"],"title":"FoxyChatResponse","description":"Same shape as AI Coach chat response."},"FoxyHealthResponse":{"properties":{"status":{"type":"string","enum":["healthy","degraded","no_data"],"title":"Status"},"sample_size":{"type":"integer","title":"Sample Size"},"latest_observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Observed At"},"latest_freshness_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Freshness Seconds"},"collection_p95_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection P95 Ms"},"source_success_rate":{"additionalProperties":{"type":"number"},"type":"object","title":"Source Success Rate"},"schema_version":{"type":"string","title":"Schema Version"}},"type":"object","required":["status","sample_size","latest_observed_at","latest_freshness_seconds","collection_p95_ms","source_success_rate","schema_version"],"title":"FoxyHealthResponse"},"FoxyPolicyResponse":{"properties":{"environment":{"type":"string","title":"Environment"},"policy_version":{"type":"string","title":"Policy Version"},"no_train":{"type":"boolean","title":"No Train"},"retention_days":{"type":"integer","title":"Retention Days"},"allowed_pairs":{"items":{"type":"string"},"type":"array","title":"Allowed Pairs"},"disclaimer_required":{"type":"boolean","title":"Disclaimer Required"},"disclaimer":{"type":"string","title":"Disclaimer"}},"type":"object","required":["environment","policy_version","no_train","retention_days","allowed_pairs","disclaimer_required","disclaimer"],"title":"FoxyPolicyResponse"},"FoxyProSetupAdopt":{"properties":{"trader_id":{"type":"string","format":"uuid4","title":"Trader Id"}},"type":"object","required":["trader_id"],"title":"FoxyProSetupAdopt","description":"Body of POST /setup/service/foxy-pro/{id}/adopt: the trader Foxy Pro\nbelieves owns the setup (its creator's BottomUP user)."},"FoxyProSetupCreate":{"properties":{"foxy_signal_id":{"type":"string","maxLength":64,"minLength":1,"title":"Foxy Signal Id"},"trader_id":{"type":"string","format":"uuid4","title":"Trader Id"},"category":{"$ref":"#/components/schemas/CategoriesEnum"},"order_type":{"$ref":"#/components/schemas/OrderTypeEnum"},"coin_name":{"type":"string","title":"Coin Name"},"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R Value"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"position":{"anyOf":[{"$ref":"#/components/schemas/PositionsEnum"},{"type":"null"}]},"duration":{"anyOf":[{"$ref":"#/components/schemas/DurationsEnum"},{"type":"null"}]},"entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value"},"profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"profit_taking_amount_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 1"},"profit_taking_amount_2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 2"},"profit_taking_amount_3":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 3"},"image":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Image"}},"type":"object","required":["foxy_signal_id","trader_id","category","order_type","coin_name"],"title":"FoxyProSetupCreate","description":"Body of PUT /setup/service/foxy-pro (company-mirror.ts ``setupBody``)."},"FoxyProSetupLevels":{"properties":{"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value"},"profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"profit_taking_amount_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 1"},"profit_taking_amount_2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 2"},"profit_taking_amount_3":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 3"},"duration":{"anyOf":[{"$ref":"#/components/schemas/DurationsEnum"},{"type":"null"}]},"image":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Image"}},"type":"object","title":"FoxyProSetupLevels","description":"Body of PATCH /setup/service/foxy-pro/{id} (``levelsBody``)."},"FoxyPublicChatRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"title":"Prompt","default":""},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session","default":false},"user_language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"User Language"},"chart_image":{"anyOf":[{"type":"string","maxLength":1400000},{"type":"null"}],"title":"Chart Image"}},"type":"object","title":"FoxyPublicChatRequest","description":"Unauthenticated Foxy (Chrome extension). Prompt only — no context injection."},"FoxySnapshotResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"snapshot_id":{"type":"string","format":"uuid","title":"Snapshot Id"},"schema_version":{"type":"string","title":"Schema Version"},"pair":{"type":"string","title":"Pair"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"confidence":{"type":"string","enum":["high","medium","low"],"title":"Confidence"},"collection_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Latency Ms"},"venues":{"additionalProperties":{"$ref":"#/components/schemas/EvidenceBlock"},"type":"object","title":"Venues"},"data":{"additionalProperties":{"$ref":"#/components/schemas/EvidenceBlock"},"type":"object","title":"Data"},"venue_comparison":{"type":"object","title":"Venue Comparison"},"source_health":{"additionalProperties":{"type":"object"},"type":"object","title":"Source Health"},"fusion":{"$ref":"#/components/schemas/FusionResult"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["request_id","snapshot_id","schema_version","pair","observed_at","confidence","venues","data","venue_comparison","source_health","fusion","warnings"],"title":"FoxySnapshotResponse"},"FusionDriver":{"properties":{"metric":{"type":"string","title":"Metric"},"score":{"type":"number","title":"Score"},"weight":{"type":"number","title":"Weight"}},"type":"object","required":["metric","score","weight"],"title":"FusionDriver"},"FusionResult":{"properties":{"kind":{"type":"string","const":"calculated","title":"Kind","default":"calculated"},"calculation_version":{"type":"string","title":"Calculation Version"},"input_snapshot_id":{"type":"string","format":"uuid","title":"Input Snapshot Id"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"bias":{"type":"string","enum":["bullish","neutral","bearish","unavailable"],"title":"Bias"},"drivers":{"items":{"$ref":"#/components/schemas/FusionDriver"},"type":"array","title":"Drivers"}},"type":"object","required":["calculation_version","input_snapshot_id","score","bias","drivers"],"title":"FusionResult"},"FuturesLeaderboardAggregatedResponse":{"properties":{"past24hours":{"anyOf":[{"$ref":"#/components/schemas/AnalystStatusResponse"},{"type":"null"}]},"past7days":{"anyOf":[{"$ref":"#/components/schemas/AnalystStatusResponse"},{"type":"null"}]},"past30days":{"anyOf":[{"$ref":"#/components/schemas/AnalystStatusResponse"},{"type":"null"}]}},"type":"object","title":"FuturesLeaderboardAggregatedResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"healthy"},"active_setups":{"type":"integer","title":"Active Setups","default":0},"incoming_setups":{"type":"integer","title":"Incoming Setups","default":0},"total_copy_trades":{"type":"integer","title":"Total Copy Trades","default":0},"error_copy_trades":{"type":"integer","title":"Error Copy Trades","default":0},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["timestamp"],"title":"HealthResponse"},"HistoryMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role","description":"Must be 'user' or 'assistant'; 'system' is reserved for the server."},"content":{"type":"string","maxLength":4000,"title":"Content"}},"type":"object","required":["role","content"],"title":"HistoryMessage","description":"A single turn in the conversation history."},"HistoryResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"items":{"items":{"$ref":"#/components/schemas/TxItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["user_id","items","total"],"title":"HistoryResponse"},"ImpressionBatch":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ImpressionItem"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"ImpressionBatch"},"ImpressionItem":{"properties":{"content_id":{"type":"string","title":"Content Id","examples":["2bf2b6ef-16ad-4a76-bce7-f48c03122262"]},"source":{"type":"string","pattern":"feed|direct","title":"Source","examples":["feed","direct"]},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page","examples":["setup","trader","ads","news"]}},"type":"object","required":["content_id","source"],"title":"ImpressionItem"},"IndexMemberOut":{"properties":{"trader_id":{"type":"string","title":"Trader Id"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"confidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Level"},"membership_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership State"},"is_index_member":{"type":"boolean","title":"Is Index Member"},"membership_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Membership Since"}},"type":"object","required":["trader_id","is_index_member"],"title":"IndexMemberOut","description":"An active member of a publication index (REC-05)."},"IntervalEnum":{"type":"string","enum":["1h","1d","1w"],"title":"IntervalEnum"},"LanguageDistributionItem":{"properties":{"language":{"type":"string","title":"Language"},"count":{"type":"integer","title":"Count","default":0},"pct":{"type":"number","title":"Pct","default":0.0}},"type":"object","required":["language"],"title":"LanguageDistributionItem"},"LatestSetup":{"properties":{"analysts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysts","description":"Analyst Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Analyst Profile Image"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name","description":"Coin Name"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position","description":"Position Name (only for futures)"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date","description":"Close Date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Status"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl","description":"Profit and Loss"},"r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R","description":"Cumulative PnL %"},"net_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Pnl","description":"Net PnL"},"net_r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net R","description":"Net Cumulative PnL %"}},"type":"object","title":"LatestSetup"},"LatestSetupOrderEnum":{"type":"string","enum":["analysts","coin_name","position","target_date","status","pnl","r","net_pnl","net_r"],"title":"LatestSetupOrderEnum"},"LatestSetupResponse":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/LatestSetup"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"LatestSetupResponse"},"LeaderBoardOrderEnum":{"type":"string","enum":["analysts","pnl","net_pnl","success","stopped","winrate","r","net_r"],"title":"LeaderBoardOrderEnum"},"LeaderboardItem":{"properties":{"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank"},"trader_id":{"type":"string","title":"Trader Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"total_social_score":{"type":"integer","title":"Total Social Score","default":0},"engagement_quality_points":{"type":"integer","title":"Engagement Quality Points","default":0},"original_content_count":{"type":"integer","title":"Original Content Count","default":0},"active_platform_count":{"type":"integer","title":"Active Platform Count","default":0}},"type":"object","required":["trader_id"],"title":"LeaderboardItem"},"LeaderboardOut":{"properties":{"period_key":{"type":"string","title":"Period Key"},"items":{"items":{"$ref":"#/components/schemas/LeaderboardItem"},"type":"array","title":"Items"}},"type":"object","required":["period_key"],"title":"LeaderboardOut"},"LifetimeStatsOut":{"properties":{"sink_visits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sink Visits"},"sink_visitors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sink Visitors"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"},"window":{"type":"string","title":"Window"},"status":{"$ref":"#/components/schemas/StatsStatus"}},"type":"object","required":["window","status"],"title":"LifetimeStatsOut","description":"The all-time snapshot re-read (D-03). ``sink_visits``/``sink_visitors``\nare nullable and MUST be null — never ``0`` — whenever ``status``'s\nTOTAL map says the number cannot be trusted (ADMR-06); the handler\nenforces that rule in exactly one place, not here. Deliberately its own\nnested object (not flattened onto the detail response) so\n``LiveWindowStatsOut`` (plan 92-06) cannot be mistaken for the same\nreading and summed with it — the two overlap by construction.\n\nNEVER-SUM RULE (plan 92-06): the snapshot's full retention-window\nre-read (D-03) already includes today, so\n``lifetime.sink_visits + live_window.sink_visits`` double-counts every\nevent inside the live window. The two readings are separately named\nobjects, each carrying its own window and its own observation stamp\n(``as_of`` here, ``observed_at`` on ``LiveWindowStatsOut``), precisely\nso that addition looks wrong on the page. Provenance: ``sink_visits`` is\nSink's raw event count and ``sink_visitors`` its weighted-distinct\nmeasure — two different measures of the same traffic, and neither is a\ncount of humans who chose to open the link (see\n``MetricDescriptorOut``'s caveat codes)."},"LinkAuditAction":{"type":"string","enum":["create","edit","disable","enable","delete","expire"],"title":"LinkAuditAction","description":"Closed audit action vocabulary for ``ShortLinkAuditLog.action`` (Phase\n93, six members, mirrors ``ck_short_link_audit_action``). One member per\noperator-visible write action plus ``expire``, the automated one D-20\nrequires. Adding a seventh is a coordinated change across this column,\nits DB-level CHECK, and every writer that enumerates it."},"LinkAuditActorKind":{"type":"string","enum":["admin","system"],"title":"LinkAuditActorKind","description":"Closed actor-kind vocabulary for ``ShortLinkAuditLog.actor_kind``\n(Phase 93, two members, mirrors ``ck_short_link_audit_actor_kind``).\nDeliberately unlike the ``ad_audit_logs`` precedent's non-nullable\n``admin_id``: D-20's expiry sweep must be able to write a row with a\n``system`` actor and no admin at all."},"LinkEmailSend":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"LinkEmailSend"},"LinkEmailVerify":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":6,"title":"Password"}},"type":"object","required":["email","password"],"title":"LinkEmailVerify"},"LinkLifecycleStatus":{"type":"string","enum":["active","pending","failed","orphaned","disabled","deleted"],"title":"LinkLifecycleStatus","description":"Closed lifecycle vocabulary derived from ``is_deleted``,\n``disabled_at`` and ``sink_status`` (D-16). See ``LIFECYCLE_PRECEDENCE``\n(Task 2) for the exact rank order."},"LinkOrigin":{"type":"string","enum":["api","sink","admin","onelink"],"title":"LinkOrigin","description":"Closed provenance vocabulary for ``ShortLink.origin`` (D-11; widened\nto a fourth member by Phase 95 / D-95-12).\n\nSee the module docstring's ``origin`` paragraph for the full\n\"why stored, not derived\" argument and the destination-source mapping.\nCLOSED at exactly FOUR members; adding a fifth is a coordinated change\nacross this column, its DB-level CHECK constraint, and every\nfilter/write surface that enumerates it — see the module docstring for\nthe full list Phase 95 paid when it added the fourth."},"LinkPhoneSend":{"properties":{"phone":{"type":"string","pattern":"^\\+\\d{10,15}$","title":"Phone"}},"type":"object","required":["phone"],"title":"LinkPhoneSend"},"LinkPhoneVerify":{"properties":{"phone":{"type":"string","pattern":"^\\+\\d{10,15}$","title":"Phone"},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"}},"type":"object","required":["phone","code"],"title":"LinkPhoneVerify"},"LinkResolveResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"canonical_url":{"type":"string","title":"Canonical Url"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"campaign":{"type":"string","title":"Campaign"}},"type":"object","required":["slug","canonical_url","campaign"],"title":"LinkResolveResponse","description":"``GET /links/resolve/{slug}`` response (Phase 94 / DEEP-03).\n\nThe mobile app's cold-start deep-link contract: an installed app calls\nthis endpoint with no session at all after the OS hands it a\n``bupl.ink`` Universal/App Link tap, so it can route the tap to the\ntapped content's own screen. The field set is closed at exactly five,\nbecause the caller is anonymous — no owner id, no ``admin_comment``, no\nclick statistic, no lifecycle field, no Sink credential. Adding a sixth\nfield is a wire-contract change a shipped Flutter build reads.\n\n``entity_type``/``entity_id`` are both nullable together (never one\nwithout the other): a Sink-origin adopted link (ADMR-05) or an\nadmin-authored marketing link (ADMW-01) carries neither, and the\nclient's documented fallback for a null ``entity_type`` is to open\n``canonical_url`` in a WebView rather than treat the row as an error.\n\n``model_config = ConfigDict(from_attributes=True)`` on itself —\n``AppBaseModel`` never carries it (see this module's own docstring) —\nproven against a seeded, non-empty ``ShortLink`` row in\n``tests/test_links_resolve.py``, not just against an absent slug."},"LiveWindowStatsOut":{"properties":{"sink_visits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sink Visits"},"sink_visitors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sink Visitors"},"window_hours":{"type":"integer","title":"Window Hours"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"status":{"$ref":"#/components/schemas/StatsStatus"}},"type":"object","required":["window_hours","observed_at","status"],"title":"LiveWindowStatsOut","description":"The detail endpoint's one bounded live Sink read (plan 92-06,\nADMR-03, D-07). A standalone class, deliberately NOT sharing a base with\n``LifetimeStatsOut`` beyond ``AppBaseModel``: a common base is exactly\nwhere a generic total-both-readings helper would appear, and the two\nreadings overlap by construction (see ``LifetimeStatsOut``'s\nNEVER-SUM-RULE paragraph above).\n\n``sink_visits``/``sink_visitors`` are nullable and MUST be null — never\n``0`` — whenever ``status``'s TOTAL map says the number cannot be\ntrusted; a genuine verified zero (Sink read the window and found no\nevents) still renders as ``0`` under an ``ok`` status (ADMR-06's other\nhalf — a real zero must be renderable as a zero).\n\nThis object exists ONLY on ``ShortLinkAdminDetail`` — never on\n``ShortLinkAdminListItem`` (D-18) — and is ``None`` on the detail\nresponse itself whenever no live call was made at all (unconfigured\nSink client, a null slug, or a non-``confirmed`` ``sink_status``).\n``None`` (the field absent-of-meaning) and \"present but unavailable\"\n(an instance with null counts and a status saying so) are two different\nfacts and the schema keeps them different.\n\n``observed_at`` is the tz-aware wall-clock time THIS request's live call\nreturned — never copied from ``LifetimeStatsOut.as_of``, which is a\ndifferent observation entirely.\n\nWR-02 (2026-08-21): ``status`` here can diverge from the same-response\n``LifetimeStatsOut.status`` in exactly one documented case — when THIS\nrequest's own live call failed to produce a measured shape (transport\nfailure, non-2xx, or an unparseable body), ``status`` is forced to\n``UNAVAILABLE`` regardless of the global health verdict, so a ``null``\nnumber is never paired with ``ok``. ``ok`` on this field means both\n\"the platform-wide backend is healthy\" AND \"this specific call\nproduced a readable number\" — never one without the other."},"LogStatsEndpointCount":{"properties":{"route_path":{"type":"string","title":"Route Path"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["route_path"],"title":"LogStatsEndpointCount","description":"One `top_endpoints` terms bucket (API-02, D7)."},"LogStatsHourlyBucket":{"properties":{"ts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ts"},"count":{"type":"integer","title":"Count","default":0},"errors":{"type":"integer","title":"Errors","default":0},"avg_latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency"}},"type":"object","title":"LogStatsHourlyBucket","description":"One `by_hour` date_histogram bucket (API-02, D7)."},"LogStatsMethodCount":{"properties":{"method":{"type":"string","title":"Method"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["method"],"title":"LogStatsMethodCount","description":"One `by_method` terms bucket (API-02, D7)."},"LogStatsOut":{"properties":{"total":{"type":"integer","title":"Total"},"error_count":{"type":"integer","title":"Error Count"},"error_rate":{"type":"number","title":"Error Rate"},"avg_latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency"},"p50_latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Latency"},"p95_latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Latency"},"p99_latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Latency"},"hourly":{"items":{"$ref":"#/components/schemas/LogStatsHourlyBucket"},"type":"array","title":"Hourly","default":[]},"by_method":{"items":{"$ref":"#/components/schemas/LogStatsMethodCount"},"type":"array","title":"By Method","default":[]},"by_status_class":{"items":{"$ref":"#/components/schemas/LogStatsStatusClassCount"},"type":"array","title":"By Status Class","default":[]},"top_endpoints":{"items":{"$ref":"#/components/schemas/LogStatsEndpointCount"},"type":"array","title":"Top Endpoints","default":[]},"slowest_endpoints":{"items":{"$ref":"#/components/schemas/LogStatsSlowEndpoint"},"type":"array","title":"Slowest Endpoints","default":[]}},"type":"object","required":["total","error_count","error_rate"],"title":"LogStatsOut","description":"GET /admin/logs/stats wire shape (D7/D8). LOCKED — this is the exact\nresponse_model, no ResponseMessage alternative (C2 actionable); the\nconsole's statistics dashboard (Phase 5) depends on this shape being\nstable.\n\n`total`/`error_count`/`error_rate` are REQUIRED (no default) so that a\ncorrupted/partial cached payload missing one of them fails Pydantic\nvalidation and is treated as a cache miss rather than silently\nround-tripping a half-built object (M4). Percentile/avg-latency fields\nare Optional because an empty index's percentiles agg returns null\nvalues (M4) — never assume a float."},"LogStatsSlowEndpoint":{"properties":{"route_path":{"type":"string","title":"Route Path"},"avg_latency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["route_path"],"title":"LogStatsSlowEndpoint","description":"One `slowest_endpoints` terms bucket, ordered by avg latency desc with\na min_doc_count guard (API-02, D7)."},"LogStatsStatusClassCount":{"properties":{"status_class":{"type":"string","title":"Status Class"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["status_class"],"title":"LogStatsStatusClassCount","description":"One `status_ranges` range-agg bucket (API-02, D7)."},"MailStreamCatalogEntry":{"properties":{"key":{"type":"string","title":"Key"},"local_part":{"type":"string","title":"Local Part"},"display_name":{"type":"string","title":"Display Name"},"reply_to_key":{"type":"string","title":"Reply To Key"},"sending_domain":{"type":"string","title":"Sending Domain"},"verified":{"type":"boolean","title":"Verified"},"from_address":{"type":"string","title":"From Address"}},"type":"object","required":["key","local_part","display_name","reply_to_key","sending_domain","verified","from_address"],"title":"MailStreamCatalogEntry"},"MarketConfig":{"properties":{"market":{"$ref":"#/components/schemas/MarketEnum"},"pass_phrase":{"type":"string","title":"Pass Phrase"},"api_key":{"type":"string","title":"Api Key"},"secret_key":{"type":"string","title":"Secret Key"},"demo":{"type":"boolean","title":"Demo","default":false}},"type":"object","required":["market","pass_phrase","api_key","secret_key"],"title":"MarketConfig"},"MarketConfigBalance":{"properties":{"spot_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spot Balance","description":"","examples":[0]},"futures_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Futures Balance","description":"","examples":[0]},"use_earned_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Earned Balance"},"spot_max_total_risk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Risk for Spot","description":"10-100"},"futures_max_total_risk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Total Risk for Futures","description":"3-50"}},"type":"object","title":"MarketConfigBalance"},"MarketConfigPause":{"properties":{"pause":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pause copy trade","description":"","default":false}},"type":"object","title":"MarketConfigPause"},"MarketConfigResponse":{"properties":{"state":{"$ref":"#/components/schemas/MarketConfigState","default":{"demo":false,"is_connected":false,"is_active":false}},"user":{"$ref":"#/components/schemas/UserMeBase"}},"type":"object","required":["user"],"title":"MarketConfigResponse"},"MarketConfigState":{"properties":{"market":{"anyOf":[{"$ref":"#/components/schemas/MarketEnum"},{"type":"null"}]},"pass_phrase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pass Phrase"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"secret_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Key"},"demo":{"type":"boolean","title":"Demo","default":false},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"balance_status":{"anyOf":[{"$ref":"#/components/schemas/BalanceStateEnum"},{"type":"null"}]},"error_msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Msg"},"is_connected":{"type":"boolean","title":"Is Connected","default":false},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Paused"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance"},"total_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Balance"},"spot_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spot Balance"},"futures_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Futures Balance"},"use_earned_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Earned Balance"},"spot_max_total_risk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spot Max Total Risk"},"futures_max_total_risk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Futures Max Total Risk"},"initial_spot_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Initial Spot Balance"},"initial_futures_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Initial Futures Balance"},"initial_spot_balance_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Initial Spot Balance At"},"initial_futures_balance_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Initial Futures Balance At"},"realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Pnl"},"spot_realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spot Realized Pnl"},"futures_realized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Futures Realized Pnl"},"exchange_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchange Balance"}},"type":"object","title":"MarketConfigState","example":{"api_key":"123*****","balance":1234.45,"balance_status":"ok","futures_balance":0,"futures_realized_pnl":0,"is_active":true,"is_connected":true,"market":"Okx","pass_phrase":"xyz*****","realized_pnl":44.7376,"secret_key":"xxx*****","spot_balance":499,"spot_realized_pnl":44.7376,"total_balance":499,"uid":"123456789012345678"}},"MarketEnum":{"type":"string","enum":["Okx","Bybit","Binance","Mexc","Bingx","Paper"],"title":"MarketEnum"},"MarketingConsentActionIn":{"properties":{"action":{"type":"string","enum":["grant","withdraw"],"title":"Action"},"consent_text_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Consent Text Version Id"}},"type":"object","required":["action"],"title":"MarketingConsentActionIn"},"MarketplaceChurnPoint":{"properties":{"bucket_start":{"type":"string","title":"Bucket Start"},"cancelled_count":{"type":"integer","title":"Cancelled Count","default":0},"churn_rate":{"type":"number","title":"Churn Rate","default":0.0}},"type":"object","required":["bucket_start"],"title":"MarketplaceChurnPoint","description":"One bucket in the churn time-series.\n\ncancelled_count : subscriptions with cancelled_at in this bucket (D-08)\nchurn_rate      : cancelled_in_bucket / active_at_bucket_start * 100"},"MarketplacePayoutPoint":{"properties":{"bucket_start":{"type":"string","title":"Bucket Start"},"total_credits":{"type":"number","title":"Total Credits","default":0.0},"monthly_credits":{"type":"number","title":"Monthly Credits","default":0.0},"weekly_credits":{"type":"number","title":"Weekly Credits","default":0.0},"bi_weekly_credits":{"type":"number","title":"Bi Weekly Credits","default":0.0}},"type":"object","required":["bucket_start"],"title":"MarketplacePayoutPoint","description":"One bucket in the payouts time-series (D-11/D-12).\n\ntotal_credits    : SUM(payout_batch.total_credits) WHERE status='paid'\nmonthly_credits  : per-schedule breakdown\nweekly_credits   : per-schedule breakdown\nbi_weekly_credits: per-schedule breakdown"},"MarketplaceRevenuePoint":{"properties":{"bucket_start":{"type":"string","title":"Bucket Start"},"gross_revenue":{"type":"number","title":"Gross Revenue","default":0.0},"refund_credits":{"type":"number","title":"Refund Credits","default":0.0},"net_revenue":{"type":"number","title":"Net Revenue","default":0.0}},"type":"object","required":["bucket_start"],"title":"MarketplaceRevenuePoint","description":"One bucket in the revenue time-series.\n\ngross_revenue  : SUM(net_credits) WHERE payout_status != 'cancelled'\nrefund_credits : informational — cancelled earnings in bucket\nnet_revenue    : == gross_revenue (D-10: payout_status filter already nets refunds)"},"MarketplaceSubscriberPoint":{"properties":{"bucket_start":{"type":"string","title":"Bucket Start"},"new_subscribers":{"type":"integer","title":"New Subscribers","default":0},"active_subscribers":{"type":"integer","title":"Active Subscribers","default":0}},"type":"object","required":["bucket_start"],"title":"MarketplaceSubscriberPoint","description":"One bucket in the subscribers time-series.\n\nnew_subscribers    : subscriptions created in this bucket\nactive_subscribers : subscriptions active at end of this bucket"},"MarketplaceSummary":{"properties":{"gross_revenue":{"type":"number","title":"Gross Revenue","default":0.0},"refund_credits":{"type":"number","title":"Refund Credits","default":0.0},"net_revenue":{"type":"number","title":"Net Revenue","default":0.0},"active_subscribers":{"type":"integer","title":"Active Subscribers","default":0},"new_subscribers":{"type":"integer","title":"New Subscribers","default":0},"churn_rate":{"type":"number","title":"Churn Rate","default":0.0},"total_payouts":{"type":"number","title":"Total Payouts","default":0.0}},"type":"object","title":"MarketplaceSummary","description":"Scalar KPI block for GET /analytics/marketplace/summary (D-05).\n\ngross_revenue  : SUM(shop_earning.net_credits) WHERE payout_status != 'cancelled'\nrefund_credits : informational — sum of cancelled earnings in the range\nnet_revenue    : == gross_revenue (cancelled rows already excluded by filter)\nactive_subscribers : COUNT(shop_subscription WHERE cancelled_at IS NULL AND expires_at > now())\nnew_subscribers    : COUNT(shop_subscription WHERE created_at in range)\nchurn_rate         : range-wide cancellations / active-at-range-start * 100 (D-09)\ntotal_payouts      : SUM(payout_batch.total_credits) WHERE status='paid' in range"},"MeBalanceResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"balance":{"type":"number","title":"Balance"},"expiring_soon_credits":{"type":"number","title":"Expiring Soon Credits","default":0.0},"expiring_soon_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiring Soon Date"}},"type":"object","required":["user_id","balance"],"title":"MeBalanceResponse","description":"The caller's own credit balance — `GET /credits/balance/me` (CME-01).\n\nThe field *names* deliberately match `BalanceWithExpiryResponse` (the\ndeprecated by-id response) so the console's self-scoped balance consumers\nkeep working with no change. Only `expiring_soon_date`'s **type** moves:\nfrom an offset-less ISO `str` to a real tz-aware `datetime` (D-87-09).\nThat is strictly better for every client — `new Date()` and Dart's\n`DateTime.parse` both resolve an offset-less string in *local* time.\n\n**No `model_config` here, and that is deliberate — not an omission.**\nThis model is built by explicit keyword construction in the route, never\nby `model_validate(orm_row)`, so `from_attributes` would buy nothing.\nThe rule: `AppBaseModel` (apps/schemas.py:7) is deliberately bare and\nnever carries `from_attributes`; a schema that *does* call\n`model_validate` on a SQLAlchemy row must declare\n`model_config = ConfigDict(from_attributes=True)` on **itself**, or it\nraises a 500 at the serialization boundary that stays latent while the\ntable is empty. `CreditPackageItem` (schemas.py:379-412) is the in-file\nexample of exactly that case, with its own docstring on why. Adding the\nconfig here, where nothing validates a row, would be cargo cult."},"MetricDescriptorOut":{"properties":{"metric":{"type":"string","title":"Metric"},"measured_by":{"type":"string","title":"Measured By"},"caveats":{"items":{"type":"string"},"type":"array","title":"Caveats"}},"type":"object","required":["metric","measured_by","caveats"],"title":"MetricDescriptorOut","description":"Names the raw statistic being reported and its caveats, so a\nconsole reader never mistakes a raw Sink event count for a\nhuman-tap or an attributed-conversion number (ADMR-06). Field names\nthemselves carry provenance for the same reason — nothing in this\nphase may name a field after taps or attributed conversions.\n\nThe caveat codes' meaning (plan 92-06, D-10): every chat application\n(WhatsApp, Telegram, Slack, iMessage) fetches a pasted URL server-side to\nbuild a link preview *before* any human taps it, so a raw event count\nincludes machine fetches (``CAVEAT_INCLUDES_LINK_PREVIEW_FETCHES``); and\nany future attribution number (e.g. an AppsFlyer install count, v1.18)\nwill be a different metric measured a different way, so the two must\nnever be presented as the same statistic\n(``CAVEAT_NOT_AN_ATTRIBUTION_METRIC``). Because D-01 ships no console in\nthis phase, a coded caveat in the payload is the only path by which\neither warning ever reaches a screen — and being coded rather than\nprose, it can be localized later by whatever surface renders it."},"MigrateUserRequest":{"properties":{"from_uid":{"type":"string","minLength":10,"title":"From Uid","description":"Firebase UID of the account to migrate from"},"to_uid":{"type":"string","minLength":10,"title":"To Uid","description":"Firebase UID of the account to migrate to"}},"type":"object","required":["from_uid","to_uid"],"title":"MigrateUserRequest"},"MigrateUserResponse":{"properties":{"from_user_id":{"type":"string","format":"uuid","title":"From User Id"},"to_user_id":{"type":"string","format":"uuid","title":"To User Id"},"migrated_credits":{"type":"number","title":"Migrated Credits"},"migrated_subscriptions":{"type":"integer","title":"Migrated Subscriptions"}},"type":"object","required":["from_user_id","to_user_id","migrated_credits","migrated_subscriptions"],"title":"MigrateUserResponse"},"ModeEnum":{"type":"string","enum":["gross","net"],"title":"ModeEnum"},"MrrDataPoint":{"properties":{"month":{"type":"string","title":"Month"},"revenue":{"type":"number","title":"Revenue"}},"type":"object","required":["month","revenue"],"title":"MrrDataPoint"},"MrrTrendResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MrrDataPoint"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"MrrTrendResponse"},"MySubscriptionItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"shop_name":{"type":"string","title":"Shop Name"},"shop_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Image"},"shop_slug":{"type":"string","title":"Shop Slug"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"auto_renew":{"type":"boolean","title":"Auto Renew"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"refund_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refund Until"},"is_refundable":{"type":"boolean","title":"Is Refundable","default":false},"is_trial":{"type":"boolean","title":"Is Trial","default":false},"monthly_price_credits":{"type":"number","title":"Monthly Price Credits"}},"type":"object","required":["id","shop_id","shop_name","shop_slug","started_at","expires_at","auto_renew","monthly_price_credits"],"title":"MySubscriptionItem"},"NetPnlWindows":{"properties":{"last_24h":{"type":"number","title":"Last 24H","default":0.0},"last_7d":{"type":"number","title":"Last 7D","default":0.0},"last_30d":{"type":"number","title":"Last 30D","default":0.0},"this_week":{"type":"number","title":"This Week","default":0.0},"this_month":{"type":"number","title":"This Month","default":0.0},"this_year":{"type":"number","title":"This Year","default":0.0}},"type":"object","title":"NetPnlWindows"},"NewSubscriptionsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DailyNewSubscription"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"NewSubscriptionsResponse"},"NewsBase":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"news_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"News Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"sentiment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"},"type":{"type":"string","title":"Type","default":"article"},"topics":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Topics"},"tickers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tickers"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","title":"NewsBase","example":{"date":"2023-04-13T16:38:02","id":"21178411-66a0-39e7-af80-067f860281cc","image_url":"https://crypto.snapi.dev/images/v1/k/h/bitcoin-outperforms-97-of-sp-500-companies-in-2023-291942.jpg","news_url":"https://thenewscrypto.com/btc-index-futures-and-options-trading-launched-by-london-stock-exchange/?SNAPI","sentiment":"Positive","source_name":"TheNewsCrypto","text":"The London Stock Exchange collaborated with Global Futures and Options (GFO-X). In Q4 2023, the market for Bitcoin futures and options is predicted to open.","tickers":["BTC"],"title":"BTC Index Futures and Options Trading Launched by London Stock Exchange","topics":["futures"],"type":"Article"}},"NewsDetail":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"news_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"News Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"sentiment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"},"type":{"type":"string","title":"Type","default":"article"},"topics":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Topics"},"tickers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tickers"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"full_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Text"}},"type":"object","title":"NewsDetail","example":{"date":"2023-04-13T16:38:02","full_text":"The London Stock Exchange collaborated with Global Futures and Options (GFO-X). In Q4 2023, the market for Bitcoin futures and options is predicted to open.","id":"21178411-66a0-39e7-af80-067f860281cc","image_url":"https://bu-cdn.s3.us-west-2.amazonaws.com/news-images/27a04902-99f5-3694-b71a-6343ac8a3012.jpg","news_url":"https://thenewscrypto.com/btc-index-futures-and-options-trading-launched-by-london-stock-exchange/?SNAPI","sentiment":"Positive","source_name":"TheNewsCrypto","text":"The London Stock Exchange collaborated with Global Futures and Options (GFO-X). In Q4 2023, the market for Bitcoin futures and options is predicted to open.","thumbnail_url":"https://bu-cdn.s3.us-west-2.amazonaws.com/news-thumbnails/27a04902-99f5-3694-b71a-6343ac8a3012.jpg","tickers":["BTC"],"title":"BTC Index Futures and Options Trading Launched by London Stock Exchange","topics":["futures"],"type":"Article"}},"NewsList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/NewsBase"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"NewsList"},"NotificationCatalogResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventCatalogEntry"},"type":"array","title":"Events"},"categories":{"items":{"$ref":"#/components/schemas/CategoryCatalogEntry"},"type":"array","title":"Categories"},"mail_streams":{"items":{"$ref":"#/components/schemas/MailStreamCatalogEntry"},"type":"array","title":"Mail Streams"},"env_layer":{"$ref":"#/components/schemas/EnvLayerState"}},"type":"object","required":["events","categories","mail_streams","env_layer"],"title":"NotificationCatalogResponse"},"NotificationConfigOut":{"properties":{"email_recipients":{"items":{"type":"string"},"type":"array","title":"Email Recipients","default":[]},"telegram_token_set":{"type":"boolean","title":"Telegram Token Set","default":false},"telegram_chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Chat Id"},"telegram_min_severity":{"type":"string","title":"Telegram Min Severity","default":"HIGH"},"email_min_severity":{"type":"string","title":"Email Min Severity","default":"MEDIUM"},"inapp_min_severity":{"type":"string","title":"Inapp Min Severity","default":"LOW"}},"type":"object","title":"NotificationConfigOut"},"NotificationConfigUpdate":{"properties":{"email_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Email Recipients"},"telegram_bot_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Bot Token"},"telegram_chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Chat Id"},"telegram_min_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Min Severity"},"email_min_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Min Severity"},"inapp_min_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inapp Min Severity"}},"type":"object","title":"NotificationConfigUpdate"},"NotificationInboxItem":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"event_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Key"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"deeplink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deeplink"},"is_read":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Read"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"setup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"}},"type":"object","title":"NotificationInboxItem","description":"CHAN-02's richer in-app inbox item — category, deeplink and read\nstate on top of the legacy list's fields. See the module-level comment\nabove this class for the allowlist rationale."},"NotificationLogDetail":{"properties":{"log":{"$ref":"#/components/schemas/NotificationLogResponse"},"results":{"items":{"$ref":"#/components/schemas/NotificationResultResponse"},"type":"array","title":"Results","default":[]},"results_total":{"type":"integer","title":"Results Total","default":0}},"type":"object","required":["log"],"title":"NotificationLogDetail","description":"Notification log detail with results."},"NotificationLogResponse":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"setup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"notification_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Type"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"user_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Count"},"success_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Success Count"},"failure_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failure Count"},"delivered_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivered Count"},"failed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failed Count"},"recipient_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recipient Count"},"data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Data"},"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"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"setup_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Label"}},"type":"object","title":"NotificationLogResponse","description":"Notification log list item."},"NotificationResultResponse":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"notification_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Notification Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"status":{"type":"string","title":"Status","readOnly":true}},"type":"object","required":["status"],"title":"NotificationResultResponse","description":"Notification result item."},"NotificationSendRequest":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":1024,"minLength":1,"title":"Body"},"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"User Ids"}},"type":"object","required":["title","body","user_ids"],"title":"NotificationSendRequest","description":"Admin manual-send request body (113.2 D-01..D-03).\n\nRewritten onto `notify()` in Phase 113.2 plan 07: `title`/`body` are the\noperator's own free text for the `admin.manual_message` catalog event;\n`user_ids` is REQUIRED, non-empty and capped — there is no broadcast\npath and no legacy `notification_type`/`setup_id`/`trader_id`/\n`image_url`/`data` field. A legacy console body carrying those fields is\nstill accepted (backward-compatible parsing) but they are ignored, not\nread — see `send_notification` in `api.py`."},"NotificationSendResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","title":"NotificationSendResponse","description":"Notification service proxy response."},"NotificationSettingsPatch":{"properties":{"quiet_hours":{"anyOf":[{"$ref":"#/components/schemas/QuietHoursPatch"},{"type":"null"}]},"master_muted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Master Muted"},"breakthrough":{"anyOf":[{"items":{"$ref":"#/components/schemas/BreakthroughPatch"},"type":"array"},{"type":"null"}],"title":"Breakthrough"}},"type":"object","title":"NotificationSettingsPatch"},"NumericChange":{"properties":{"from":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"To"},"absolute":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Absolute"},"percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent"}},"type":"object","required":["from","to","absolute","percent"],"title":"NumericChange"},"OneLinkShortenRequest":{"properties":{"onelink_url":{"type":"string","maxLength":2048,"minLength":1,"title":"Onelink Url"},"entity_type":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Entity Id"}},"additionalProperties":false,"type":"object","required":["onelink_url"],"title":"OneLinkShortenRequest","description":"``POST /links/onelink`` request body (Phase 95 / OLNK-01..OLNK-05).\n\nExactly three fields. THERE IS NO ``campaign`` FIELD AND THERE NEVER\nWILL BE (D-95-3, mirroring D-03's identical rule for ``ShareRequest``):\ncampaign comes from the submitted OneLink's own ``c`` parameter, parsed\nserver-side by ``apps.links.url_policy.validate_onelink_url`` — never\nfrom this body, even if a future field were added here.\n``model_config = ConfigDict(extra=\"forbid\")`` is what turns a smuggled\n``campaign`` key from silently ignored into a 400 (this app's global\n``RequestValidationError`` handler renders every validation failure as\n400, not 422 — see ``ShareRequest``'s docstring for the same measured\ndeviation). That is DEFENCE IN DEPTH, not the guarantee itself: the\nactual guarantee is that ``apps.links.service.create_onelink_share``\nreads ``campaign`` only from the parsed URL and could not be steered by\na body key even if this schema accepted one — two independent controls,\nproven by two separate tests.\n\nRelationship to ``ShareRequest`` (D-95-1): that schema forbids a\ncaller-chosen destination outright and derives one from the registry;\nthis one accepts exactly one narrow class of caller-chosen destination\n(a OneLink our own mobile app already generated) and validates it\nagainst ``OLNK-02``'s allowlist. D-95-1 keeps them two handlers so the\ndifference is structural rather than a branch a reader has to trace.\n\n``entity_type``/``entity_id`` are BOTH optional but must be supplied\nTOGETHER or not at all (review finding M-3) — a body carrying one\nwithout the other is a malformed request shape FastAPI's own validation\nlayer already owns, refused HERE rather than falling through\n``create_onelink_share``'s three-branch entity-authority rule into\nwhichever arm happens to catch it. When supplied, the pair must AGREE\nwith the OneLink's own ``deep_link_value`` and is compared in the\nOneLink's OWN id space (see ``create_onelink_share``'s Step 2\ndocstring), so a client that already knows the entity's STORED form\nmust still send the link's own (raw) form.\n\nBoth fields are bounded by the storage widths ``short_link.entity_type``/\n``entity_id`` declare (``models.py``) — the same bounds\n``AdoptLinkRequest`` uses for the same columns."},"OrderSideEnum":{"type":"string","enum":["asc","desc"],"title":"OrderSideEnum"},"OrderTypeEnum":{"type":"string","enum":["market","limit","stop"],"title":"OrderTypeEnum"},"PasswordResetVerify":{"properties":{"reset_code":{"type":"string","title":"Reset Code"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["reset_code","new_password"],"title":"PasswordResetVerify","description":"Request body for the two password-reset verify routes (Phase 79 CR-04).\n\nBoth fields are secrets and both MUST travel in the body.\n\nUntil this model existed the route declared them as bare ``str``\nparameters, and FastAPI binds a bare scalar from the QUERY STRING\nregardless of HTTP method — so a one-time account-recovery code and the\nuser's chosen cleartext password were written verbatim into every\nreverse-proxy access log, the New Relic transaction name, the\nElasticsearch request-log middleware, the browser's own history and any\n``Referer`` header the result page emitted. None of those are scrubbed by\nthis service, and the password (unlike the code) has no TTL and is reused\nacross sites.\n\nThis is the identical rule ``order_routing.ExchangeConnectPayload``\nalready states for exchange credentials; the auth module simply never\napplied it. ``tests/test_credential_transport_regression.py`` enumerates\nthe LIVE route table and fails if any route anywhere binds a\ncredential-shaped value outside a body model, so the defect cannot come\nback silently."},"PasswordUpdate":{"properties":{"password":{"type":"string","title":"Password"},"password_verify":{"type":"string","title":"Password Verify"}},"type":"object","required":["password","password_verify"],"title":"PasswordUpdate"},"PayoutBatchAdminListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"shop_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Name"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"trader_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Email"},"total_credits":{"type":"number","title":"Total Credits"},"status":{"type":"string","title":"Status"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"payout_period":{"type":"string","title":"Payout Period"},"payout_schedule":{"type":"string","title":"Payout Schedule"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}},"type":"object","required":["id","total_credits","status","payout_period","payout_schedule"],"title":"PayoutBatchAdminListItem","description":"Superset row for `GET /admin/market/payouts` (APB-01/APB-02).\n\n`external_ref` is deliberately IN (§6 OQ-2 — the operator must see the\nbank/crypto reference on the list without opening each batch).\n`attempts` and `clawback_required` stay OUT and remain mutation-response-\nonly on `PayoutBatchAdminResponse` above — do not \"complete\" this\nsuperset by importing them.\n\nOn the `PayoutBatch` model, `scheduled_at` and `sent_at` are naive\n`Column(DateTime)` while `paid_at` alone is TIMESTAMPTZ — the three\ntimestamps are not interchangeable when a filter or comparison is\nwritten against them.\n\nNo `model_config = ConfigDict(from_attributes=True)`: unlike\n`PayoutBatchOut` (built from a plain ORM instance handed straight to the\nenvelope by `list_shop_payouts`), this row is built from a three-table\njoin whose results are Row tuples, so it is always constructed with\nexplicit keyword arguments — ORM validation here would only turn a\nshape error into a runtime 500.\n\n**`shop_id`/`trader_id` optionality — contract §9 change-log CANDIDATE\n(CR-01, same treatment as `AdminBalanceRow.email`).** Both columns are\ngenuinely nullable at the DB level (`PayoutBatch.shop_id`/`.trader_id`,\n`apps/market/models.py`, no `nullable=False`; the sole write path seeds\n`trader_id` from `Shop.owner_trader_id`, itself nullable,\n`apps/market/models.py`), so required `UUID` fields here were a latent 500 the\nmoment one row in a page had a null shop/trader — the same\ndelayed-failure class CLAUDE.md's `from_attributes` note documents, and\nthe same defect class that WINDOWS.md 16 tracked for `scheduled_at`\nabove. Implemented as `Optional[UUID] = None`: identical JSON whenever a\nvalue exists. Recorded, not silently decided — see 90-REVIEW-FIX.md\nCR-01.\n\n**`scheduled_at` optionality (WINDOWS.md 16, closed 2026-08-15).**\nDefensive layer only: `p90_scheduled_at_not_null` backfilled the column\nand made it NOT NULL, so a null is never expected on the wire — but if\nthat invariant is ever re-broken (constraint dropped, raw backfill), the\nlisting degrades to a null field instead of a 500. Same treatment on\n`PayoutBatchOut.scheduled_at` (the trader-facing surface shared the\ndefect). Contract §9 change-log row: bottomup-console 18-CONTRACT.md,\n2026-08-15."},"PayoutBatchOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"total_credits":{"type":"number","title":"Total Credits"},"status":{"type":"string","title":"Status"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["id","shop_id","trader_id","total_credits","status"],"title":"PayoutBatchOut"},"PayoutHistoryItem":{"properties":{"date":{"type":"string","title":"Date"},"amount":{"type":"number","title":"Amount"},"status":{"type":"string","title":"Status"}},"type":"object","required":["date","amount","status"],"title":"PayoutHistoryItem"},"PayoutMetric":{"properties":{"total_paid":{"type":"number","title":"Total Paid","default":0.0},"pending":{"type":"number","title":"Pending","default":0.0},"available":{"type":"number","title":"Available","default":0.0}},"type":"object","title":"PayoutMetric"},"PenaltyCreateIn":{"properties":{"trader_id":{"type":"string","title":"Trader Id"},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Id"},"period_key":{"type":"string","title":"Period Key"},"reason":{"$ref":"#/components/schemas/PenaltyReason"},"points":{"anyOf":[{"type":"integer","maximum":0.0},{"type":"null"}],"title":"Points","description":"Negative value, e.g. -20."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["trader_id","period_key","reason"],"title":"PenaltyCreateIn"},"PenaltyReason":{"type":"string","enum":["duplicate_content","copy_paste_content","spam_comment","deleted_within_7_days","suspicious_engagement","bot_or_paid_engagement","off_brand_financial_claim"],"title":"PenaltyReason"},"PendingFirebaseTeardownOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"uid":{"type":"string","title":"Uid"},"former_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Former User Id"},"action":{"type":"string","title":"Action"},"attempts":{"type":"integer","title":"Attempts"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"alerted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Alerted At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","uid","action","attempts"],"title":"PendingFirebaseTeardownOut","description":"OPS-02: still-pending Firebase-teardown reconciliation queue row."},"PerformanceMeta":{"properties":{"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"},"calculated_at":{"type":"string","title":"Calculated At"}},"type":"object","required":["calculated_at"],"title":"PerformanceMeta"},"PerformanceResponse_BrandMetrics_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/BrandMetrics"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[BrandMetrics]"},"PerformanceResponse_CompareData_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/CompareData"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[CompareData]"},"PerformanceResponse_CopyTradePerformance_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/CopyTradePerformance"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[CopyTradePerformance]"},"PerformanceResponse_EarningsSummary_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/apps__analytics__trader__schemas__EarningsSummary"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[EarningsSummary]"},"PerformanceResponse_FinancialStats_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/FinancialStats"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[FinancialStats]"},"PerformanceResponse_List_MarketplaceChurnPoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/MarketplaceChurnPoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[List[MarketplaceChurnPoint]]"},"PerformanceResponse_List_MarketplacePayoutPoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/MarketplacePayoutPoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[List[MarketplacePayoutPoint]]"},"PerformanceResponse_List_MarketplaceRevenuePoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/MarketplaceRevenuePoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[List[MarketplaceRevenuePoint]]"},"PerformanceResponse_List_MarketplaceSubscriberPoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/MarketplaceSubscriberPoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[List[MarketplaceSubscriberPoint]]"},"PerformanceResponse_MarketplaceSummary_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/MarketplaceSummary"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[MarketplaceSummary]"},"PerformanceResponse_NetPnlWindows_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/NetPnlWindows"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[NetPnlWindows]"},"PerformanceResponse_PlatformStats_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/PlatformStats"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[PlatformStats]"},"PerformanceResponse_PortfolioSummary_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/PortfolioSummary"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[PortfolioSummary]"},"PerformanceResponse_PublicOverview_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/PublicOverview"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[PublicOverview]"},"PerformanceResponse_RankingData_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/RankingData"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[RankingData]"},"PerformanceResponse_SetupAnalysis_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/SetupAnalysis"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[SetupAnalysis]"},"PerformanceResponse_ShopContribution_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/ShopContribution"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[ShopContribution]"},"PerformanceResponse_ShopDashboard_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/ShopDashboard"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[ShopDashboard]"},"PerformanceResponse_ShopTraderPerformanceOut_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/ShopTraderPerformanceOut"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[ShopTraderPerformanceOut]"},"PerformanceResponse_SubscriptionROI_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/SubscriptionROI"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[SubscriptionROI]"},"PerformanceResponse_SummaryMetrics_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/SummaryMetrics"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[SummaryMetrics]"},"PerformanceResponse_TimeseriesData_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/TimeseriesData"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[TimeseriesData]"},"PerformanceResponse_TopTradersByCoinOut_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/TopTradersByCoinOut"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[TopTradersByCoinOut]"},"PerformanceResponse_Union_DailyReportOut__NoneType__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"anyOf":[{"$ref":"#/components/schemas/DailyReportOut"},{"type":"null"}]},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[Union[DailyReportOut, NoneType]]"},"PerformanceResponse_UserAnalyticsDashboard_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"$ref":"#/components/schemas/UserAnalyticsDashboard"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[UserAnalyticsDashboard]"},"PerformanceResponse_list_DailyReportPoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/DailyReportPoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[DailyReportPoint]]"},"PerformanceResponse_list_PlatformTrendPointExtended__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/PlatformTrendPointExtended"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[PlatformTrendPointExtended]]"},"PerformanceResponse_list_PlatformTrendPoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/PlatformTrendPoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[PlatformTrendPoint]]"},"PerformanceResponse_list_PortfolioByTrader__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/PortfolioByTrader"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[PortfolioByTrader]]"},"PerformanceResponse_list_ShopComparisonItem__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/ShopComparisonItem"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[ShopComparisonItem]]"},"PerformanceResponse_list_ShopTraderPerformanceItem__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/ShopTraderPerformanceItem"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[ShopTraderPerformanceItem]]"},"PerformanceResponse_list_UserGrowthTrendPoint__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"data":{"items":{"$ref":"#/components/schemas/UserGrowthTrendPoint"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PerformanceMeta"}},"type":"object","required":["data","meta"],"title":"PerformanceResponse[list[UserGrowthTrendPoint]]"},"PlatformBreakdownItem":{"properties":{"platform":{"type":"string","title":"Platform"},"points":{"type":"integer","title":"Points","default":0},"contents":{"type":"integer","title":"Contents","default":0}},"type":"object","required":["platform"],"title":"PlatformBreakdownItem"},"PlatformStats":{"properties":{"total_users":{"type":"integer","title":"Total Users","default":0},"total_traders":{"type":"integer","title":"Total Traders","default":0},"active_users_30d":{"type":"integer","title":"Active Users 30D","default":0},"new_users_period":{"type":"integer","title":"New Users Period","default":0},"total_setups":{"type":"integer","title":"Total Setups","default":0},"active_setups":{"type":"integer","title":"Active Setups","default":0},"closed_setups":{"type":"integer","title":"Closed Setups","default":0},"platform_success_rate":{"type":"number","title":"Platform Success Rate","default":0.0},"total_revenue_credits":{"type":"number","title":"Total Revenue Credits","default":0.0},"subscription_revenue":{"type":"number","title":"Subscription Revenue","default":0.0},"boost_revenue":{"type":"number","title":"Boost Revenue","default":0.0},"setup_purchase_revenue":{"type":"number","title":"Setup Purchase Revenue","default":0.0},"active_subscriptions":{"type":"integer","title":"Active Subscriptions","default":0},"total_shops":{"type":"integer","title":"Total Shops","default":0}},"type":"object","title":"PlatformStats"},"PlatformTrendPoint":{"properties":{"date":{"type":"string","title":"Date"},"new_users":{"type":"integer","title":"New Users","default":0},"active_users":{"type":"integer","title":"Active Users","default":0},"new_setups":{"type":"integer","title":"New Setups","default":0},"closed_setups":{"type":"integer","title":"Closed Setups","default":0},"revenue_credits":{"type":"number","title":"Revenue Credits","default":0.0},"new_subscriptions":{"type":"integer","title":"New Subscriptions","default":0}},"type":"object","required":["date"],"title":"PlatformTrendPoint"},"PlatformTrendPointExtended":{"properties":{"date":{"type":"string","title":"Date"},"new_users":{"type":"integer","title":"New Users","default":0},"active_users":{"type":"integer","title":"Active Users","default":0},"new_setups":{"type":"integer","title":"New Setups","default":0},"closed_setups":{"type":"integer","title":"Closed Setups","default":0},"revenue_credits":{"type":"number","title":"Revenue Credits","default":0.0},"new_subscriptions":{"type":"integer","title":"New Subscriptions","default":0},"subscription_revenue":{"type":"number","title":"Subscription Revenue","default":0.0},"boost_revenue":{"type":"number","title":"Boost Revenue","default":0.0},"setup_purchase_revenue":{"type":"number","title":"Setup Purchase Revenue","default":0.0}},"type":"object","required":["date"],"title":"PlatformTrendPointExtended"},"PnlSetup":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"category":{"anyOf":[{"$ref":"#/components/schemas/CategoriesEnum"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/StatusesEnum"},{"type":"null"}]},"sub_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Status"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"coin_icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Icon"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"image_success":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Success"},"position":{"anyOf":[{"$ref":"#/components/schemas/PositionsEnum"},{"type":"null"}]},"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"activated_stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Activated Stop Value"},"r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R Value"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl"},"pnl_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl Rate"},"r_r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R R Value"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"trader_ref_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Ref Code"},"total_win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Win Rate"},"total_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pnl"},"fee_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fee Rate"}},"type":"object","title":"PnlSetup"},"PnlSetupList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PnlSetup"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"PnlSetupList"},"PnlValue":{"properties":{"futures":{"type":"number","title":"Futures"},"spot":{"type":"number","title":"Spot"},"total":{"type":"number","title":"Total"}},"type":"object","required":["futures","spot","total"],"title":"PnlValue"},"PortfolioByTrader":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"trade_count":{"type":"integer","title":"Trade Count","default":0},"total_pnl":{"type":"number","title":"Total Pnl","default":0.0},"win_rate":{"type":"number","title":"Win Rate","default":0.0},"avg_pnl":{"type":"number","title":"Avg Pnl","default":0.0}},"type":"object","required":["trader_id"],"title":"PortfolioByTrader"},"PortfolioSummary":{"properties":{"total_pnl":{"type":"number","title":"Total Pnl","default":0.0},"roe_pct":{"type":"number","title":"Roe Pct","default":0.0},"win_rate":{"type":"number","title":"Win Rate","default":0.0},"trade_count":{"type":"integer","title":"Trade Count","default":0},"winning_trades":{"type":"integer","title":"Winning Trades","default":0},"losing_trades":{"type":"integer","title":"Losing Trades","default":0},"avg_pnl":{"type":"number","title":"Avg Pnl","default":0.0},"best_pnl":{"type":"number","title":"Best Pnl","default":0.0},"worst_pnl":{"type":"number","title":"Worst Pnl","default":0.0},"period_days":{"type":"integer","title":"Period Days","default":0}},"type":"object","title":"PortfolioSummary"},"PositionsEnum":{"type":"string","enum":["long","short"],"title":"PositionsEnum"},"PreferenceCellPatch":{"properties":{"category":{"type":"string","title":"Category"},"channel":{"type":"string","title":"Channel"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","required":["category","channel"],"title":"PreferenceCellPatch","description":"One changed matrix cell; ``enabled=None`` deletes its override."},"PreferencePatchIn":{"properties":{"cells":{"items":{"$ref":"#/components/schemas/PreferenceCellPatch"},"type":"array","title":"Cells"}},"type":"object","required":["cells"],"title":"PreferencePatchIn"},"ProductCreateRequest":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"referral_discount":{"type":"number","title":"Referral Discount","default":0.0},"discounted_price":{"type":"number","title":"Discounted Price","default":0.0},"trader_share_ratio":{"type":"number","title":"Trader Share Ratio","default":0.0},"trader_referral_earnings":{"type":"number","title":"Trader Referral Earnings","default":0.0},"trader_pool_ratio":{"type":"number","title":"Trader Pool Ratio","default":0.0},"pool_money":{"type":"number","title":"Pool Money","default":0.0},"gross_revenue":{"type":"number","title":"Gross Revenue","default":0.0},"duration":{"type":"integer","title":"Duration","default":1}},"type":"object","required":["code","name"],"title":"ProductCreateRequest"},"ProductListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ProductListResponse"},"ProductResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"referral_discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Referral Discount"},"discounted_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discounted Price"},"trader_share_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Share Ratio"},"trader_referral_earnings":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Referral Earnings"},"trader_pool_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Pool Ratio"},"pool_money":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pool Money"},"gross_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Revenue"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"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"}},"type":"object","required":["id","code","name"],"title":"ProductResponse"},"ProductRevenue":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"number","title":"Value"},"color":{"type":"string","title":"Color"}},"type":"object","required":["name","value","color"],"title":"ProductRevenue"},"ProductUpdateRequest":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"referral_discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Referral Discount"},"discounted_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discounted Price"},"trader_share_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Share Ratio"},"trader_referral_earnings":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Referral Earnings"},"trader_pool_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Pool Ratio"},"pool_money":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pool Money"},"gross_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Revenue"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"}},"type":"object","title":"ProductUpdateRequest"},"PromoCode":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"PromoCode"},"ProviderBalanceResponse":{"properties":{"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"exchange_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchange Balance"},"spot_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spot Balance"},"futures_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Futures Balance"},"total_allocated":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Allocated"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"ProviderBalanceResponse"},"PublicOverview":{"properties":{"total_traders":{"type":"integer","title":"Total Traders","default":0},"total_setups_today":{"type":"integer","title":"Total Setups Today","default":0},"platform_success_rate":{"type":"number","title":"Platform Success Rate","default":0.0},"top_shops":{"items":{"$ref":"#/components/schemas/TopShopInfo"},"type":"array","title":"Top Shops","default":[]}},"type":"object","title":"PublicOverview"},"QuietHoursPatch":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"start":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End"}},"type":"object","title":"QuietHoursPatch"},"RankingData":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RankingItem"},"type":"array","title":"Items","default":[]},"total_count":{"type":"integer","title":"Total Count","default":0}},"type":"object","title":"RankingData"},"RankingItem":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"trader_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Image"},"score":{"type":"number","title":"Score"},"rank":{"type":"integer","title":"Rank"},"metrics":{"$ref":"#/components/schemas/SummaryMetrics"}},"type":"object","required":["trader_id","score","rank","metrics"],"title":"RankingItem"},"RedemptionUserInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["id"],"title":"RedemptionUserInfo"},"ReferralCodeBase":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","title":"ReferralCodeBase","example":{"code":"1234567890"}},"ReferralCodeInfo":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"used":{"type":"integer","title":"Used","default":0}},"type":"object","title":"ReferralCodeInfo"},"ReferralTierCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"min_referrals":{"type":"integer","title":"Min Referrals"},"max_referrals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Referrals"},"multiplier":{"type":"number","exclusiveMinimum":0.0,"title":"Multiplier"},"is_active":{"type":"boolean","title":"Is Active","default":true},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["name","min_referrals","multiplier"],"title":"ReferralTierCreateRequest"},"ReferralTierResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"min_referrals":{"type":"integer","title":"Min Referrals"},"max_referrals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Referrals"},"multiplier":{"type":"number","title":"Multiplier"},"is_active":{"type":"boolean","title":"Is Active","default":true},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["id","name","min_referrals","multiplier"],"title":"ReferralTierResponse"},"ReferralTierUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"min_referrals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Referrals"},"max_referrals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Referrals"},"multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Multiplier"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"ReferralTierUpdateRequest"},"ReferredUser":{"properties":{"user_name":{"type":"string","title":"User Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"is_trial":{"type":"boolean","title":"Is Trial","default":false},"is_paid":{"type":"boolean","title":"Is Paid","default":false}},"type":"object","required":["user_name"],"title":"ReferredUser"},"ReferredUserList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferredUser"},"type":"array"},{"type":"null"}],"title":"Data"},"trial_count":{"type":"integer","title":"Trial Count","default":0},"paid_count":{"type":"integer","title":"Paid Count","default":0}},"type":"object","title":"ReferredUserList"},"RejectDisputeRequest":{"properties":{"resolution":{"type":"string","maxLength":2048,"title":"Resolution"}},"additionalProperties":false,"type":"object","required":["resolution"],"title":"RejectDisputeRequest","description":"Payload accepted by /admin/disputes/{id}/reject.\n\nIntentionally narrow: only {resolution} is accepted.  Extra fields such as\nrevoke_access, refund_mode, or refund_amount cause a 422 (Finding #8) so an\naccess-control action can never be silently dropped on the reject endpoint."},"RequestLogDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"route_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Path"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"elapsed_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Elapsed Time"},"user":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"User"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"request":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Request"},"response":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Response"},"error":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id"],"title":"RequestLogDetailOut","description":"GET /admin/logs/{log_id} wire shape (API-04, D7/D8).\n\nSame base fields as `RequestLogListItem` (id REQUIRED, projected from\nthe ES hit `_id` via `_hit_to_item` — H2) PLUS the full request/response\nobjects and the error object — this endpoint deliberately does NOT\nexclude bodies (D7: admin-only, superuser-gated full-document exposure)."},"RequestLogListItem":{"properties":{"id":{"type":"string","title":"Id"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"route_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Path"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"elapsed_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Elapsed Time"},"user":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"User"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"}},"type":"object","required":["id"],"title":"RequestLogListItem","description":"One row of GET /admin/logs. Never carries request/response bodies or\nheaders — those are excluded at the ES query level (D7)."},"ResolveDisputeRequest":{"properties":{"resolution":{"type":"string","maxLength":2048,"title":"Resolution"},"refund_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Refund Amount"},"revoke_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Revoke Access"},"refund_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refund Mode","default":"auto"}},"type":"object","required":["resolution"],"title":"ResolveDisputeRequest"},"ResponseError":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus","default":"error"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Visible"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"messages":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Messages"}},"type":"object","title":"ResponseError"},"ResponseList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseList"},"ResponseListGeneric_AccountCashFlowRowOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AccountCashFlowRowOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[AccountCashFlowRowOut]"},"ResponseListGeneric_AlgoSignalOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AlgoSignalOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[AlgoSignalOut]"},"ResponseListGeneric_AlgoTraderOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AlgoTraderOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[AlgoTraderOut]"},"ResponseListGeneric_BoostTierResponse_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/BoostTierResponse"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[BoostTierResponse]"},"ResponseListGeneric_CopierTradeRowOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CopierTradeRowOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[CopierTradeRowOut]"},"ResponseListGeneric_CreditPackageItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreditPackageItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[CreditPackageItem]"},"ResponseListGeneric_DeletedIdentityOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/DeletedIdentityOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[DeletedIdentityOut]"},"ResponseListGeneric_DeliveryListItemOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/DeliveryListItemOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[DeliveryListItemOut]"},"ResponseListGeneric_IndexMemberOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/IndexMemberOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[IndexMemberOut]"},"ResponseListGeneric_MySubscriptionItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/MySubscriptionItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[MySubscriptionItem]"},"ResponseListGeneric_NotificationInboxItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/NotificationInboxItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[NotificationInboxItem]"},"ResponseListGeneric_PayoutBatchAdminListItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayoutBatchAdminListItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[PayoutBatchAdminListItem]"},"ResponseListGeneric_PayoutBatchOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayoutBatchOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[PayoutBatchOut]"},"ResponseListGeneric_PendingFirebaseTeardownOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PendingFirebaseTeardownOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[PendingFirebaseTeardownOut]"},"ResponseListGeneric_RequestLogListItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/RequestLogListItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[RequestLogListItem]"},"ResponseListGeneric_ReviewOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReviewOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ReviewOut]"},"ResponseListGeneric_SessionInfo_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/SessionInfo"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[SessionInfo]"},"ResponseListGeneric_ShopApplicationOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShopApplicationOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ShopApplicationOut]"},"ResponseListGeneric_ShopFollowerOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShopFollowerOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ShopFollowerOut]"},"ResponseListGeneric_ShopPublic_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShopPublic"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ShopPublic]"},"ResponseListGeneric_ShopTraderHistoryOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShopTraderHistoryOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ShopTraderHistoryOut]"},"ResponseListGeneric_ShortLinkAdminListItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShortLinkAdminListItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ShortLinkAdminListItem]"},"ResponseListGeneric_ShortLinkAuditLogOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ShortLinkAuditLogOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[ShortLinkAuditLogOut]"},"ResponseListGeneric_SocialAccountOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/SocialAccountOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[SocialAccountOut]"},"ResponseListGeneric_SocialContentOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/SocialContentOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[SocialContentOut]"},"ResponseListGeneric_SubscriptionOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/SubscriptionOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[SubscriptionOut]"},"ResponseListGeneric_SwitchImpactCopyRow_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/SwitchImpactCopyRow"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[SwitchImpactCopyRow]"},"ResponseListGeneric_TraderApplicationOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderApplicationOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[TraderApplicationOut]"},"ResponseListGeneric_TraderEarningItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderEarningItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[TraderEarningItem]"},"ResponseListGeneric_TraderScoreOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderScoreOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[TraderScoreOut]"},"ResponseListGeneric_TraderSuspensionListItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderSuspensionListItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[TraderSuspensionListItem]"},"ResponseListGeneric_TxItem_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TxItem"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[TxItem]"},"ResponseListGeneric_Union_ShopOut__ShopPublic__":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/ShopOut"},{"$ref":"#/components/schemas/ShopPublic"}]},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[Union[ShopOut, ShopPublic]]"},"ResponseListGeneric_UnrealisedMarkEntryOut_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UnrealisedMarkEntryOut"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[UnrealisedMarkEntryOut]"},"ResponseListGeneric_UserDeviceInfo_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserDeviceInfo"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[UserDeviceInfo]"},"ResponseListGeneric_UserInDB_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserInDB"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[UserInDB]"},"ResponseListGeneric_UserNotification_":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserNotification"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseListGeneric[UserNotification]"},"ResponseMessage":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus","default":"success"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"data":{"anyOf":[{},{"$ref":"#/components/schemas/ResponseList"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ResponseMessage"},"ResponseStatus":{"type":"string","enum":["success","error","info"],"title":"ResponseStatus"},"RetentionStats":{"properties":{"retention_7d":{"type":"number","title":"Retention 7D","default":0.0},"retention_30d":{"type":"number","title":"Retention 30D","default":0.0},"retention_90d":{"type":"number","title":"Retention 90D","default":0.0}},"type":"object","title":"RetentionStats"},"RevenueByProductResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductRevenue"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"RevenueByProductResponse"},"RevenueMetric":{"properties":{"current_month":{"type":"number","title":"Current Month","default":0.0},"previous_month":{"type":"number","title":"Previous Month","default":0.0},"change_pct":{"type":"number","title":"Change Pct","default":0.0}},"type":"object","title":"RevenueMetric"},"ReviewOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"rating":{"type":"integer","title":"Rating"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"is_verified_subscriber":{"type":"boolean","title":"Is Verified Subscriber"},"status":{"type":"string","title":"Status"},"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"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"reply":{"anyOf":[{"$ref":"#/components/schemas/ReviewReplyOut"},{"type":"null"}]}},"type":"object","required":["id","shop_id","user_id","rating","is_verified_subscriber","status"],"title":"ReviewOut"},"ReviewReplyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"content":{"type":"string","title":"Content"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","review_id","user_id","content"],"title":"ReviewReplyOut"},"ReviewReplyRequest":{"properties":{"content":{"type":"string","maxLength":2048,"title":"Content"}},"type":"object","required":["content"],"title":"ReviewReplyRequest"},"ReviewStatus":{"type":"string","enum":["pending","eligible","not_eligible","flagged","manual_override"],"title":"ReviewStatus"},"ReviewSummary":{"properties":{"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"rating_distribution":{"type":"object","title":"Rating Distribution","default":{}}},"type":"object","title":"ReviewSummary"},"RoleDistribution":{"properties":{"customers":{"type":"integer","title":"Customers","default":0},"traders":{"type":"integer","title":"Traders","default":0},"admins":{"type":"integer","title":"Admins","default":0},"regular":{"type":"integer","title":"Regular","default":0},"customer_pct":{"type":"number","title":"Customer Pct","default":0.0},"trader_pct":{"type":"number","title":"Trader Pct","default":0.0},"admin_pct":{"type":"number","title":"Admin Pct","default":0.0},"regular_pct":{"type":"number","title":"Regular Pct","default":0.0}},"type":"object","title":"RoleDistribution"},"RootModel_List_SubscriptionBase__":{"items":{"$ref":"#/components/schemas/SubscriptionBase"},"type":"array","title":"RootModel[List[SubscriptionBase]]"},"RuleCondition":{"properties":{"field":{"type":"string","title":"Field"},"operator":{"type":"string","enum":["eq","neq","in","contains","gt","lt"],"title":"Operator"},"value":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"number"}],"title":"Value"}},"type":"object","required":["field","operator","value"],"title":"RuleCondition"},"ScoreBreakdown":{"properties":{"base_activity_points":{"type":"integer","title":"Base Activity Points","default":0},"engagement_quality_points":{"type":"integer","title":"Engagement Quality Points","default":0},"consistency_points":{"type":"integer","title":"Consistency Points","default":0},"platform_diversity_points":{"type":"integer","title":"Platform Diversity Points","default":0},"penalty_points":{"type":"integer","title":"Penalty Points","default":0}},"type":"object","title":"ScoreBreakdown"},"ScoreMetrics":{"properties":{"active_platform_count":{"type":"integer","title":"Active Platform Count","default":0},"original_content_count":{"type":"integer","title":"Original Content Count","default":0},"reshare_count":{"type":"integer","title":"Reshare Count","default":0},"comment_count":{"type":"integer","title":"Comment Count","default":0},"high_engagement_content_count":{"type":"integer","title":"High Engagement Content Count","default":0},"active_week_count":{"type":"integer","title":"Active Week Count","default":0}},"type":"object","title":"ScoreMetrics"},"SendTestIn":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"payload":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["user_id"],"title":"SendTestIn","description":"The operator's target + optional payload override. `payload=None`\nmeans \"use the catalog sample\", same convention as `TemplatePreviewIn`."},"SessionInfo":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"os_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Name"},"os_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Version"},"app_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Version"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"}},"type":"object","title":"SessionInfo"},"Setup":{"properties":{"profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"profit_taking_amount_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 1"},"profit_taking_amount_2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 2"},"profit_taking_amount_3":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 3"},"category":{"$ref":"#/components/schemas/CategoriesEnum","default":"spot"},"order_type":{"$ref":"#/components/schemas/OrderTypeEnum","default":"limit"},"status":{"$ref":"#/components/schemas/StatusesEnum","default":"incoming"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value"},"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R Value"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"duration":{"anyOf":[{"$ref":"#/components/schemas/DurationsEnum"},{"type":"null"}]},"entry_value_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value End"},"position":{"anyOf":[{"$ref":"#/components/schemas/PositionsEnum"},{"type":"null"}]},"id":{"type":"string","format":"uuid","title":"Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_targeted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Targeted"},"is_hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hidden"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date"},"activation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activation Date"},"activated_stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Activated Stop Value"},"tags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tags"},"open_leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Leverage"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"sub_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Status"},"is_watchlisted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Watchlisted"},"is_clap":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Clap"},"is_copied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copied"},"copy_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy State"},"copy_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Message"},"copy_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Code"},"copy_error_message_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Message Key"},"copy_error_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Reason"},"copy_error_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Action"},"copy_retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Retryable"},"copy_next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Copy Next Retry At"},"copy_attempt_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Copy Attempt No"},"copy_connection_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Connection Session Id"},"copy_session_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Session Archived"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"is_tp1":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp1"},"is_tp2":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp2"},"is_tp3":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp3"},"tp1_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp1 Date"},"tp2_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp2 Date"},"tp3_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp3 Date"},"close_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Close Price"},"close_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Close Date"},"remaining_size_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Remaining Size Pct","default":100.0},"partial_closes":{"anyOf":[{"items":{"$ref":"#/components/schemas/SetupPartialCloseOut"},"type":"array"},{"type":"null"}],"title":"Partial Closes"},"risk_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Ratio"},"initial_risk_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Risk Ratio"},"previous_entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Entry Value"},"previous_entry_value_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Entry Value End"},"previous_profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking 1"},"previous_profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking 2"},"previous_profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking 3"},"previous_profit_taking_amount_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking Amount 1"},"previous_profit_taking_amount_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking Amount 2"},"previous_profit_taking_amount_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Profit Taking Amount 3"},"previous_stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Stop Value"},"stop_distance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Distance"},"is_stop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Stop"},"stop_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stop Date"},"image_success":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Success"},"view_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"View Count"},"clap_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clap Count"},"coin_icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Icon"},"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"},"trader":{"anyOf":[{"$ref":"#/components/schemas/TraderInfo"},{"type":"null"}]},"price_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Credits","default":0},"is_purchased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Purchased"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"is_expiry_warning":{"type":"boolean","title":"Is Expiry Warning","description":"Futures işlemlerde aktivasyondan 21+ gün geçmişse True döner.\nTrader panelinde ünlem işareti göstermek için kullanılır.","readOnly":true}},"type":"object","required":["is_expiry_warning"],"title":"Setup"},"SetupAnalysis":{"properties":{"by_status":{"items":{"$ref":"#/components/schemas/StatusCount"},"type":"array","title":"By Status","default":[]},"by_category":{"items":{"$ref":"#/components/schemas/CategoryPerformance"},"type":"array","title":"By Category","default":[]},"by_coin":{"items":{"$ref":"#/components/schemas/CoinPerformance"},"type":"array","title":"By Coin","default":[]},"best_setup":{"anyOf":[{"$ref":"#/components/schemas/SetupHighlight"},{"type":"null"}]},"worst_setup":{"anyOf":[{"$ref":"#/components/schemas/SetupHighlight"},{"type":"null"}]}},"type":"object","title":"SetupAnalysis"},"SetupExplainResponse":{"properties":{"message":{"type":"string","title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_new_session":{"type":"boolean","title":"Is New Session"}},"type":"object","required":["message","is_new_session"],"title":"SetupExplainResponse"},"SetupHighlight":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"coin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin"},"pnl":{"type":"number","title":"Pnl","default":0.0}},"type":"object","title":"SetupHighlight"},"SetupKindEnum":{"type":"string","enum":["shop","practice"],"title":"SetupKindEnum","description":"Phase 102 Plan 01 (D-102-19) — shop-anchored vs practice setups.\n\nDeliberately NOT registered as a Postgres ENUM(create_type=False) type\nunlike CategoriesEnum/StatusesEnum/etc above: the `kind` column is a\nplain VARCHAR(16), matching migration `102a0_setup_kind`."},"SetupList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/Setup"},{"$ref":"#/components/schemas/SetupPreview"}]},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"SetupList"},"SetupOrderStateEnum":{"type":"string","enum":["pending","limit","active","partial","cancelled","closed","stopped","success","error"],"title":"SetupOrderStateEnum"},"SetupPartialCloseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"percent":{"type":"integer","title":"Percent"},"closed_pct_of_original":{"type":"number","title":"Closed Pct Of Original"},"fill_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fill Price"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","percent","closed_pct_of_original"],"title":"SetupPartialCloseOut"},"SetupPartialCloseRequest":{"properties":{"percent":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Percent"}},"type":"object","required":["percent"],"title":"SetupPartialCloseRequest","description":"Body for PATCH /setup/{id}/partial-close (OKX-style % of remaining)."},"SetupPreview":{"properties":{"profit_taking_1":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Profit Taking 3"},"profit_taking_amount_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 1"},"profit_taking_amount_2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 2"},"profit_taking_amount_3":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 3"},"category":{"$ref":"#/components/schemas/CategoriesEnum","default":"spot"},"order_type":{"$ref":"#/components/schemas/OrderTypeEnum","default":"limit"},"status":{"$ref":"#/components/schemas/StatusesEnum","default":"incoming"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"entry_value":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Entry Value"},"stop_value":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Stop Value"},"r_value":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"R Value"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"duration":{"anyOf":[{"$ref":"#/components/schemas/DurationsEnum"},{"type":"null"}]},"entry_value_end":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Entry Value End"},"position":{"anyOf":[{"$ref":"#/components/schemas/PositionsEnum"},{"type":"null"}]},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_targeted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Targeted"},"is_hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hidden"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date"},"activation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activation Date"},"activated_stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Activated Stop Value"},"tags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tags"},"open_leverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Leverage"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"sub_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Status"},"is_watchlisted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Watchlisted"},"is_clap":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Clap"},"is_copied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copied"},"copy_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy State"},"copy_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Message"},"copy_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Code"},"copy_error_message_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Message Key"},"copy_error_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Reason"},"copy_error_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Error Action"},"copy_retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Retryable"},"copy_next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Copy Next Retry At"},"copy_attempt_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Copy Attempt No"},"copy_connection_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Connection Session Id"},"copy_session_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Session Archived"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"is_tp1":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp1"},"is_tp2":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp2"},"is_tp3":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tp3"},"tp1_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp1 Date"},"tp2_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp2 Date"},"tp3_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tp3 Date"},"close_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Close Price"},"close_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Close Date"},"remaining_size_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Remaining Size Pct","default":100.0},"partial_closes":{"anyOf":[{"items":{"$ref":"#/components/schemas/SetupPartialCloseOut"},"type":"array"},{"type":"null"}],"title":"Partial Closes"},"risk_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Ratio"},"initial_risk_ratio":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Initial Risk Ratio"},"previous_entry_value":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Entry Value"},"previous_entry_value_end":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Entry Value End"},"previous_profit_taking_1":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Profit Taking 1"},"previous_profit_taking_2":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Profit Taking 2"},"previous_profit_taking_3":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Profit Taking 3"},"previous_profit_taking_amount_1":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Profit Taking Amount 1"},"previous_profit_taking_amount_2":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Profit Taking Amount 2"},"previous_profit_taking_amount_3":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Profit Taking Amount 3"},"previous_stop_value":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Previous Stop Value"},"stop_distance":{"anyOf":[{"type":"string","format":"password","writeOnly":true},{"type":"null"}],"title":"Stop Distance"},"is_stop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Stop"},"stop_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stop Date"},"image_success":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Success"},"view_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"View Count"},"clap_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clap Count"},"coin_icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Icon"},"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"},"trader":{"anyOf":[{"$ref":"#/components/schemas/TraderInfo"},{"type":"null"}]},"price_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Credits","default":0},"is_purchased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Purchased"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"is_expiry_warning":{"type":"boolean","title":"Is Expiry Warning","description":"Futures işlemlerde aktivasyondan 21+ gün geçmişse True döner.\nTrader panelinde ünlem işareti göstermek için kullanılır.","readOnly":true}},"type":"object","required":["is_expiry_warning"],"title":"SetupPreview"},"SetupPurchaseResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"setup_id":{"type":"string","format":"uuid","title":"Setup Id"},"price_credits":{"type":"number","title":"Price Credits"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","setup_id","price_credits"],"title":"SetupPurchaseResponse"},"SetupSearch":{"properties":{"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"filter_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Text"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"category":{"anyOf":[{"$ref":"#/components/schemas/CategoriesEnum"},{"type":"null"}]},"order_type":{"anyOf":[{"$ref":"#/components/schemas/OrderTypeEnum"},{"type":"null"}]},"status":{"anyOf":[{"items":{"$ref":"#/components/schemas/StatusesEnum"},"type":"array","maxItems":4,"minItems":0,"uniqueItems":true},{"type":"null"}],"title":"Status"},"position":{"anyOf":[{"$ref":"#/components/schemas/PositionsEnum"},{"type":"null"}]},"duration":{"anyOf":[{"$ref":"#/components/schemas/DurationsEnum"},{"type":"null"}]},"last_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Days"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"types":{"anyOf":[{"items":{"$ref":"#/components/schemas/TypesEnum"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Types"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SetupKindEnum"},{"type":"null"}]}},"type":"object","title":"SetupSearch"},"SetupSendPlanActionIn":{"properties":{"note":{"type":"string","maxLength":255,"minLength":1,"title":"Note"}},"type":"object","required":["note"],"title":"SetupSendPlanActionIn","description":"Body of the setup-send plan redrive / abandon actions (review WR-01)."},"SetupStats":{"properties":{"total":{"type":"integer","title":"Total","default":0},"incoming":{"type":"integer","title":"Incoming","default":0},"active":{"type":"integer","title":"Active","default":0},"success":{"type":"integer","title":"Success","default":0},"stopped":{"type":"integer","title":"Stopped","default":0},"closed":{"type":"integer","title":"Closed","default":0},"cancelled":{"type":"integer","title":"Cancelled","default":0}},"type":"object","title":"SetupStats"},"SetupValueHistory":{"properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","title":"SetupValueHistory"},"ShareRequest":{"properties":{"entity_type":{"type":"string","maxLength":32,"minLength":1,"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Entity Id"}},"additionalProperties":false,"type":"object","required":["entity_type"],"title":"ShareRequest","description":"The mobile share request body — frozen at exactly two fields (D-01).\n\n``entity_id`` is a plain string, not a UUID (D-01): the three filled\nregistry slots address their entity three different ways (``profile``\nand ``referral`` key off ``User.referral_code``, a string; the\n``ai_analysis`` id's type is not knowable from this repo at all — its\ndata lives in Firebase). A UUID column would force a migration on a live\nidempotency ledger the first time real ``ai_analysis`` data arrives.\n\n``model_config = ConfigDict(extra=\"forbid\")`` — be precise about what\nthis control does and does NOT do (cross-AI review finding A8):\n``AppBaseModel`` (``apps/schemas.py:7``) is a bare ``pass`` and declares\nno ``extra`` policy, so WITHOUT this config Pydantic v2 would silently\n*ignore* an unknown ``url``/``destination`` key rather than reject it —\ndeclaring only two fields, on its own, buys nothing at the request\nboundary. ``extra=\"forbid\"`` is what turns \"ignored\" into \"refused\": a\nbody carrying any key beyond ``entity_type``/``entity_id`` is a 422.\n\nThis is DEFENCE IN DEPTH, not the SHARE-02 guarantee itself. The actual\nguarantee is the *second*, independent control and does not depend on\nthis one: ``apps.links.service.create_share_link`` resolves the\ndestination SOLELY from ``ENTITY_URL_REGISTRY`` — a body key could not\nsteer it even if this schema accepted it. Two distinct tests prove the\ntwo controls separately: a schema-level 422 for an extra key, and a\nresolution-level assertion that the persisted ``canonical_url`` comes\nonly from the registry.\n\nWire-contract consequence, since this is the phase that freezes it:\n``extra=\"forbid\"`` means a future mobile build that adds a field to this\nbody gets a 422 until the backend learns that field. That is acceptable\nonly because no client has shipped against this endpoint yet — it is a\ndecision available exactly once, here (maintainer-confirmed at the\nTask-1 checkpoint)."},"ShareResponse":{"properties":{"url":{"type":"string","title":"Url"},"is_shortened":{"type":"boolean","title":"Is Shortened"}},"type":"object","required":["url","is_shortened"],"title":"ShareResponse","description":"The mobile share response — frozen at exactly ``{url, is_shortened}`` (D-02).\n\n``is_shortened`` is what lets the client tell a real Sink mint from a\nfail-open degradation to the canonical URL, which keeps the Phase 94\nattribution gap observable client-side instead of invisible. Adding a\nfield later is additive; removing or renaming ``is_shortened`` breaks a\nshipped Flutter contract in app versions that will never update."},"ShopApplicationCreate":{"properties":{"type":{"type":"string","pattern":"^(create_shop|join_shop)$","title":"Type"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"shop_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Shop Name"},"shop_description":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Shop Description"},"message":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Message"}},"type":"object","required":["type"],"title":"ShopApplicationCreate"},"ShopApplicationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"shop_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Name"},"shop_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Description"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"reviewed_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Note"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"shop_name_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Name Ref"}},"type":"object","required":["id","user_id","type","status"],"title":"ShopApplicationOut"},"ShopApplicationReview":{"properties":{"review_note":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Review Note"}},"type":"object","title":"ShopApplicationReview"},"ShopComparisonItem":{"properties":{"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"shop_name":{"type":"string","title":"Shop Name"},"subscribers":{"type":"integer","title":"Subscribers","default":0},"monthly_revenue":{"type":"number","title":"Monthly Revenue","default":0.0},"win_rate":{"type":"number","title":"Win Rate","default":0.0},"churn_rate":{"type":"number","title":"Churn Rate","default":0.0},"avg_setup_pnl":{"type":"number","title":"Avg Setup Pnl","default":0.0},"boost_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Status"}},"type":"object","required":["shop_id","shop_name"],"title":"ShopComparisonItem"},"ShopContribution":{"properties":{"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"shop_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Name"},"my_setup_count":{"type":"integer","title":"My Setup Count","default":0},"total_shop_setups":{"type":"integer","title":"Total Shop Setups","default":0},"setup_share_pct":{"type":"number","title":"Setup Share Pct","default":0.0},"my_pnl":{"type":"number","title":"My Pnl","default":0.0},"total_shop_pnl":{"type":"number","title":"Total Shop Pnl","default":0.0},"pnl_share_pct":{"type":"number","title":"Pnl Share Pct","default":0.0}},"type":"object","title":"ShopContribution"},"ShopCreate":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_group":{"type":"boolean","title":"Is Group","default":false},"monthly_price_credits":{"type":"number","title":"Monthly Price Credits"},"commission_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Commission Rate"},"category":{"anyOf":[{"type":"string","enum":["Spot Signals","Futures Signals","Education","Bot Trading","Copy Trading","Other"]},{"type":"null"}],"title":"Category"}},"type":"object","required":["trader_id","name","slug","monthly_price_credits"],"title":"ShopCreate"},"ShopDashboard":{"properties":{"revenue":{"$ref":"#/components/schemas/RevenueMetric","default":{"current_month":0.0,"previous_month":0.0,"change_pct":0.0}},"net_earnings":{"$ref":"#/components/schemas/RevenueMetric","default":{"current_month":0.0,"previous_month":0.0,"change_pct":0.0}},"subscribers":{"$ref":"#/components/schemas/SubscriberMetric","default":{"active":0,"new_this_month":0,"churned_this_month":0,"churn_rate":0.0}},"payouts":{"$ref":"#/components/schemas/PayoutMetric","default":{"total_paid":0.0,"pending":0.0,"available":0.0}}},"type":"object","title":"ShopDashboard"},"ShopDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_group":{"type":"boolean","title":"Is Group"},"monthly_price_credits":{"type":"number","title":"Monthly Price Credits"},"subscribers_count":{"type":"integer","title":"Subscribers Count"},"followers_count":{"type":"integer","title":"Followers Count"},"owner_trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Trader Id"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"is_active":{"type":"boolean","title":"Is Active"},"traders":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderInfo"},"type":"array"},{"type":"null"}],"title":"Traders","default":[]},"viewer":{"anyOf":[{"$ref":"#/components/schemas/ShopViewer"},{"type":"null"}]}},"type":"object","required":["id","name","slug","is_group","monthly_price_credits","subscribers_count","followers_count","is_active"],"title":"ShopDetail","description":"Shop detail projection with optional caller-specific viewer state."},"ShopFollowerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Image"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","user_id"],"title":"ShopFollowerOut"},"ShopInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"}},"type":"object","required":["id","name","slug"],"title":"ShopInfo"},"ShopOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_group":{"type":"boolean","title":"Is Group"},"monthly_price_credits":{"type":"number","title":"Monthly Price Credits"},"subscribers_count":{"type":"integer","title":"Subscribers Count"},"followers_count":{"type":"integer","title":"Followers Count"},"owner_trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Trader Id"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"commission_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Rate"},"is_active":{"type":"boolean","title":"Is Active"},"payout_schedule":{"type":"string","title":"Payout Schedule","default":"monthly"}},"type":"object","required":["id","name","slug","is_group","monthly_price_credits","subscribers_count","followers_count","is_active"],"title":"ShopOut"},"ShopPayoutScheduleUpdate":{"properties":{"payout_schedule":{"type":"string","enum":["monthly","weekly","bi_weekly"],"title":"Payout Schedule"}},"type":"object","required":["payout_schedule"],"title":"ShopPayoutScheduleUpdate","description":"Request schema for PATCH /admin/shops/{shop_id}/payout-schedule (D-11).\n\npayout_schedule must be one of PAYOUT_SCHEDULES ('monthly', 'weekly', 'bi_weekly').\nInvalid value -> HTTP 422 (Pydantic Literal validation). Name follows the\nsibling Shop*Update convention (Review Finding 10)."},"ShopPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_group":{"type":"boolean","title":"Is Group"},"monthly_price_credits":{"type":"number","title":"Monthly Price Credits"},"subscribers_count":{"type":"integer","title":"Subscribers Count"},"followers_count":{"type":"integer","title":"Followers Count"},"owner_trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Trader Id"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","required":["id","name","slug","is_group","monthly_price_credits","subscribers_count","followers_count"],"title":"ShopPublic"},"ShopReviewCreate":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"content":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Content"}},"type":"object","required":["rating"],"title":"ShopReviewCreate"},"ShopSubscribeRequest":{"properties":{"months":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Months","default":1},"auto_renew":{"type":"boolean","title":"Auto Renew","default":false}},"type":"object","title":"ShopSubscribeRequest"},"ShopTraderHistoryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"action":{"type":"string","title":"Action"},"performed_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Performed By User Id"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","shop_id","trader_id","action"],"title":"ShopTraderHistoryOut"},"ShopTraderPerformanceItem":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"type":"string","title":"Trader Name","default":""},"setup_count":{"type":"integer","title":"Setup Count","default":0},"win_rate":{"type":"number","title":"Win Rate","default":0.0},"total_pnl":{"type":"number","title":"Total Pnl","default":0.0},"best_setup_pnl":{"type":"number","title":"Best Setup Pnl","default":0.0}},"type":"object","required":["trader_id"],"title":"ShopTraderPerformanceItem"},"ShopTraderPerformanceOut":{"properties":{"earnings_scope":{"type":"string","title":"Earnings Scope","default":"earnings are platform-wide per-trader referral + pool totals; this shop scopes only the roster of traders shown, not the earnings — a trader's total may include earnings unrelated to this shop"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"shop_name":{"type":"string","title":"Shop Name"},"top":{"items":{"$ref":"#/components/schemas/ShopTraderPerformanceRow"},"type":"array","title":"Top","default":[]},"bottom":{"items":{"$ref":"#/components/schemas/ShopTraderPerformanceRow"},"type":"array","title":"Bottom","default":[]},"data":{"items":{"$ref":"#/components/schemas/ShopTraderPerformanceRow"},"type":"array","title":"Data","default":[]}},"type":"object","required":["shop_id","shop_name"],"title":"ShopTraderPerformanceOut"},"ShopTraderPerformanceRow":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"total_earned_usd":{"type":"number","title":"Total Earned Usd","default":0.0},"referral_usd":{"type":"number","title":"Referral Usd","default":0.0},"pool_usd":{"type":"number","title":"Pool Usd","default":0.0},"account_status":{"type":"string","title":"Account Status","default":"active"},"is_member":{"type":"boolean","title":"Is Member","default":true}},"type":"object","required":["trader_id"],"title":"ShopTraderPerformanceRow"},"ShopUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_group":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Group"},"monthly_price_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Price Credits"},"commission_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Commission Rate"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"trial_days":{"anyOf":[{"type":"integer","maximum":30.0,"minimum":1.0},{"type":"null"}],"title":"Trial Days"},"category":{"anyOf":[{"type":"string","enum":["Spot Signals","Futures Signals","Education","Bot Trading","Copy Trading","Other"]},{"type":"null"}],"title":"Category"}},"type":"object","title":"ShopUpdate"},"ShopViewer":{"properties":{"is_following":{"type":"boolean","title":"Is Following"},"is_subscribed":{"type":"boolean","title":"Is Subscribed"},"is_entitled":{"type":"boolean","title":"Is Entitled"},"is_owner":{"type":"boolean","title":"Is Owner"},"is_member":{"type":"boolean","title":"Is Member"},"has_reviewed":{"type":"boolean","title":"Has Reviewed"},"can_review":{"type":"boolean","title":"Can Review"},"my_review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"My Review Id"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/ShopViewerSubscription"},{"type":"null"}]}},"type":"object","required":["is_following","is_subscribed","is_entitled","is_owner","is_member","has_reviewed","can_review"],"title":"ShopViewer","description":"Authenticated caller's relationship to a single shop.\n\n``can_review`` is currently derived from ``not has_reviewed``. It remains\nexplicit so a future review-eligibility rule can change it without forcing\nclients to infer a new policy from the existing review flag."},"ShopViewerSubscription":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"is_trial":{"type":"boolean","title":"Is Trial"},"auto_renew":{"type":"boolean","title":"Auto Renew"},"is_refundable":{"type":"boolean","title":"Is Refundable"}},"type":"object","required":["id","expires_at","is_trial","auto_renew","is_refundable"],"title":"ShopViewerSubscription","description":"Fresh active-subscription metadata for the authenticated shop viewer."},"ShopWithTraders":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_group":{"type":"boolean","title":"Is Group"},"monthly_price_credits":{"type":"number","title":"Monthly Price Credits"},"subscribers_count":{"type":"integer","title":"Subscribers Count"},"followers_count":{"type":"integer","title":"Followers Count"},"owner_trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Trader Id"},"is_boosted":{"type":"boolean","title":"Is Boosted","default":false},"boost_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boost Tier"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"avg_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Rating"},"review_count":{"type":"integer","title":"Review Count","default":0},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"is_active":{"type":"boolean","title":"Is Active"},"traders":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderInfo"},"type":"array"},{"type":"null"}],"title":"Traders","default":[]}},"type":"object","required":["id","name","slug","is_group","monthly_price_credits","subscribers_count","followers_count","is_active"],"title":"ShopWithTraders","description":"Shared shop projection for detail and trader-facing shop routes."},"ShortLinkAdminDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"short_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Url"},"canonical_url":{"type":"string","title":"Canonical Url"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"campaign":{"type":"string","title":"Campaign"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"lifecycle_status":{"$ref":"#/components/schemas/LinkLifecycleStatus"},"sink_status":{"type":"string","title":"Sink Status"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"},"origin":{"type":"string","title":"Origin"},"sink_attempts":{"type":"integer","title":"Sink Attempts"},"sink_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sink Confirmed At"},"last_sink_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sink Error"},"created_by_admin_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Admin Id"},"admin_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Comment"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Enforced by an hourly sweep (plan 93-07), not instantly — a link can outlive this stated expiry by up to an hour before it is disabled."},"lifetime":{"$ref":"#/components/schemas/LifetimeStatsOut"},"live_window":{"anyOf":[{"$ref":"#/components/schemas/LiveWindowStatsOut"},{"type":"null"}]},"metric_descriptor":{"$ref":"#/components/schemas/MetricDescriptorOut"}},"type":"object","required":["id","canonical_url","campaign","lifecycle_status","sink_status","origin","sink_attempts","lifetime","metric_descriptor"],"title":"ShortLinkAdminDetail","description":"``GET /admin/links/{link_id}`` response (ADMR-02). Carries the\nderived ``lifecycle_status`` AND the raw fields it was derived from\nverbatim — ``sink_status``, ``disabled_at``, ``origin`` (D-16) — so the\nderived field never hides the underlying facts a superuser may need to\naudit.\n\n``created_at`` is nullable (Rule 1 fix, plan 92-03): ``ShortLink``\ninherits ``DbModel``'s nullable legacy ``created_at`` column, so a NULL\nis reachable even though no current writer produces one. A required\nfield here would 500 the moment such a row exists — the exact\nhealthy-200-until-a-real-row-shows-up failure class CLAUDE.md already\ndocuments for ``from_attributes`` (this is the same class of bug, one\nfield type over).\n\n``live_window`` (plan 92-06, D-07): the detail endpoint's one bounded\nlive Sink read, ``None`` when no live call was made at all. See\n``LiveWindowStatsOut``'s docstring and ``LifetimeStatsOut``'s\nNEVER-SUM-RULE paragraph — ``lifetime`` and ``live_window`` are\nseparately named objects, each with its own window and its own\nobservation stamp, precisely because the snapshot's full-window re-read\nalready includes today and summing the two would double-count every\nevent inside the live window."},"ShortLinkAdminListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"short_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Url"},"canonical_url":{"type":"string","title":"Canonical Url"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"campaign":{"type":"string","title":"Campaign"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"origin":{"type":"string","title":"Origin"},"sink_status":{"type":"string","title":"Sink Status"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"},"lifecycle_status":{"$ref":"#/components/schemas/LinkLifecycleStatus"},"created_by_admin_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Admin Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Enforced by an hourly sweep (plan 93-07), not instantly — a link can outlive this stated expiry by up to an hour before it is disabled."},"lifetime":{"$ref":"#/components/schemas/LifetimeStatsOut"},"metric_descriptor":{"$ref":"#/components/schemas/MetricDescriptorOut"}},"type":"object","required":["id","canonical_url","campaign","origin","sink_status","lifecycle_status","lifetime","metric_descriptor"],"title":"ShortLinkAdminListItem","description":"``GET /admin/links`` list-row response (Phase 92 / ADMR-01, plan\n92-03). A trimmed sibling of ``ShortLinkAdminDetail`` — same raw fields\n(``sink_status``, ``disabled_at``) plus the derived ``lifecycle_status``,\nminus ``sink_attempts``/``sink_confirmed_at``/``last_sink_error`` (an\noperator drills into the detail read for those).\n\nDeliberately NO ``live_window`` field (D-18): the live Sink reading\nexists only on the detail endpoint, so this row's shape makes a per-row\nSink call structurally impossible to add by accident — the list route\nreads exclusively from ``lifetime``'s one grouped\n``short_link_click_daily`` aggregate (Task 2).\n\n``created_at`` is nullable, same Rule 1 rationale as\n``ShortLinkAdminDetail`` above: ``ShortLink`` inherits ``DbModel``'s\nnullable legacy column, and the list route's own Postgres-lane test\n(``tests/test_links_admin_ordering_postgres.py``) forces exactly this\nrow shape to prove the NULL-``created_at`` ordering guarantee — a\nrequired field here would 500 that very test."},"ShortLinkAuditLogOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"actor_admin_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Admin Id"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"actor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email"},"actor_kind":{"type":"string","title":"Actor Kind"},"action":{"type":"string","title":"Action"},"target_link_id":{"type":"string","format":"uuid","title":"Target Link Id"},"target_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Slug"},"previous_canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Canonical Url"},"new_canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Canonical Url"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"payload":{"type":"object","title":"Payload"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","actor_kind","action","target_link_id","payload"],"title":"ShortLinkAuditLogOut","description":"One row of ``GET /admin/links/{link_id}/audit`` (Phase 96 / LAUD-01,\nLAUD-02, D-04, D-05). Mirrors the house audit-read shape\n(``AuditLogResponse``, ``app/apps/ads/schemas.py``) — a raw actor UUID\nplus the full ``payload`` dict verbatim, no allowlist — with the D-04\njoin fields added on top.\n\n``actor_admin_id`` is ALWAYS emitted from the audit row itself, never\nfrom a joined ``User.id`` (which is NULL for a deleted actor) — it is\nan immutable actor-id snapshot (``ShortLinkAuditLog`` carries no FK on\nthis column by design, see its class docstring). ``actor_name`` and\n``actor_email`` are a best-effort LEFT OUTER JOIN resolution of that\nUUID's CURRENT identity, not the actor's identity at the time of the\naction — both are null when the account no longer exists, and neither\nis ever treated as authoritative over ``actor_admin_id``.\n\n``previous_canonical_url``/``new_canonical_url`` are the \"destination\nbefore and after\" pair LAUD-01 asks for; ``trace_id`` is LAUD-02's\ncross-service correlation value and is nullable — present as a JSON\nkey with a null value when the writer had none, never omitted.\n\n``created_at`` is nullable, same Rule-1 rationale as\n``ShortLinkAdminDetail.created_at``: ``ShortLinkAuditLog`` inherits\n``DbModel``'s nullable legacy column.\n\n``model_config = ConfigDict(from_attributes=True)`` is declared here\neven though the route constructs each item with explicit keyword\narguments (a three-entity query's ``Row`` cannot be validated whole) —\nthe test suite asserts this schema against a real committed ORM row at\nthe serialization boundary, and ``AppBaseModel`` is deliberately bare\n(see CLAUDE.md's ``from_attributes`` gotcha)."},"SingIn":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","password"],"title":"SingIn"},"SocialAccountCreate":{"properties":{"platform":{"$ref":"#/components/schemas/SocialPlatform"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"},"follower_count":{"type":"integer","minimum":0.0,"title":"Follower Count","default":0}},"type":"object","required":["platform"],"title":"SocialAccountCreate"},"SocialAccountOut":{"properties":{"id":{"type":"string","title":"Id"},"platform":{"type":"string","title":"Platform"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"},"follower_count":{"type":"integer","title":"Follower Count","default":0},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"}},"type":"object","required":["id","platform"],"title":"SocialAccountOut"},"SocialAccountUpdate":{"properties":{"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"},"follower_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Follower Count"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Verified"}},"type":"object","title":"SocialAccountUpdate"},"SocialContentOut":{"properties":{"id":{"type":"string","title":"Id"},"platform":{"type":"string","title":"Platform"},"platform_content_id":{"type":"string","title":"Platform Content Id"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_type":{"type":"string","title":"Content Type"},"caption_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption Text"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"review_status":{"type":"string","title":"Review Status"},"eligibility_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eligibility Reason"},"likes_count":{"type":"integer","title":"Likes Count","default":0},"comments_count":{"type":"integer","title":"Comments Count","default":0},"shares_count":{"type":"integer","title":"Shares Count","default":0},"saves_count":{"type":"integer","title":"Saves Count","default":0},"views_count":{"type":"integer","title":"Views Count","default":0},"link_clicks_count":{"type":"integer","title":"Link Clicks Count","default":0},"normalized_engagement_rate":{"type":"number","title":"Normalized Engagement Rate","default":0},"engagement_percentile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Engagement Percentile"},"base_points":{"type":"integer","title":"Base Points","default":0},"engagement_bonus_points":{"type":"integer","title":"Engagement Bonus Points","default":0},"penalty_points":{"type":"integer","title":"Penalty Points","default":0},"total_points":{"type":"integer","title":"Total Points","default":0}},"type":"object","required":["id","platform","platform_content_id","content_type","published_at","review_status"],"title":"SocialContentOut"},"SocialContentType":{"type":"string","enum":["original_post","original_video","thread","quote_repost","simple_repost","story_share","comment_reply"],"title":"SocialContentType"},"SocialPlatform":{"type":"string","enum":["x","instagram","tiktok","youtube"],"title":"SocialPlatform"},"StatsOut":{"properties":{"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"subscribers":{"type":"integer","title":"Subscribers"},"followers":{"type":"integer","title":"Followers"},"satisfaction_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Satisfaction Rate"},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Success Rate","description":"DEPRECATED alias of setup_success_rate_all_time, retained for wire compatibility. Always carries the identical value -- these two names can never disagree."},"setup_success_rate_all_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setup Success Rate All Time","description":"The canonical success figure (ADD-06). Formula: successful setups over successful-plus-stopped setups (see graded_setups), for the shop's CURRENT shop_trader roster, all time. Null when graded_setups is 0 -- never a fabricated zero. This is NOT the analytics module's per-shop win_rate (app/apps/analytics/platform/service.py) and must not be read as one; it is an independent implementation that differs in three ways: (1) source -- this reads the ORM-mapped setup table, win_rate reads the pnl_setup6 materialized view; (2) window -- this is all-time, win_rate is a trailing 90 days; (3) empty denominator -- this is null, win_rate coalesces to 0."},"graded_setups":{"type":"integer","title":"Graded Setups","description":"Denominator for setup_success_rate_all_time: the count of the shop's setups whose status is success or stopped. Deliberately narrower than the analytics module's wider closed-setup count, which also counts cancelled and closed setups.","default":0},"review_count":{"type":"integer","title":"Review Count","description":"Denominator for satisfaction_rate. Active reviews only (Shop.review_count as maintained by _update_shop_rating on every review write). This is a narrower population than list_my_reviews, which returns a caller's own reviews across all statuses -- a shop whose only review is hidden reports zero here while its author still sees it on their own surface.","default":0}},"type":"object","required":["shop_id","subscribers","followers"],"title":"StatsOut"},"StatsStatus":{"type":"string","enum":["ok","stale","unavailable","unknown"],"title":"StatsStatus","description":"Closed vocabulary for whether a click statistic can be trusted\n(ADMR-06, D-08). A field on a 200, never an HTTP status of its own —\nthe list surface must render mixed rows (one link ``ok``, the next\n``unavailable``), which neither an HTTP status code nor a thrown coded\nerror can express per-row."},"StatusCount":{"properties":{"status":{"type":"string","title":"Status"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","required":["status"],"title":"StatusCount"},"StatusDistribution":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"integer","title":"Value"},"color":{"type":"string","title":"Color"}},"type":"object","required":["name","value","color"],"title":"StatusDistribution"},"StatusDistributionResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StatusDistribution"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"StatusDistributionResponse"},"StatusesEnum":{"type":"string","enum":["incoming","active","cancelled","stopped","success","closed"],"title":"StatusesEnum"},"StrategyOut":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"family":{"type":"string","title":"Family"},"description":{"type":"string","title":"Description","default":""},"default_params":{"type":"object","title":"Default Params","default":{}},"launch_params":{"type":"object","title":"Launch Params","default":{}}},"type":"object","required":["key","name","family"],"title":"StrategyOut"},"SubscribePreviewOut":{"properties":{"months":{"type":"integer","title":"Months"},"price_credits":{"type":"number","title":"Price Credits"},"total":{"type":"number","title":"Total"},"balance":{"type":"number","title":"Balance","description":"Available credits: balance net of reserved, not raw balance."},"shortfall":{"type":"number","title":"Shortfall"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"is_renewal":{"type":"boolean","title":"Is Renewal"}},"type":"object","required":["months","price_credits","total","balance","shortfall","expires_at","is_renewal"],"title":"SubscribePreviewOut","description":"Response for `POST /market/shops/{shop_id}/subscribe/preview`\n(ADD-01). Built from a plain dict returned by\n`market_service.preview_subscription`, not from an ORM row, so it\nneeds no `from_attributes` config.\n\nThis quote is NON-BINDING and POINT-IN-TIME (review L-04): the\nguarantee is that the quote and the charge compute the same numbers\nfor the same inputs, not that the charge will honour this exact quote\nlater. `subscribe()` re-reads the shop's price and the caller's\navailable balance at its own instant, and nothing about a preview\nreserves credits, locks a price, or creates server-side state. If the\nprice or the caller's balance changes between the preview and the\nsubscribe call, the amounts can differ. A binding quote (quote id,\nprice version, expiry, charge-time revalidation) is a separate\nmilestone and is not built here."},"SubscriberMetric":{"properties":{"active":{"type":"integer","title":"Active","default":0},"new_this_month":{"type":"integer","title":"New This Month","default":0},"churned_this_month":{"type":"integer","title":"Churned This Month","default":0},"churn_rate":{"type":"number","title":"Churn Rate","default":0.0}},"type":"object","title":"SubscriberMetric"},"SubscriptionBase":{"properties":{"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"product_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Duration"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market"},"purchase_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purchase Id"},"transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Id"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"expire_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Date"},"renew_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Renew Date"},"auto_renew_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renew Status"},"auto_renew_product_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Renew Product Code"},"is_expired":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Expired"},"is_trial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trial"},"is_cancelled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cancelled"}},"type":"object","title":"SubscriptionBase"},"SubscriptionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"auto_renew":{"type":"boolean","title":"Auto Renew"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"refund_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refund Until"},"is_trial":{"type":"boolean","title":"Is Trial","default":false},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Image"},"price_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Credits"},"is_active":{"type":"boolean","title":"Is Active","default":false}},"type":"object","required":["id","user_id","shop_id","started_at","expires_at","auto_renew"],"title":"SubscriptionOut"},"SubscriptionROI":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/SubscriptionROIItem"},"type":"array","title":"Subscriptions","default":[]},"total_spent":{"type":"number","title":"Total Spent","default":0.0},"total_subscriptions":{"type":"integer","title":"Total Subscriptions","default":0}},"type":"object","title":"SubscriptionROI"},"SubscriptionROIItem":{"properties":{"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"shop_name":{"type":"string","title":"Shop Name"},"total_spent_credits":{"type":"number","title":"Total Spent Credits","default":0.0},"months_subscribed":{"type":"integer","title":"Months Subscribed","default":0},"shop_win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shop Win Rate"},"setups_received":{"type":"integer","title":"Setups Received","default":0},"shop_avg_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shop Avg Pnl"}},"type":"object","required":["shop_id","shop_name"],"title":"SubscriptionROIItem"},"SubscriptionUserInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["id"],"title":"SubscriptionUserInfo"},"SuggestionCandidate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trader_id":{"type":"string","title":"Trader Id"},"recommendation_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommendation Score"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"confidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Level"},"component_scores":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Component Scores"},"reasons":{"items":{},"type":"array","title":"Reasons"}},"type":"object","required":["id","trader_id"],"title":"SuggestionCandidate","description":"A recommended trader candidate with score details and explanation placeholder."},"SuggestionOut":{"properties":{"team":{"$ref":"#/components/schemas/TeamSummary"},"candidates":{"items":{"$ref":"#/components/schemas/SuggestionCandidate"},"type":"array","title":"Candidates"},"config_version":{"type":"string","title":"Config Version"},"score_asof_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Score Asof Date"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"reasons":{"items":{},"type":"array","title":"Reasons"}},"type":"object","required":["team","candidates","config_version"],"title":"SuggestionOut","description":"Recommendation suggestions response envelope containing team summary and candidates."},"SummaryMetrics":{"properties":{"total_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pnl"},"roe_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roe Pct"},"win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate"},"profit_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Factor"},"sharpe_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sharpe Ratio"},"max_drawdown_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Drawdown Pct"},"min_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Pnl"},"max_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Pnl"},"avg_win":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Win"},"avg_loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Loss"},"max_consecutive_wins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Consecutive Wins"},"max_consecutive_losses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Consecutive Losses"},"trade_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trade Count"},"avg_position_duration_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Position Duration Min"}},"type":"object","title":"SummaryMetrics"},"SwitchConfirmPayload":{"properties":{"exchange":{"type":"string","title":"Exchange"}},"type":"object","required":["exchange"],"title":"SwitchConfirmPayload","description":"Request body for POST /exchange/switch/confirm.\n\nIt carries the MARKET and nothing else. In particular it carries no\ncandidate identifier: the candidate is resolved server-side from\n``request.user.id`` plus this market, so ownership is a CONSTRAINT of the\nlookup rather than a check applied afterwards. A client-supplied candidate\nid would make confirming another copier's switch — and therefore\nterminating their real open positions — one forged field away (T-79-32)."},"SwitchImpactCopyRow":{"properties":{"copy_attempt_id":{"type":"string","format":"uuid","title":"Copy Attempt Id"},"attempt_no":{"type":"integer","title":"Attempt No"},"impact_group":{"type":"string","enum":["active","unresolved","archived"],"title":"Impact Group"},"setup_id":{"type":"string","format":"uuid","title":"Setup Id"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opened At"},"remote_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote State"}},"additionalProperties":false,"type":"object","required":["copy_attempt_id","attempt_no","impact_group","setup_id"],"title":"SwitchImpactCopyRow","description":"One copy under the source session, in one impact group.\n\nBuilt by ``model_validate()`` over a row of ``_switch_impact_selectable``,\nwhich is why ``from_attributes`` is declared HERE and not inherited."},"TTLConfigItem":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"source_type":{"type":"string","title":"Source Type"},"ttl_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Days"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["source_type"],"title":"TTLConfigItem"},"TTLConfigUpdateRequest":{"properties":{"ttl_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Days"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"TTLConfigUpdateRequest"},"TamperedEvent":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"expected_hash":{"type":"string","title":"Expected Hash"},"actual_hash":{"type":"string","title":"Actual Hash"}},"type":"object","required":["event_id","expected_hash","actual_hash"],"title":"TamperedEvent"},"TargetPeriodEnum":{"type":"string","enum":["today","yesterday","past7days","past24hours","past30days","last_week","last_month","last_year","this_week","this_month","this_year","all_time"],"title":"TargetPeriodEnum"},"Team":{"properties":{"name":{"type":"string","title":"Name"},"stats":{"$ref":"#/components/schemas/TeamStatModel","default":{"pnl":{"daily":{},"monthly":{},"total":{},"weekly":{}},"roe":{"daily":{},"monthly":{},"total":{},"weekly":{}},"winrate":{"daily":{},"monthly":{},"total":{},"weekly":{}},"closed_setups":{"daily":{},"monthly":{},"total":{},"weekly":{}}}},"stat_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stat At"},"members_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Members Limit"},"members_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Members Count"},"copied_setups_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Copied Setups Count"},"r_r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R R"},"traders":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderInfo"},"type":"array"},{"type":"null"}],"title":"Traders"}},"type":"object","title":"Team"},"TeamStatCategoryModel":{"properties":{"spot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spot"},"futures":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Futures"},"summary":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Summary"}},"type":"object","title":"TeamStatCategoryModel"},"TeamStatChildModel":{"properties":{"daily":{"$ref":"#/components/schemas/TeamStatCategoryModel","default":{}},"weekly":{"$ref":"#/components/schemas/TeamStatCategoryModel","default":{}},"monthly":{"$ref":"#/components/schemas/TeamStatCategoryModel","default":{}},"total":{"$ref":"#/components/schemas/TeamStatCategoryModel","default":{}}},"type":"object","title":"TeamStatChildModel"},"TeamStatModel":{"properties":{"pnl":{"$ref":"#/components/schemas/TeamStatChildModel","default":{"daily":{},"weekly":{},"monthly":{},"total":{}}},"roe":{"$ref":"#/components/schemas/TeamStatChildModel","default":{"daily":{},"weekly":{},"monthly":{},"total":{}}},"winrate":{"$ref":"#/components/schemas/TeamStatChildModel","default":{"daily":{},"weekly":{},"monthly":{},"total":{}}},"closed_setups":{"$ref":"#/components/schemas/TeamStatChildModel","default":{"daily":{},"weekly":{},"monthly":{},"total":{}}}},"type":"object","title":"TeamStatModel"},"TeamStatsModel":{"properties":{"name":{"type":"string","title":"Name"},"members_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Members Limit"},"members_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Members Count"},"summary":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamStatsSummary"},"type":"array"},{"type":"null"}],"title":"Summary"},"timeseries":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamStatsSummary"},"type":"array"},{"type":"null"}],"title":"Timeseries"},"traders":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamStatsTrader"},"type":"array"},{"type":"null"}],"title":"Traders"}},"type":"object","title":"TeamStatsModel"},"TeamStatsSummary":{"properties":{"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl"},"roe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roe"},"total_trades":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Trades"},"win_trades":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Win Trades"},"winrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Winrate"}},"type":"object","title":"TeamStatsSummary"},"TeamStatsTrader":{"properties":{"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl"},"roe":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roe"},"total_trades":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Trades"},"win_trades":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Win Trades"},"winrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Winrate"},"trader":{"anyOf":[{"$ref":"#/components/schemas/TraderInfo"},{"type":"null"}]}},"type":"object","title":"TeamStatsTrader"},"TeamSuggestionPreference":{"properties":{"risk_profile":{"type":"string","enum":["conservative","balanced","aggressive"],"title":"Risk Profile"},"team_recommendation_in_app_enabled":{"type":"boolean","title":"Team Recommendation In App Enabled"},"team_recommendation_push_enabled":{"type":"boolean","title":"Team Recommendation Push Enabled"},"recommendation_frequency":{"type":"string","enum":["weekly","important_only","off"],"title":"Recommendation Frequency"}},"type":"object","required":["risk_profile","team_recommendation_in_app_enabled","team_recommendation_push_enabled","recommendation_frequency"],"title":"TeamSuggestionPreference","description":"Body of GET and PUT ``/copy_trade/team/suggestions/preferences``.\n\nDeliberately FLAT -- no ``ResponseMessage`` envelope. The console reads\n``response.data`` directly for both verbs and writes the PUT response\nstraight into its query cache, so the two must be the same shape.\n\nField names are the console's, not the columns': ``team_recommendation_*``\nmaps onto ``recommendation_*`` on ``CopierNotificationPreference``. The\nprefix is kept because it is already shipped in the client and the columns\nare already named for the model they live on; the endpoint translates.\n\nAll four fields are required in BOTH directions -- PUT is a full replace,\nnot a partial patch (``PATCH /notification/preferences`` and\n``PATCH /notification/digest-preferences`` are the partial-update doors\nfor the wider preference row since Phase 108 retired the old copy-trade\npreference PATCH route, D-26).\n\nNo ``from_attributes``: the field names deliberately differ from the\ncolumn names, so ``model_validate(row)`` cannot populate this -- the\nendpoint maps the three renamed fields explicitly."},"TeamSummary":{"properties":{"size":{"type":"integer","title":"Size"},"max":{"type":"integer","title":"Max"},"open_slots":{"type":"integer","title":"Open Slots"}},"type":"object","required":["size","max","open_slots"],"title":"TeamSummary","description":"Current copier team sizing summary (D-01/REC-01)."},"TemplatePreviewIn":{"properties":{"payload":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","title":"TemplatePreviewIn","description":"An operator-edited payload, or `None` to preview the catalog\n`sample`. Unvalidated at the schema level — `payload_schema.model_validate`\nin `preview_template` is the one validation step (T-113.2-32)."},"TierDistributionItem":{"properties":{"tier_name":{"type":"string","title":"Tier Name"},"trader_count":{"type":"integer","title":"Trader Count"}},"type":"object","required":["tier_name","trader_count"],"title":"TierDistributionItem"},"TierHistoryItem":{"properties":{"period_year":{"type":"integer","title":"Period Year"},"period_month":{"type":"integer","title":"Period Month"},"tier_name":{"type":"string","title":"Tier Name"},"referral_count":{"type":"integer","title":"Referral Count"},"multiplier":{"type":"number","title":"Multiplier"}},"type":"object","required":["period_year","period_month","tier_name","referral_count","multiplier"],"title":"TierHistoryItem"},"TimeseriesData":{"properties":{"points":{"items":{"$ref":"#/components/schemas/TimeseriesPoint"},"type":"array","title":"Points","default":[]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"TimeseriesData"},"TimeseriesPoint":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"cumulative_pnl":{"type":"number","title":"Cumulative Pnl","default":0.0},"trade_count":{"type":"integer","title":"Trade Count","default":0},"win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate"}},"type":"object","required":["period_start"],"title":"TimeseriesPoint"},"TimezoneDistributionItem":{"properties":{"timezone":{"type":"string","title":"Timezone"},"count":{"type":"integer","title":"Count","default":0},"pct":{"type":"number","title":"Pct","default":0.0}},"type":"object","required":["timezone"],"title":"TimezoneDistributionItem"},"ToggleAutoRenewRequest":{"properties":{"auto_renew":{"type":"boolean","title":"Auto Renew"}},"type":"object","required":["auto_renew"],"title":"ToggleAutoRenewRequest"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","refresh_token","token_type","expires_in"],"title":"Token"},"TokenOtp":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"},"is_new_user":{"type":"boolean","title":"Is New User","default":false},"custom_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Token"}},"type":"object","required":["access_token","refresh_token","token_type","expires_in"],"title":"TokenOtp"},"TopShopInfo":{"properties":{"name":{"type":"string","title":"Name"},"subscribers":{"type":"integer","title":"Subscribers","default":0},"win_rate":{"type":"number","title":"Win Rate","default":0.0}},"type":"object","required":["name"],"title":"TopShopInfo"},"TopTraderByCoinRow":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"dominant_coin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dominant Coin"},"setup_count":{"type":"integer","title":"Setup Count","default":0},"total_earned_usd":{"type":"number","title":"Total Earned Usd","default":0.0},"referral_usd":{"type":"number","title":"Referral Usd","default":0.0},"pool_usd":{"type":"number","title":"Pool Usd","default":0.0}},"type":"object","required":["trader_id"],"title":"TopTraderByCoinRow"},"TopTradersByCoinOut":{"properties":{"attribution":{"type":"string","title":"Attribution","default":"coin is each trader's dominant traded coin from their setups, not a per-coin earning split (no earning table links to a setup/coin)"},"data":{"items":{"$ref":"#/components/schemas/TopTraderByCoinRow"},"type":"array","title":"Data","default":[]}},"type":"object","title":"TopTradersByCoinOut"},"TopicSendRequest":{"properties":{"topic":{"type":"string","title":"Topic"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"badge":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Badge"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Data"},"notification_type":{"type":"integer","title":"Notification Type","default":0}},"type":"object","required":["topic","title","body"],"title":"TopicSendRequest","description":"Send a single push notification to all devices subscribed to a topic.\n\niOS-specific: `subtitle` (APNs alert.subtitle) and `badge` (rozet sayisi).\nThese are honored on Apple devices and ignored on Android."},"TopicSendResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"fcm_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fcm Message Id"},"notification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Id"}},"type":"object","title":"TopicSendResponse"},"TopicSubscriptionRequest":{"properties":{"topic":{"type":"string","title":"Topic"},"tokens":{"items":{"type":"string"},"type":"array","maxItems":1000,"minItems":1,"title":"Tokens"}},"type":"object","required":["topic","tokens"],"title":"TopicSubscriptionRequest","description":"Subscribe or unsubscribe up to 1000 FCM tokens to/from a topic.\n\n1000 is the Firebase Admin SDK hard limit per call."},"TopicSubscriptionResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"success_count":{"type":"integer","title":"Success Count","default":0},"failure_count":{"type":"integer","title":"Failure Count","default":0},"errors":{"items":{"type":"object"},"type":"array","title":"Errors","default":[]},"notification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Id"}},"type":"object","title":"TopicSubscriptionResponse"},"TradeBotSetupCreate":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trace_id":{"type":"string","format":"uuid","title":"Trace Id"},"category":{"type":"string","title":"Category","default":"futures"},"order_type":{"type":"string","title":"Order Type","default":"market"},"coin_name":{"type":"string","title":"Coin Name"},"position":{"type":"string","title":"Position"},"entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value"},"entry_value_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value End"},"stop_value":{"type":"number","title":"Stop Value"},"profit_taking_1":{"type":"number","title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"profit_taking_amount_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 1","default":100},"profit_taking_amount_2":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 2"},"profit_taking_amount_3":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profit Taking Amount 3"},"r_value":{"type":"number","title":"R Value","default":1.0},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"is_hidden":{"type":"boolean","title":"Is Hidden","default":true}},"type":"object","required":["trader_id","trace_id","coin_name","position","stop_value","profit_taking_1"],"title":"TradeBotSetupCreate","description":"Setup creation schema for trade-bot."},"TradeBotSetupResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trace Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"order_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Type"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"entry_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value"},"entry_value_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entry Value End"},"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"r_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"R Value"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"activation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activation Date"},"close_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Close Price"},"close_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Close Date"},"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"}},"type":"object","required":["id","trader_id"],"title":"TradeBotSetupResponse","description":"Setup response returned to trade-bot."},"TradeBotSetupUpdate":{"properties":{"trace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trace Id"},"stop_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stop Value"},"profit_taking_1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 1"},"profit_taking_2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 2"},"profit_taking_3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit Taking 3"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"TradeBotSetupUpdate","description":"Setup update schema (e.g., move SL to BE)."},"TraderApplicationCreate":{"properties":{"message":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Message"}},"type":"object","title":"TraderApplicationCreate"},"TraderApplicationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"status":{"type":"string","title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"reviewed_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Note"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Image"}},"type":"object","required":["id","user_id","status"],"title":"TraderApplicationOut"},"TraderApplicationReview":{"properties":{"review_note":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Review Note"}},"type":"object","title":"TraderApplicationReview"},"TraderCompareItem":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"metrics":{"$ref":"#/components/schemas/SummaryMetrics"}},"type":"object","required":["trader_id","metrics"],"title":"TraderCompareItem"},"TraderEarningItem":{"properties":{"source":{"type":"string","title":"Source"},"amount_usd":{"type":"number","title":"Amount Usd"},"amount_credits":{"type":"number","title":"Amount Credits"},"payout_multiplier":{"type":"number","title":"Payout Multiplier"},"trader_earn_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trader Earn Date"},"paid_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Date"},"is_paid":{"type":"boolean","title":"Is Paid"},"cancellation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancellation Date"},"is_cancelled":{"type":"boolean","title":"Is Cancelled"},"is_trial":{"type":"boolean","title":"Is Trial"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"expire_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Date"},"is_expired":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Expired"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"credit_tx_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Credit Tx Id"}},"type":"object","required":["source","amount_usd","amount_credits","payout_multiplier","is_paid","is_cancelled","is_trial"],"title":"TraderEarningItem"},"TraderEarningSummary":{"properties":{"referral_total_usd":{"type":"number","title":"Referral Total Usd"},"referral_paid_usd":{"type":"number","title":"Referral Paid Usd"},"referral_pending_usd":{"type":"number","title":"Referral Pending Usd"},"referral_cancelled_usd":{"type":"number","title":"Referral Cancelled Usd"},"referral_trial_count":{"type":"integer","title":"Referral Trial Count"},"referral_paid_credits":{"type":"number","title":"Referral Paid Credits"},"pool_total_usd":{"type":"number","title":"Pool Total Usd"},"pool_paid_usd":{"type":"number","title":"Pool Paid Usd"},"pool_pending_usd":{"type":"number","title":"Pool Pending Usd"},"pool_paid_credits":{"type":"number","title":"Pool Paid Credits"},"total_paid_credits":{"type":"number","title":"Total Paid Credits"}},"type":"object","required":["referral_total_usd","referral_paid_usd","referral_pending_usd","referral_cancelled_usd","referral_trial_count","referral_paid_credits","pool_total_usd","pool_paid_usd","pool_pending_usd","pool_paid_credits","total_paid_credits"],"title":"TraderEarningSummary"},"TraderFilter":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"ids":{"anyOf":[{"items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}]},"type":"array"},{"type":"null"}],"title":"Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"incoming":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Incoming"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"followed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Followed"},"unfollowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unfollowed"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"}},"type":"object","title":"TraderFilter"},"TraderInfo":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate"},"monthly_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Roi"},"monthly_r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly R"},"is_algo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Algo","default":false},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"},"followers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers"},"is_following":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Following"},"is_notifying":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notifying","default":false},"is_blocked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Blocked"},"is_trending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trending"},"incoming":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Incoming"},"in_team":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Team"},"stats":{"anyOf":[{"$ref":"#/components/schemas/TraderStats"},{"type":"null"}]},"shop":{"anyOf":[{"$ref":"#/components/schemas/ShopInfo"},{"type":"null"}]},"algo_risk_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Algo Risk Profile"}},"type":"object","title":"TraderInfo"},"TraderInvitation":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"installments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installments"},"installment":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Installment"},"trader_earn_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trader Earn Date"},"paid_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid Date"},"is_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Paid"},"cancellation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancellation Date"},"is_cancelled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cancelled"},"withdrawal_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Withdrawal Date"},"is_withdrawal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Withdrawal"},"is_trial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trial"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"}},"type":"object","title":"TraderInvitation"},"TraderInvitationList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderInvitation"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"TraderInvitationList"},"TraderInvitationSummary":{"properties":{"total_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Amount"},"total_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total User"}},"type":"object","title":"TraderInvitationSummary"},"TraderLookup":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"}},"type":"object","title":"TraderLookup"},"TraderLookupList":{"properties":{"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"draw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draw"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderLookup"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"TraderLookupList"},"TraderMe":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_membership_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Membership Completed"},"is_email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Email Verified"},"is_change_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Change Password"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"suspension_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension Start Date"},"copy_trade_market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Trade Market","deprecated":true},"copy_trade_market_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Trade Market Uid","deprecated":true},"copy_trade_connected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Trade Connected","deprecated":true},"copy_trade_paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Trade Paused","deprecated":true},"can_copy_trade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Copy Trade","deprecated":true},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"},"followers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers"},"profile":{"anyOf":[{"$ref":"#/components/schemas/TraderProfile"},{"type":"null"}]},"suspension":{"anyOf":[{"$ref":"#/components/schemas/TraderSuspension"},{"type":"null"}]}},"type":"object","title":"TraderMe"},"TraderPerformancePoint":{"properties":{"period_start":{"type":"string","format":"date","title":"Period Start"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl"},"roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roi"},"winrate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Winrate"},"cumulative_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cumulative Pnl"},"total":{"type":"integer","title":"Total","default":0},"wins":{"type":"integer","title":"Wins","default":0}},"type":"object","required":["period_start"],"title":"TraderPerformancePoint"},"TraderPerformanceTimeSeriesResponse":{"properties":{"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"mode":{"type":"string","title":"Mode","default":"net"},"fill_gaps":{"type":"boolean","title":"Fill Gaps","default":true},"weekly":{"items":{"$ref":"#/components/schemas/TraderPerformancePoint"},"type":"array","title":"Weekly","default":[]},"monthly":{"items":{"$ref":"#/components/schemas/TraderPerformancePoint"},"type":"array","title":"Monthly","default":[]}},"type":"object","required":["trader_id"],"title":"TraderPerformanceTimeSeriesResponse"},"TraderProfile":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"cover_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraderProfileLinkResponse"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"TraderProfile"},"TraderProfileDetail":{"properties":{"trader":{"$ref":"#/components/schemas/TraderInfo"},"profile":{"anyOf":[{"$ref":"#/components/schemas/TraderProfile"},{"type":"null"}]}},"type":"object","required":["trader"],"title":"TraderProfileDetail"},"TraderProfileLink":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","value"],"title":"TraderProfileLink"},"TraderProfileLinkResponse":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"}},"type":"object","required":["name","value"],"title":"TraderProfileLinkResponse"},"TraderScoreOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trader_id":{"type":"string","title":"Trader Id"},"profile":{"type":"string","title":"Profile"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"confidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Level"},"membership_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membership State"},"is_index_member":{"type":"boolean","title":"Is Index Member"},"eligibility_status":{"type":"string","title":"Eligibility Status"},"calculated_at":{"type":"string","format":"date-time","title":"Calculated At"}},"type":"object","required":["id","trader_id","profile","is_index_member","eligibility_status","calculated_at"],"title":"TraderScoreOut","description":"One trader's score/membership snapshot within a single score run."},"TraderSocialScoreOut":{"properties":{"trader_id":{"type":"string","title":"Trader Id"},"period_key":{"type":"string","title":"Period Key"},"social_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Social Rank"},"trader_count":{"type":"integer","title":"Trader Count","default":0},"total_social_score":{"type":"integer","title":"Total Social Score","default":0},"is_finalized":{"type":"boolean","title":"Is Finalized","default":false},"breakdown":{"$ref":"#/components/schemas/ScoreBreakdown"},"metrics":{"$ref":"#/components/schemas/ScoreMetrics"},"platform_breakdown":{"items":{"$ref":"#/components/schemas/PlatformBreakdownItem"},"type":"array","title":"Platform Breakdown"}},"type":"object","required":["trader_id","period_key"],"title":"TraderSocialScoreOut"},"TraderSsoCode":{"properties":{"code":{"type":"string","title":"Code"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["code","expires_in"],"title":"TraderSsoCode"},"TraderSsoRedeem":{"properties":{"code":{"type":"string","maxLength":128,"minLength":8,"title":"Code"}},"type":"object","required":["code"],"title":"TraderSsoRedeem"},"TraderStats":{"properties":{"rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate"},"monthly_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Roi"},"monthly_r":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly R"},"win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Rate"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl"},"pnl_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl Rate"},"monthly_win_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Win Rate"},"monthly_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Pnl"},"monthly_pnl_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Pnl Rate"},"weekly_pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weekly Pnl"},"risk_score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Score"}},"type":"object","title":"TraderStats"},"TraderSuspension":{"properties":{"suspension_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension Start Date"},"suspension_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension End Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"rule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"}},"type":"object","title":"TraderSuspension"},"TraderSuspensionListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trader_id":{"type":"string","format":"uuid","title":"Trader Id"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"trader_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Email"},"trader_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Image"},"suspension_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension Start Date"},"suspension_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension End Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"rule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"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"}},"type":"object","required":["id","trader_id"],"title":"TraderSuspensionListItem"},"TraderTierResponse":{"properties":{"tier_name":{"type":"string","title":"Tier Name"},"multiplier":{"type":"number","title":"Multiplier"},"referral_count":{"type":"integer","title":"Referral Count"},"period_year":{"type":"integer","title":"Period Year"},"period_month":{"type":"integer","title":"Period Month"},"next_tier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Tier Name"},"next_tier_min_referrals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Tier Min Referrals"},"next_tier_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Next Tier Multiplier"},"referrals_needed":{"type":"integer","title":"Referrals Needed","default":0},"history":{"items":{"$ref":"#/components/schemas/TierHistoryItem"},"type":"array","title":"History","default":[]}},"type":"object","required":["tier_name","multiplier","referral_count","period_year","period_month"],"title":"TraderTierResponse"},"TraderUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","title":"TraderUpdate"},"TraderVoucherCreateRequest":{"properties":{"shop_id":{"type":"string","format":"uuid","title":"Shop Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"$ref":"#/components/schemas/VoucherType"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"max_uses_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses Per User","default":1},"membership_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Days"},"membership_duration_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Months"},"discount_type":{"anyOf":[{"$ref":"#/components/schemas/VoucherDiscountType"},{"type":"null"}]},"discount_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Value"},"trial_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Duration Days"},"trial_cooldown_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Cooldown Days","default":21},"trial_max_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Max Per User","default":2},"code_length":{"type":"integer","maximum":32.0,"minimum":6.0,"title":"Code Length","default":10},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"}},"type":"object","required":["shop_id","type"],"title":"TraderVoucherCreateRequest"},"TransactionDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"type":{"type":"string","title":"Type"},"amount_credits":{"type":"number","title":"Amount Credits"},"amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Usd"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"anomaly_flag":{"type":"boolean","title":"Anomaly Flag","default":false},"source":{"type":"string","title":"Source"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"receipt_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Number"},"store_purchase":{"anyOf":[{"$ref":"#/components/schemas/TransactionStorePurchase"},{"type":"null"}]}},"type":"object","required":["id","created_at","type","amount_credits","source"],"title":"TransactionDetailResponse","description":"One transaction as structured data — `GET /credits/transactions/{id}`\n(CME-03, D-87-10).\n\nThe first seven fields repeat `TxItem`'s names **verbatim**, and that\nrepetition is deliberate rather than lazy: the list and the detail are two\nprojections of the same `CreditTransaction` row, so identical names make a\nfield added to one obviously missing from the other. Renaming anything\nhere without renaming it in `TxItem` breaks that property.\n\n`source` / `source_id` are the two fields D-87-10 adds on top of the list\nprojection. `receipt_number` is the number of an **already existing**\nreceipt and is `None` until one has been generated — this read never mints\none (D-87-11). The HTML and PDF receipt routes remain the export and\nsharing path, and they are what create a receipt on demand.\n\n**No `model_config` here, and that is deliberate — not an omission.**\nThis model is built by explicit keyword construction in the route, never\nby `model_validate(orm_row)`, so `from_attributes` would buy nothing.\nThe rule: `AppBaseModel` (apps/schemas.py:7) is deliberately bare and\nnever carries `from_attributes`; a schema that *does* call\n`model_validate` on a SQLAlchemy row must declare\n`model_config = ConfigDict(from_attributes=True)` on **itself**, or it\nraises a 500 at the serialization boundary that stays latent while the\ntable is empty. `CreditPackageItem` (schemas.py:379-412) is the in-file\nexample of exactly that case. If this model is ever switched to\n`model_validate(row)`, the config becomes mandatory in the same edit."},"TransactionStorePurchase":{"properties":{"store":{"type":"string","title":"Store"},"product_id":{"type":"string","title":"Product Id"},"package_id":{"type":"string","format":"uuid","title":"Package Id"},"credits_granted":{"type":"number","title":"Credits Granted"}},"type":"object","required":["store","product_id","package_id","credits_granted"],"title":"TransactionStorePurchase","description":"Store attribution for a transaction granted by an in-app purchase.\n\nPresent only when the transaction's `source_id` resolves to a Phase 86\n`CreditPurchase` row; `None` for every other transaction (Stripe, voucher,\nreferral, admin adjustment). A null here means \"not a store purchase\", not\n\"unknown\".\n\nDeliberately narrow: the store, what was bought, and how much credit it\ngranted. The purchase row also holds the raw store transaction id, the\nenvironment and the verified store payload — none of which a client needs\nand all of which are better left off a user-facing read.\n\nNo `model_config` — see `TransactionDetailResponse`'s docstring."},"TransferPayload":{"properties":{"amount_usd":{"type":"number","title":"Amount Usd"}},"type":"object","required":["amount_usd"],"title":"TransferPayload"},"TranslateRequest":{"properties":{"text":{"type":"string","maxLength":5000,"minLength":1,"title":"Text"},"target":{"type":"string","maxLength":10,"minLength":2,"title":"Target"},"source":{"anyOf":[{"type":"string","maxLength":10,"minLength":2},{"type":"null"}],"title":"Source"}},"type":"object","required":["text","target"],"title":"TranslateRequest","description":"Request body for POST /ai/assistant/translate (D-14).\n\ntext max_length=5000 matches Google v2 per-request character limit and\ncaps per-call cost amplification (T-5-06).\ntarget is required (BCP-47 code); source is optional (omit for auto-detect)."},"TxItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"type":{"type":"string","title":"Type"},"amount_credits":{"type":"number","title":"Amount Credits"},"amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Usd"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"anomaly_flag":{"type":"boolean","title":"Anomaly Flag","default":false}},"type":"object","required":["id","created_at","type","amount_credits"],"title":"TxItem"},"TypesEnum":{"type":"string","enum":["spot","long","short"],"title":"TypesEnum"},"UnrealisedMarkEntryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"instrument":{"type":"string","title":"Instrument"},"position_side":{"type":"string","title":"Position Side"},"unrealised_value":{"type":"string","title":"Unrealised Value"},"staleness":{"type":"string","enum":["fresh","stale_connection","stale_age"],"title":"Staleness"},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"connection_session_id":{"type":"string","format":"uuid","title":"Connection Session Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"additionalProperties":false,"type":"object","required":["id","instrument","position_side","unrealised_value","staleness","occurred_at","connection_session_id"],"title":"UnrealisedMarkEntryOut","description":"`GET /copy_trade/me/account/unrealised` — one last-known unrealised\nvalue per (connection session, instrument, position side) scope\n(D-80.1-14 / FIN-05).\n\n**`unrealised_value` and `staleness` are BOTH required fields with NO\ndefault.** This is the structural half of \"the label travels with the\nvalue\": Pydantic refuses to construct this model with one present and\nthe other absent, so a caller cannot receive an amount without its\nstaleness label by hitting a different code path, a partial response,\nor a dict that skipped a key — construction itself is the guard.\n\n`staleness` is a CLOSED `Literal[...]` carrying its contract descriptor\n(A-H-04). It shipped as a plain `str` \"for consistency with the sibling\nDTO\" — the one field whose import was always safe was matched DOWN to the\none that was not, so a fourth staleness outcome would have reached the\nwire with no manifest entry, no digest movement and no console-side\nsignal. Both DTOs are typed now; the consistency argument survives, in\nthe right direction.\n\nEmits NO aggregate of any kind — no total, no net, no per-instrument\nsubtotal. Archived connections' marks ARE returned (retaining and\nlabelling them, as stale, is the requirement)."},"UpdateReviewRequest":{"properties":{"rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Rating"},"content":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Content"}},"type":"object","title":"UpdateReviewRequest"},"User":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"id":{"type":"string","format":"uuid","title":"Id"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deleted"},"is_change_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Change Password"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"}},"type":"object","title":"User","example":{"email":"john.doe@mymail.me","name":"John Doe","phone":"905001234567"}},"UserAdminUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"hashed_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hashed Password"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deleted"},"is_approved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Approved"},"is_email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Email Verified"},"is_membership_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Membership Completed"},"referral_code_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code Id"}},"type":"object","title":"UserAdminUpdate"},"UserAnalyticsDashboard":{"properties":{"growth":{"$ref":"#/components/schemas/UserGrowthStats","default":{"total_users":0,"total_traders":0,"total_customers":0,"total_admins":0,"new_users_period":0,"churned_users_period":0,"net_growth":0,"dau":0,"wau":0,"mau":0,"stickiness":0.0}},"roles":{"$ref":"#/components/schemas/RoleDistribution","default":{"customers":0,"traders":0,"admins":0,"regular":0,"customer_pct":0.0,"trader_pct":0.0,"admin_pct":0.0,"regular_pct":0.0}},"funnel":{"$ref":"#/components/schemas/UserFunnel","default":{"registered":0,"email_verified":0,"membership_completed":0,"first_follow":0,"first_subscription":0,"email_verified_rate":0.0,"membership_completed_rate":0.0,"first_follow_rate":0.0,"first_subscription_rate":0.0}},"engagement":{"$ref":"#/components/schemas/EngagementStats","default":{"avg_sessions_per_user":0.0,"device_breakdown":[]}},"retention":{"$ref":"#/components/schemas/RetentionStats","default":{"retention_7d":0.0,"retention_30d":0.0,"retention_90d":0.0}},"acquisition":{"$ref":"#/components/schemas/AcquisitionStats","default":{"referral_users":0,"organic_users":0,"referral_pct":0.0}},"language_distribution":{"items":{"$ref":"#/components/schemas/LanguageDistributionItem"},"type":"array","title":"Language Distribution","default":[]},"timezone_distribution":{"items":{"$ref":"#/components/schemas/TimezoneDistributionItem"},"type":"array","title":"Timezone Distribution","default":[]}},"type":"object","title":"UserAnalyticsDashboard"},"UserCreate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","default":"en"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","default":"UTC"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"}},"type":"object","title":"UserCreate"},"UserDeviceInfo":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"os_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Name"},"os_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Version"},"app_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Version"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deleted"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"has_push_token":{"type":"boolean","title":"Has Push Token","default":false},"registration_token_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Token Preview"},"push_eligible":{"type":"boolean","title":"Push Eligible","default":false}},"type":"object","title":"UserDeviceInfo","description":"One session row, seen through the push-delivery lens (admin only).\n\nDeliberately NOT `apps.auth.schemas.SessionInfo`, which the user's own\n`/auth/sessions` returns: that schema has no push fields and should not\ngrow any. This one exists to answer a question only an operator asks —\n\"why is this person receiving four copies of everything\" — and the answer\nis the number of live rows carrying a registration token.\n\n`registration_token_preview` is the first twelve characters. Enough to line\na device up against the token column in the delivery table, useless for\nsending a push, so the surface answers the question without handing out a\nworking credential."},"UserFilter":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_approved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Approved"},"is_email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Email Verified"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"}},"type":"object","title":"UserFilter"},"UserFunnel":{"properties":{"registered":{"type":"integer","title":"Registered","default":0},"email_verified":{"type":"integer","title":"Email Verified","default":0},"membership_completed":{"type":"integer","title":"Membership Completed","default":0},"first_follow":{"type":"integer","title":"First Follow","default":0},"first_subscription":{"type":"integer","title":"First Subscription","default":0},"email_verified_rate":{"type":"number","title":"Email Verified Rate","default":0.0},"membership_completed_rate":{"type":"number","title":"Membership Completed Rate","default":0.0},"first_follow_rate":{"type":"number","title":"First Follow Rate","default":0.0},"first_subscription_rate":{"type":"number","title":"First Subscription Rate","default":0.0}},"type":"object","title":"UserFunnel"},"UserGrowthStats":{"properties":{"total_users":{"type":"integer","title":"Total Users","default":0},"total_traders":{"type":"integer","title":"Total Traders","default":0},"total_customers":{"type":"integer","title":"Total Customers","default":0},"total_admins":{"type":"integer","title":"Total Admins","default":0},"new_users_period":{"type":"integer","title":"New Users Period","default":0},"churned_users_period":{"type":"integer","title":"Churned Users Period","default":0},"net_growth":{"type":"integer","title":"Net Growth","default":0},"dau":{"type":"integer","title":"Dau","default":0},"wau":{"type":"integer","title":"Wau","default":0},"mau":{"type":"integer","title":"Mau","default":0},"stickiness":{"type":"number","title":"Stickiness","default":0.0}},"type":"object","title":"UserGrowthStats"},"UserGrowthTrendPoint":{"properties":{"date":{"type":"string","title":"Date"},"new_users":{"type":"integer","title":"New Users","default":0},"churned_users":{"type":"integer","title":"Churned Users","default":0},"net_growth":{"type":"integer","title":"Net Growth","default":0},"cumulative_total":{"type":"integer","title":"Cumulative Total","default":0},"active_users":{"type":"integer","title":"Active Users","default":0}},"type":"object","required":["date"],"title":"UserGrowthTrendPoint"},"UserInDB":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"id":{"type":"string","format":"uuid","title":"Id"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deleted"},"is_change_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Change Password"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"},"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"}},"type":"object","title":"UserInDB","example":{"email":"john.doe@mymail.me","name":"John Doe","phone":"905001234567"}},"UserMe":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_membership_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Membership Completed"},"is_email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Email Verified"},"is_change_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Change Password"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"suspension_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension Start Date"},"copy_trade_market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Trade Market","deprecated":true},"copy_trade_market_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Trade Market Uid","deprecated":true},"copy_trade_connected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Trade Connected","deprecated":true},"copy_trade_paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Trade Paused","deprecated":true},"can_copy_trade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Copy Trade","deprecated":true},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"},"trader_referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Referral Code"},"followings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followings"},"followers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers"},"profile":{"anyOf":[{"$ref":"#/components/schemas/TraderProfile"},{"type":"null"}]},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionBase"},{"type":"null"}]},"copy_trade_state":{"anyOf":[{"$ref":"#/components/schemas/CopyTradeState"},{"type":"null"}]},"suspension":{"anyOf":[{"$ref":"#/components/schemas/TraderSuspension"},{"type":"null"}]},"can_create_setup":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Create Setup"},"practice_setups_remaining_today":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Practice Setups Remaining Today"},"practice_evaluation_interval_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Practice Evaluation Interval Seconds"},"practice_stop_wins_same_candle":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Practice Stop Wins Same Candle"}},"type":"object","title":"UserMe"},"UserMeBase":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_membership_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Membership Completed"},"is_email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Email Verified"},"is_change_password":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Change Password"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_trader":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trader"},"is_customer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Customer"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"suspension_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspension Start Date"},"copy_trade_market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Trade Market","deprecated":true},"copy_trade_market_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Trade Market Uid","deprecated":true},"copy_trade_connected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Trade Connected","deprecated":true},"copy_trade_paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Copy Trade Paused","deprecated":true},"can_copy_trade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Copy Trade","deprecated":true}},"type":"object","title":"UserMeBase"},"UserNotification":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"setup_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Setup Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"trader_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trader Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"type":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Type"},"is_read":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Read"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"updated_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated Column"},"column_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column Value"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"coin_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coin Name"},"order_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Type"},"trader_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Name"},"trader_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trader Image"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"}},"type":"object","title":"UserNotification"},"UserNotificationUpdate":{"properties":{"notification_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Notification Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"},"is_read":{"type":"boolean","title":"Is Read","default":true}},"type":"object","title":"UserNotificationUpdate"},"UserProfileUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_copy_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Copy Notify"},"is_notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify"},"is_notify_calendar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Notify Calendar"},"profile":{"anyOf":[{"$ref":"#/components/schemas/TraderProfile"},{"type":"null"}]}},"type":"object","title":"UserProfileUpdate"},"UserRegistrationToken":{"properties":{"registration_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Token"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},"type":"object","title":"UserRegistrationToken"},"UserSendRequest":{"properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"},"Id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Data"},"notification_type":{"type":"integer","title":"Notification Type","default":0}},"type":"object","required":["title","body"],"title":"UserSendRequest","description":"Send one push directly to a single user (no topic).\n\nThe caller may address the recipient two ways (at least one required):\n  * `userId` — the local DB user id (UUID); also accepts a Firebase uid\n    for backward compatibility.\n  * `Id` — the Firebase uid (the caller's DB already stores it, so it can\n    send both fields together as requested by ops)."},"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"},"ValveWriteIn":{"properties":{"scope":{"type":"string","enum":["event","channel","setup_path"],"title":"Scope"},"key":{"type":"string","maxLength":64,"minLength":1,"title":"Key"},"action":{"type":"string","enum":["enable","disable","clear"],"title":"Action"},"note":{"type":"string","maxLength":255,"minLength":1,"title":"Note"},"override":{"type":"boolean","title":"Override","default":false}},"type":"object","required":["scope","key","action","note"],"title":"ValveWriteIn"},"VerifyHistoryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"from_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Ts"},"to_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Ts"},"total_checked":{"type":"integer","title":"Total Checked","default":0},"is_valid":{"type":"boolean","title":"Is Valid","default":true},"tampered_count":{"type":"integer","title":"Tampered Count","default":0}},"type":"object","required":["id"],"title":"VerifyHistoryOut"},"VerifyRequest":{"properties":{"from_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Timestamp"},"to_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Timestamp"}},"type":"object","title":"VerifyRequest"},"VerifyResult":{"properties":{"is_valid":{"type":"boolean","title":"Is Valid"},"total_checked":{"type":"integer","title":"Total Checked","default":0},"tampered_events":{"items":{"$ref":"#/components/schemas/TamperedEvent"},"type":"array","title":"Tampered Events","default":[]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"}},"type":"object","required":["is_valid"],"title":"VerifyResult"},"VoucherApproveRequest":{"properties":{"min_commission_base":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Commission Base"}},"type":"object","title":"VoucherApproveRequest"},"VoucherCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"$ref":"#/components/schemas/VoucherType"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"status":{"$ref":"#/components/schemas/VoucherStatus","default":"active"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"max_uses_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses Per User","default":1},"membership_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Days"},"membership_duration_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Months"},"discount_type":{"anyOf":[{"$ref":"#/components/schemas/VoucherDiscountType"},{"type":"null"}]},"discount_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Value"},"credits_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Amount"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"new_users_only":{"type":"boolean","title":"New Users Only","default":false},"new_users_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Users Days"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"trial_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Duration Days"},"trial_cooldown_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Cooldown Days","default":21},"trial_max_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Max Per User","default":2}},"type":"object","required":["type"],"title":"VoucherCreateRequest"},"VoucherDiscountType":{"type":"string","enum":["percent","amount"],"title":"VoucherDiscountType"},"VoucherGenerateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"$ref":"#/components/schemas/VoucherType"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"status":{"$ref":"#/components/schemas/VoucherStatus","default":"active"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"max_uses_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses Per User","default":1},"membership_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Days"},"membership_duration_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Months"},"discount_type":{"anyOf":[{"$ref":"#/components/schemas/VoucherDiscountType"},{"type":"null"}]},"discount_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Value"},"credits_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Amount"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"new_users_only":{"type":"boolean","title":"New Users Only","default":false},"new_users_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Users Days"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"},"quantity":{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"code_length":{"type":"integer","maximum":32.0,"minimum":6.0,"title":"Code Length","default":10},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"trial_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Duration Days"},"trial_cooldown_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Cooldown Days","default":21},"trial_max_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Max Per User","default":2}},"type":"object","required":["type","quantity"],"title":"VoucherGenerateRequest"},"VoucherListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VoucherResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"VoucherListResponse"},"VoucherPreviewResponse":{"properties":{"code":{"type":"string","title":"Code"},"type":{"$ref":"#/components/schemas/VoucherType"},"status":{"$ref":"#/components/schemas/VoucherStatus"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"shop_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shop Name"},"shop_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shop Price"},"discount_type":{"anyOf":[{"$ref":"#/components/schemas/VoucherDiscountType"},{"type":"null"}]},"discount_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Value"},"membership_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Days"},"membership_duration_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Months"},"trial_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Duration Days"},"credits_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Amount"}},"type":"object","required":["code","type","status"],"title":"VoucherPreviewResponse","description":"Public-safe voucher info for redeem flow — no sensitive fields."},"VoucherRedeemRequest":{"properties":{"code":{"type":"string","title":"Code"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"}},"type":"object","required":["code"],"title":"VoucherRedeemRequest"},"VoucherRedemptionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VoucherRedemptionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"VoucherRedemptionListResponse"},"VoucherRedemptionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"voucher_id":{"type":"string","format":"uuid","title":"Voucher Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"redeemed_at":{"type":"string","format":"date-time","title":"Redeemed At"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"credit_tx_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Credit Tx Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"credits_added":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Added"},"original_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Price"},"final_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Final Price"},"discount_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Amount"},"discount_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Percent"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"},"commission_base":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Base"},"commission_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Rate"},"commission_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Amount"},"trader_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trader Revenue"},"user":{"anyOf":[{"$ref":"#/components/schemas/RedemptionUserInfo"},{"type":"null"}]}},"type":"object","required":["id","voucher_id","user_id","redeemed_at","status"],"title":"VoucherRedemptionResponse"},"VoucherRejectRequest":{"properties":{"reason":{"type":"string","maxLength":2048,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"VoucherRejectRequest"},"VoucherResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"$ref":"#/components/schemas/VoucherType"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"status":{"$ref":"#/components/schemas/VoucherStatus","default":"active"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"max_uses_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses Per User","default":1},"membership_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Days"},"membership_duration_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Duration Months"},"discount_type":{"anyOf":[{"$ref":"#/components/schemas/VoucherDiscountType"},{"type":"null"}]},"discount_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Value"},"credits_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Amount"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"new_users_only":{"type":"boolean","title":"New Users Only","default":false},"new_users_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Users Days"},"meta_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Meta Data"},"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"usage_count":{"type":"integer","title":"Usage Count"},"shop_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shop Id"},"created_by_trader":{"type":"boolean","title":"Created By Trader","default":false},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"reviewed_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"trial_duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Duration Days"},"trial_cooldown_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Cooldown Days"},"trial_max_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Max Per User"},"platform_commission_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Platform Commission Rate"},"min_commission_base":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Commission Base"},"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"}},"type":"object","required":["type","id","code","usage_count"],"title":"VoucherResponse"},"VoucherStatus":{"type":"string","enum":["draft","pending","active","rejected","paused","expired"],"title":"VoucherStatus"},"VoucherType":{"type":"string","enum":["credit","membership","shop_trial"],"title":"VoucherType"},"WalletExpiringSoon":{"properties":{"credits":{"type":"number","title":"Credits","default":0.0},"earliest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest At"}},"type":"object","title":"WalletExpiringSoon","description":"Credit expiring within the next 30 days, and when the first of it goes.\n\nThe key is `earliest_at`, NOT `expiring_soon_date`. This is a brand-new\nsurface with no legacy consumer, so it does not inherit the deprecated\nfield's misnomer — and the type is a real tz-aware `datetime` rather than\nthe offset-less ISO string that field carries (D-87-09).\n\nA null `earliest_at` with `credits == 0.0` means nothing is expiring, not\n\"unknown\".\n\nNo `model_config` — see `WalletSummaryResponse`'s docstring."},"WalletPendingWithdrawalItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"amount_credits":{"type":"number","title":"Amount Credits"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","amount_credits","status"],"title":"WalletPendingWithdrawalItem","description":"One outstanding cash-out request, as much of it as a wallet screen needs.\n\nExactly the four fields D-87-07 names. The full body — fees, method,\ndestination, review and completion timestamps, rejection reason — is one\nrequest away at `GET /credits/withdrawals/me/{withdrawal_id}`, and the\nfield names here are identical to the ones `_withdrawal_to_response` uses\nfor the same concepts so the short item and the full body cannot drift.\n\n`created_at` is `Optional` to match `WithdrawalResponse.created_at`\n(schemas.py:253), which has always been nullable. A required datetime here\nwould mean one NULL-dated row takes the ENTIRE wallet screen down with a\n500 rather than rendering oddly — the exact failure 87-02 pinned for\n`TxItem` and had to leave open because that schema is shared. This one is\nnew and unshared, so the trap is closed instead of recorded.\n\nNo `model_config` — see `WalletSummaryResponse`'s docstring."},"WalletSummaryResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"balance":{"type":"number","title":"Balance","default":0.0},"reserved":{"type":"number","title":"Reserved","default":0.0},"available":{"type":"number","title":"Available","default":0.0},"withdrawable":{"type":"number","title":"Withdrawable","default":0.0},"expiring_soon":{"$ref":"#/components/schemas/WalletExpiringSoon"},"pending_withdrawals":{"items":{"$ref":"#/components/schemas/WalletPendingWithdrawalItem"},"type":"array","title":"Pending Withdrawals","default":[]},"pending_withdrawals_count":{"type":"integer","title":"Pending Withdrawals Count","default":0}},"type":"object","required":["user_id","expiring_soon"],"title":"WalletSummaryResponse","description":"The whole wallet screen in one request — `GET /credits/wallet/me`\n(CME-02, D-87-07).\n\nThe four money fields are NOT synonyms, and a client that treats them as\nsuch shows a user a number they cannot act on:\n\n- `balance` — everything the account holds.\n- `reserved` — held against in-flight operations; part of `balance`.\n- `available` — `balance - reserved`. What can be **spent**.\n- `withdrawable` — what can be **cashed out**. Comes from\n  `calculate_withdrawable_credits`, so Phase 84's withdrawable-origin\n  allowlist decides it: `WITHDRAWABLE_SOURCE_TYPES` excludes `buy`, which\n  makes this figure **smaller than `available`** for any user holding\n  purchased credits (D-87-08). Surfacing it here is deliberate — this is\n  the one response a wallet screen renders from, so it is where a user\n  learns their purchased credits are not cashable, instead of finding out\n  when a withdrawal is refused.\n\n`pending_withdrawals` is CAPPED (see the route); `pending_withdrawals_count`\nis the full filtered count, so a client can tell the list is truncated and\nlink to `GET /credits/withdrawals/me` for the rest.\n\n**No `model_config` here, and that is deliberate — not an omission.**\nAll three wallet models are built by explicit keyword construction in the\nroute, from dicts, floats and row attributes, never by\n`model_validate(orm_row)`, so `from_attributes` would buy nothing. The\nrule: `AppBaseModel` (apps/schemas.py:7) is deliberately bare and never\ncarries `from_attributes`; a schema that *does* call `model_validate` on a\nSQLAlchemy row must declare `model_config = ConfigDict(from_attributes=True)`\non **itself**, or it raises a 500 at the serialization boundary that stays\nlatent while the table is empty. `CreditPackageItem` (schemas.py:379-412)\nis the in-file example of exactly that case."},"WebQrInitResponse":{"properties":{"qr_id":{"type":"string","title":"Qr Id"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["qr_id","expires_in"],"title":"WebQrInitResponse"},"WebQrStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"expires_in":{"type":"integer","title":"Expires In"},"token":{"anyOf":[{"$ref":"#/components/schemas/TokenOtp"},{"type":"null"}]}},"type":"object","required":["status","expires_in"],"title":"WebQrStatusResponse"},"WebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"$ref":"#/components/schemas/WebhookEventEnum"},"type":"array","title":"Events"},"scope":{"$ref":"#/components/schemas/WebhookScopeEnum","default":"own"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["url","events"],"title":"WebhookCreate"},"WebhookCreatedOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"scope":{"type":"string","title":"Scope"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"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"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","url","events","scope","is_active","consecutive_failures","secret"],"title":"WebhookCreatedOut"},"WebhookEventEnum":{"type":"string","enum":["setup.created","setup.activated","setup.updated","setup.closed","setup.partial_closed","setup.succeeded","setup.stopped","setup.cancelled","copy_trade.state_changed","foxy.alert"],"title":"WebhookEventEnum"},"WebhookOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"scope":{"type":"string","title":"Scope"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"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"}},"type":"object","required":["id","url","events","scope","is_active","consecutive_failures"],"title":"WebhookOut"},"WebhookScopeEnum":{"type":"string","enum":["own","subscribed_shops","followed_traders","purchased_setups"],"title":"WebhookScopeEnum"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/WebhookEventEnum"},"type":"array"},{"type":"null"}],"title":"Events"},"scope":{"anyOf":[{"$ref":"#/components/schemas/WebhookScopeEnum"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookUpdate"},"WithdrawRequest":{"properties":{"method":{"type":"string","title":"Method"},"amount_credits":{"type":"number","exclusiveMinimum":0.0,"title":"Amount Credits"},"wallet_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Wallet Id"},"bank_account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bank Account Id"}},"type":"object","required":["method","amount_credits"],"title":"WithdrawRequest"},"WithdrawalLimitsResponse":{"properties":{"daily_used":{"type":"number","title":"Daily Used"},"daily_limit":{"type":"number","title":"Daily Limit"},"daily_remaining":{"type":"number","title":"Daily Remaining"},"monthly_used":{"type":"number","title":"Monthly Used"},"monthly_limit":{"type":"number","title":"Monthly Limit"},"monthly_remaining":{"type":"number","title":"Monthly Remaining"},"min_withdrawal_usd":{"type":"number","title":"Min Withdrawal Usd"},"withdrawable_credits":{"type":"number","title":"Withdrawable Credits"}},"type":"object","required":["daily_used","daily_limit","daily_remaining","monthly_used","monthly_limit","monthly_remaining","min_withdrawal_usd","withdrawable_credits"],"title":"WithdrawalLimitsResponse"},"WithdrawalListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WithdrawalResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"WithdrawalListResponse"},"WithdrawalResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"method":{"type":"string","title":"Method"},"amount_credits":{"type":"number","title":"Amount Credits"},"amount_usd":{"type":"number","title":"Amount Usd"},"fee_credits":{"type":"number","title":"Fee Credits"},"fee_usd":{"type":"number","title":"Fee Usd"},"net_amount_usd":{"type":"number","title":"Net Amount Usd"},"status":{"type":"string","title":"Status"},"wallet_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Wallet Id"},"bank_account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bank Account Id"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash"},"bank_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Reference"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","user_id","method","amount_credits","amount_usd","fee_credits","fee_usd","net_amount_usd","status"],"title":"WithdrawalResponse"},"apps__analytics__trader__enums__PeriodEnum":{"type":"string","enum":["daily","weekly","monthly","yearly"],"title":"PeriodEnum"},"apps__analytics__trader__schemas__EarningsSummary":{"properties":{"referral_earnings_this_month":{"type":"number","title":"Referral Earnings This Month","default":0.0},"pool_earnings_this_month":{"type":"number","title":"Pool Earnings This Month","default":0.0},"pending_payouts":{"type":"number","title":"Pending Payouts","default":0.0},"total_lifetime_earnings":{"type":"number","title":"Total Lifetime Earnings","default":0.0},"payout_history":{"items":{"$ref":"#/components/schemas/PayoutHistoryItem"},"type":"array","title":"Payout History","default":[]}},"type":"object","title":"EarningsSummary"},"apps__copy_trade__schemas__PeriodEnum":{"type":"string","enum":["7d","30d","90d"],"title":"PeriodEnum","description":"Accepted period values for the period-funnel endpoint (D-10).\n\nFastAPI validates query params against this enum and returns 422 for\nany value not in {7d, 30d, 90d}."},"apps__market__schemas__EarningsSummary":{"properties":{"total_earnings":{"type":"number","title":"Total Earnings","default":0},"pending_earnings":{"type":"number","title":"Pending Earnings","default":0},"paid_earnings":{"type":"number","title":"Paid Earnings","default":0}},"type":"object","title":"EarningsSummary"}},"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please enter JWT with Bearer into field","in":"header","name":"Authorization"},"ApiKey":{"type":"apiKey","description":"API key for programmatic access","in":"header","name":"X-API-Key"}}}}