Fix bug in _Requests's _GET and _POST methods. Add submit_order to handle POST auth/w/order/submit endpoint. Add OrderType enumeration in bfxapi/rest/enums.py.

This commit is contained in:
Davide Casale
2022-12-21 18:27:54 +01:00
parent 6217f9040c
commit 79ae0b48e0
3 changed files with 37 additions and 7 deletions

View File

@@ -1,5 +1,21 @@
from enum import Enum
class OrderType(str, Enum):
LIMIT = "LIMIT"
EXCHANGE_LIMIT = "EXCHANGE LIMIT"
MARKET = "MARKET"
EXCHANGE_MARKET = "EXCHANGE MARKET"
STOP = "STOP"
EXCHANGE_STOP = "EXCHANGE STOP"
STOP_LIMIT = "STOP LIMIT"
EXCHANGE_STOP_LIMIT = "EXCHANGE STOP LIMIT"
TRAILING_STOP = "TRAILING STOP"
EXCHANGE_TRAILING_STOP = "EXCHANGE TRAILING STOP"
FOK = "FOK"
EXCHANGE_FOK = "EXCHANGE FOK"
IOC = "IOC"
EXCHANGE_IOC = "EXCHANGE IOC"
class Config(str, Enum):
MAP_CURRENCY_SYM = "pub:map:currency:sym"
MAP_CURRENCY_LABEL = "pub:map:currency:label"