update endpoint
This commit is contained in:
parent
753f43f09a
commit
1c74005376
@ -4221,9 +4221,9 @@ async def get_statistics(data: TickerData, api_key: str = Security(get_api_key))
|
|||||||
headers={"Content-Encoding": "gzip"}
|
headers={"Content-Encoding": "gzip"}
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.get("/sector-flow")
|
@app.get("/market-flow")
|
||||||
async def get_sector_flow(api_key: str = Security(get_api_key)):
|
async def get_market_flow(api_key: str = Security(get_api_key)):
|
||||||
cache_key = f"sector-flow"
|
cache_key = f"market-flow"
|
||||||
cached_result = redis_client.get(cache_key)
|
cached_result = redis_client.get(cache_key)
|
||||||
if cached_result:
|
if cached_result:
|
||||||
return StreamingResponse(
|
return StreamingResponse(
|
||||||
@ -4233,7 +4233,7 @@ async def get_sector_flow(api_key: str = Security(get_api_key)):
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(f"json/sector-flow/data.json", 'rb') as file:
|
with open(f"json/market-flow/data.json", 'rb') as file:
|
||||||
res = orjson.loads(file.read())
|
res = orjson.loads(file.read())
|
||||||
except:
|
except:
|
||||||
res = {}
|
res = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user