Enums¶
Every enum is a StrEnum, so a member can be passed anywhere a plain string is
accepted and compares equal to its wire value. Raw strings from the API are kept
as-is when they are not a known member, so an unfamiliar value never raises.
enums
¶
String constants for bitFlyer API parameters and response fields.
Every member is a enum.StrEnum, so it can be passed anywhere a plain
str is accepted and compares equal to its literal value::
client.send_child_order(ProductCode.FX_BTC_JPY, ChildOrderType.MARKET, Side.BUY, 0.01)
client.get_health().status == HealthStatus.NORMAL
These are convenience constants, not validators. Request parameters and model
fields are typed str on purpose: bitFlyer adds and removes products and
introduces new state values without warning, and a closed enum would reject
valid values. Prefer the constants for the values you know, pass a string for
anything newer than this release.
ProductCode
¶
Bases: StrEnum
Market identifiers, as returned by GET /v1/getmarkets.
Side
¶
Bases: StrEnum
Order and execution direction.
ChildOrderType
¶
Bases: StrEnum
Order type for send_child_order.
TimeInForce
¶
OrderMethod
¶
Bases: StrEnum
Order method for send_parent_order.
ConditionType
¶
Bases: StrEnum
Trigger condition for a parent order parameter.
ChildOrderState
¶
Bases: StrEnum
Lifecycle state of a child order.
Note that ACTIVE, COMPLETED, CANCELED, EXPIRED and
REJECTED are also accepted as the child_order_state filter of
get_child_orders.
ParentOrderState
¶
Bases: StrEnum
Lifecycle state of a parent order.
ChildOrderEventType
¶
Bases: StrEnum
event_type of a ChildOrderEvent.
ParentOrderEventType
¶
Bases: StrEnum
event_type of a ParentOrderEvent.
TRIGGER
class-attribute
instance-attribute
¶
A condition fired and placed a child order.
HealthStatus
¶
Bases: StrEnum
Exchange health, as returned by GET /v1/gethealth.
MarketState
¶
Bases: StrEnum
Trading session state of a market.
Shared by the state field of both Ticker and
BoardState.