tradezero_api.enums

 1from __future__ import annotations
 2
 3from enum import Enum
 4
 5
 6class OrderType(str, Enum):
 7    """All the order-types available in the drop-down menu"""
 8    market = 'MKT'
 9    limit = 'LMT'
10    stop = 'Stop-MKT'
11    stop_limit = 'Stop-LMT'
12    market_on_close = 'MKT-Close'
13    limit_on_close = 'LMT-Close'
14    range = 'RANGE'
15
16
17class TIF(str, Enum):
18    """Time-in-force values"""
19    DAY = 'DAY'
20    GTC = 'GTC'
21    GTX = 'GTX'
22
23
24class Order(str, Enum):
25    """Order types"""
26    BUY = 'buy'
27    SELL = 'sell'
28    SHORT = 'short'
29    COVER = 'cover'
30
31
32class PortfolioTab(str, Enum):
33    """The ID for each """
34    open_positions = 'portfolio-tab-op-1'
35    closed_positions = 'portfolio-tab-cp-1'
36    active_orders = 'portfolio-tab-ao-1'
37    inactive_orders = 'portfolio-tab-io-1'
class OrderType(builtins.str, enum.Enum):
 7class OrderType(str, Enum):
 8    """All the order-types available in the drop-down menu"""
 9    market = 'MKT'
10    limit = 'LMT'
11    stop = 'Stop-MKT'
12    stop_limit = 'Stop-LMT'
13    market_on_close = 'MKT-Close'
14    limit_on_close = 'LMT-Close'
15    range = 'RANGE'

All the order-types available in the drop-down menu

market = <OrderType.market: 'MKT'>
limit = <OrderType.limit: 'LMT'>
stop = <OrderType.stop: 'Stop-MKT'>
stop_limit = <OrderType.stop_limit: 'Stop-LMT'>
market_on_close = <OrderType.market_on_close: 'MKT-Close'>
limit_on_close = <OrderType.limit_on_close: 'LMT-Close'>
range = <OrderType.range: 'RANGE'>
Inherited Members
enum.Enum
name
value
builtins.str
encode
replace
split
rsplit
join
capitalize
casefold
title
center
count
expandtabs
find
partition
index
ljust
lower
lstrip
rfind
rindex
rjust
rstrip
rpartition
splitlines
strip
swapcase
translate
upper
startswith
endswith
removeprefix
removesuffix
isascii
islower
isupper
istitle
isspace
isdecimal
isdigit
isnumeric
isalpha
isalnum
isidentifier
isprintable
zfill
format
format_map
maketrans
class TIF(builtins.str, enum.Enum):
18class TIF(str, Enum):
19    """Time-in-force values"""
20    DAY = 'DAY'
21    GTC = 'GTC'
22    GTX = 'GTX'

Time-in-force values

DAY = <TIF.DAY: 'DAY'>
GTC = <TIF.GTC: 'GTC'>
GTX = <TIF.GTX: 'GTX'>
Inherited Members
enum.Enum
name
value
builtins.str
encode
replace
split
rsplit
join
capitalize
casefold
title
center
count
expandtabs
find
partition
index
ljust
lower
lstrip
rfind
rindex
rjust
rstrip
rpartition
splitlines
strip
swapcase
translate
upper
startswith
endswith
removeprefix
removesuffix
isascii
islower
isupper
istitle
isspace
isdecimal
isdigit
isnumeric
isalpha
isalnum
isidentifier
isprintable
zfill
format
format_map
maketrans
class Order(builtins.str, enum.Enum):
25class Order(str, Enum):
26    """Order types"""
27    BUY = 'buy'
28    SELL = 'sell'
29    SHORT = 'short'
30    COVER = 'cover'

Order types

BUY = <Order.BUY: 'buy'>
SELL = <Order.SELL: 'sell'>
SHORT = <Order.SHORT: 'short'>
COVER = <Order.COVER: 'cover'>
Inherited Members
enum.Enum
name
value
builtins.str
encode
replace
split
rsplit
join
capitalize
casefold
title
center
count
expandtabs
find
partition
index
ljust
lower
lstrip
rfind
rindex
rjust
rstrip
rpartition
splitlines
strip
swapcase
translate
upper
startswith
endswith
removeprefix
removesuffix
isascii
islower
isupper
istitle
isspace
isdecimal
isdigit
isnumeric
isalpha
isalnum
isidentifier
isprintable
zfill
format
format_map
maketrans
class PortfolioTab(builtins.str, enum.Enum):
33class PortfolioTab(str, Enum):
34    """The ID for each """
35    open_positions = 'portfolio-tab-op-1'
36    closed_positions = 'portfolio-tab-cp-1'
37    active_orders = 'portfolio-tab-ao-1'
38    inactive_orders = 'portfolio-tab-io-1'

The ID for each

open_positions = <PortfolioTab.open_positions: 'portfolio-tab-op-1'>
closed_positions = <PortfolioTab.closed_positions: 'portfolio-tab-cp-1'>
active_orders = <PortfolioTab.active_orders: 'portfolio-tab-ao-1'>
inactive_orders = <PortfolioTab.inactive_orders: 'portfolio-tab-io-1'>
Inherited Members
enum.Enum
name
value
builtins.str
encode
replace
split
rsplit
join
capitalize
casefold
title
center
count
expandtabs
find
partition
index
ljust
lower
lstrip
rfind
rindex
rjust
rstrip
rpartition
splitlines
strip
swapcase
translate
upper
startswith
endswith
removeprefix
removesuffix
isascii
islower
isupper
istitle
isspace
isdecimal
isdigit
isnumeric
isalpha
isalnum
isidentifier
isprintable
zfill
format
format_map
maketrans