Show trades

This commit is contained in:
2023-03-10 00:23:05 +00:00
parent 1e7d8f6c8d
commit fa7ea66c65
12 changed files with 236 additions and 16 deletions

View File

@@ -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.
"""

View File

@@ -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"