Show trades
This commit is contained in:
@@ -6,7 +6,7 @@ from core.clients.platform import LocalPlatformClient
|
||||
from core.lib.money import Money
|
||||
|
||||
|
||||
class AgoraClient(BaseClient, LocalPlatformClient):
|
||||
class AgoraClient(LocalPlatformClient, BaseClient):
|
||||
"""
|
||||
AgoraDesk API handler.
|
||||
"""
|
||||
|
||||
@@ -87,6 +87,7 @@ class AgoraDesk:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.post(api_call_url, **cast) as response_raw:
|
||||
response = await response_raw.json()
|
||||
status_code = response_raw.status
|
||||
|
||||
else:
|
||||
# response = httpx.get(url=api_call_url, headers=headers, params=query_values)
|
||||
@@ -95,12 +96,15 @@ class AgoraDesk:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(api_call_url, **cast) as response_raw:
|
||||
response = await response_raw.json()
|
||||
status_code = response_raw.status
|
||||
if response:
|
||||
print("YES RESPONSE", response)
|
||||
logger.debug(response)
|
||||
result["status"] = response.code
|
||||
if response.code == 200:
|
||||
result["status"] = status_code
|
||||
if status_code == 200:
|
||||
result["success"] = True
|
||||
result["message"] = "OK"
|
||||
result["response"] = response
|
||||
else:
|
||||
result["message"] = "API ERROR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user