tensortrade.trades.trade module¶
-
class
tensortrade.trades.trade.
Trade
(symbol, trade_type, amount, price)[source]¶ Bases:
object
A trade object for use within trading environments.
-
__init__
(symbol, trade_type, amount, price)[source]¶ - Parameters
symbol (
str
) – The exchange symbol of the instrument in the trade (AAPL, ETH/USD, NQ1!, etc).trade_type (TradeType) – The type of trade executed (0 = HOLD, 1=LIMIT_BUY, 2=MARKET_BUY, 3=LIMIT_SELL, 4=MARKET_SELL).
amount (
float
) – The amount of the instrument in the trade (shares, satoshis, contracts, etc).price (
float
) – The price paid per instrument in terms of the base instrument (e.g. 10000 represents $10,000.00 if the base_instrument is “USD”).
-
property
amount
¶ The amount of the instrument in the trade (shares, satoshis, contracts, etc).
- Return type
-
property
price
¶ The price paid per instrument in terms of the base instrument (e.g. 10000 represents $10,000.00 if the base_instrument is “USD”).
- Return type
-
property
symbol
¶ The exchange symbol of the instrument in the trade (AAPL, ETH/USD, NQ1!, etc).
- Return type
-