Module pytrading212.constants
General Constants
Expand source code
"""General Constants"""
from enum import Enum
URL_LOGIN = "https://www.trading212.com/en/login"
CLASS_COOKIES_NOTICE_BUTTON = "CookiesNotice_button__q5YaL"
CLASS_LOGIN_BUTTON = "SubmitButton_input__IV2dl"
CLASS_EQUITY_ICON = "equity-icon"
CLASS_CFD_ICON = "cfd-icon"
class Mode(Enum):
"""Mode Type"""
DEMO = "demo",
LIVE = "live"
class Trading(Enum):
"""Trading Type"""
CFD = "CFD",
EQUITY = "EQUITY",
class Period(Enum):
"""Period of Portfolio Performance"""
LAST_DAY = "LAST_DAY",
LAST_WEEK = "LAST_WEEK",
LAST_MONTH = "LAST_MONTH",
LAST_THREE_MONTHS = "LAST_THREE_MONTHS",
LAST_YEAR = "LAST_YEAR",
ALL = "ALL",
class OrderType(Enum):
"""Order Type"""
LIMIT = "LIMIT"
STOP = "STOP"
MARKET = "MARKET"
STOP_LIMIT = "STOP_LIMIT"
class TimeValidity(Enum):
"""Time Validity for Limit/Stop Orders"""
DAY = "DAY",
GOOD_TILL_CANCEL = "GOOD_TILL_CANCEL"
Classes
class Mode (*args, **kwds)
-
Mode Type
Expand source code
class Mode(Enum): """Mode Type""" DEMO = "demo", LIVE = "live"
Ancestors
- enum.Enum
Class variables
var DEMO
var LIVE
class OrderType (*args, **kwds)
-
Order Type
Expand source code
class OrderType(Enum): """Order Type""" LIMIT = "LIMIT" STOP = "STOP" MARKET = "MARKET" STOP_LIMIT = "STOP_LIMIT"
Ancestors
- enum.Enum
Class variables
var LIMIT
var MARKET
var STOP
var STOP_LIMIT
class Period (*args, **kwds)
-
Period of Portfolio Performance
Expand source code
class Period(Enum): """Period of Portfolio Performance""" LAST_DAY = "LAST_DAY", LAST_WEEK = "LAST_WEEK", LAST_MONTH = "LAST_MONTH", LAST_THREE_MONTHS = "LAST_THREE_MONTHS", LAST_YEAR = "LAST_YEAR", ALL = "ALL",
Ancestors
- enum.Enum
Class variables
var ALL
var LAST_DAY
var LAST_MONTH
var LAST_THREE_MONTHS
var LAST_WEEK
var LAST_YEAR
class TimeValidity (*args, **kwds)
-
Time Validity for Limit/Stop Orders
Expand source code
class TimeValidity(Enum): """Time Validity for Limit/Stop Orders""" DAY = "DAY", GOOD_TILL_CANCEL = "GOOD_TILL_CANCEL"
Ancestors
- enum.Enum
Class variables
var DAY
var GOOD_TILL_CANCEL
class Trading (*args, **kwds)
-
Trading Type
Expand source code
class Trading(Enum): """Trading Type""" CFD = "CFD", EQUITY = "EQUITY",
Ancestors
- enum.Enum
Class variables
var CFD
var EQUITY