Begin implementing MEXC
This commit is contained in:
parent
761b084704
commit
4079207a05
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
from core.lib.schemas import alpaca_s, drakdoo_s, oanda_s # noqa
|
||||
from core.lib.schemas import alpaca_s, drakdoo_s, oanda_s, mexc_s # noqa
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
from pydantic import BaseModel, Field
|
|
@ -176,11 +176,13 @@ class Account(models.Model):
|
|||
if client:
|
||||
response = client.get_instruments()
|
||||
supported_symbols = client.get_supported_assets(response)
|
||||
currency = client.get_account()["currency"]
|
||||
acct_info = client.get_account()
|
||||
log.debug(f"Supported symbols for {self.name}: {supported_symbols}")
|
||||
self.supported_symbols = supported_symbols
|
||||
self.instruments = response
|
||||
self.currency = currency
|
||||
if "currency" in acct_info.keys():
|
||||
currency = acct_info["currency"]
|
||||
self.currency = currency
|
||||
if save:
|
||||
self.save()
|
||||
|
||||
|
|
|
@ -311,7 +311,10 @@
|
|||
{% endif %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<a class="button" href="{% url 'logout' %}">Logout</a>
|
||||
<form method="POST" action="{% url 'logout' %}" style="display:inline;">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="button">Logout</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -30,7 +30,7 @@ class AccountInfo(LoginRequiredMixin, OTPRequiredMixin, ObjectRead):
|
|||
"sandbox",
|
||||
"supported_symbols",
|
||||
"initial_balance",
|
||||
"instruments",
|
||||
#"instruments",
|
||||
]
|
||||
|
||||
def get_object(self, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue