oandapyV20.definitions.trades

class oandapyV20.definitions.trades.TradeState

Bases: object

Definition representation of TradeState

Definitions used in requests and responses. This class provides the ID and the description of the definitions.

>>> import oandapyV20.definitions.trades as deftrades
>>> print deftrades.TradeState.CLOSE_WHEN_TRADABLE
CLOSE_WHEN_TRADABLE
>>> c = deftrades.TradeState()
>>> print c[c.CLOSE_WHEN_TRADABLE]
The Trade will be closed as soon as the trade’s instrument becomes tradeable
CLOSED = 'CLOSED'
CLOSE_WHEN_TRADABLE = 'CLOSE_WHEN_TRADABLE'
OPEN = 'OPEN'
__getitem__(definitionID)

return description for definitionID.

definitions

readonly property holding definition dict.