{"openapi":"3.1.0","info":{"title":"Finance API","description":"Market data, FX rates, and account information.","contact":{"name":"API Support","email":"support@example.com"},"license":{"name":""},"version":"1.0.0"},"paths":{"/v1/accounts/{id}":{"get":{"tags":["accounts"],"operationId":"account","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"acc_01HXY..."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"bearer_auth":[]}]}},"/v1/auth/token":{"post":{"tags":["auth"],"operationId":"token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenReq"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResp"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/health":{"get":{"tags":["system"],"operationId":"health","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/markets":{"get":{"tags":["market"],"operationId":"markets","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Market"}}}}}}}},"/v1/quotes/{symbol}":{"get":{"tags":["market"],"operationId":"quote","parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string"},"example":"EURUSD"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/rates":{"get":{"tags":["market"],"operationId":"rates","parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string"},"example":"EUR"},{"name":"symbols","in":"query","required":false,"schema":{"type":"string"},"example":"USD,GBP,JPY"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatesResp"}}}},"502":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/status":{"get":{"tags":["system"],"operationId":"status","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResp"}}}}}}}},"components":{"schemas":{"Account":{"type":"object","required":["id","owner","currency","balance","available","status","created_at"],"properties":{"available":{"type":"number","format":"double"},"balance":{"type":"number","format":"double"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"id":{"type":"string"},"owner":{"type":"string"},"status":{"type":"string"}}},"ApiError":{"type":"object","required":["type","title","status","detail","request_id"],"properties":{"detail":{"type":"string"},"request_id":{"type":"string"},"status":{"type":"integer","format":"int32","minimum":0},"title":{"type":"string"},"type":{"type":"string"}}},"Health":{"type":"object","required":["status","service","version","timestamp"],"properties":{"service":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}},"Market":{"type":"object","required":["id","base","quote","tick_size","min_size","status"],"properties":{"base":{"type":"string"},"id":{"type":"string"},"min_size":{"type":"number","format":"double"},"quote":{"type":"string"},"status":{"type":"string"},"tick_size":{"type":"number","format":"double"}}},"Quote":{"type":"object","required":["symbol","bid","ask","last","volume_24h","change_24h_pct","timestamp"],"properties":{"ask":{"type":"number","format":"double"},"bid":{"type":"number","format":"double"},"change_24h_pct":{"type":"number","format":"double"},"last":{"type":"number","format":"double"},"symbol":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"volume_24h":{"type":"number","format":"double"}}},"RatesResp":{"type":"object","required":["base","date","rates","source"],"properties":{"base":{"type":"string"},"date":{"type":"string"},"rates":{"type":"object","additionalProperties":{"type":"number","format":"double"},"propertyNames":{"type":"string"}},"source":{"type":"string"}}},"StatusResp":{"type":"object","required":["status","service","version","uptime_seconds","timestamp"],"properties":{"service":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"uptime_seconds":{"type":"integer","format":"int64","minimum":0},"version":{"type":"string"}}},"TokenReq":{"type":"object","required":["grant_type","client_id","client_secret"],"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"grant_type":{"type":"string"}}},"TokenResp":{"type":"object","required":["access_token","token_type","expires_in","scope"],"properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64","minimum":0},"scope":{"type":"string"},"token_type":{"type":"string"}}}}},"tags":[{"name":"system","description":"Health & status"},{"name":"market","description":"Market data"},{"name":"auth","description":"Authentication"},{"name":"accounts","description":"Account information"}]}