Skip to content

Commit c1cd14c

Browse files
committed
Remove internal or useless attributes and unnecessary text
1 parent 565b343 commit c1cd14c

File tree

1 file changed

+0
-98
lines changed

1 file changed

+0
-98
lines changed

docs/trade-object.md

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,11 @@ The following attributes / properties are available for each individual trade -
1616
| `pair` | string | Pair of this trade. |
1717
| `base_currency` | string | Base currency of the trading pair. |
1818
| `stake_currency` | string | Stake/quote currency of the trading pair. |
19-
| `safe_base_currency` | string | Compatibility layer for base currency - falls back to pair split if empty. |
20-
| `safe_quote_currency` | string | Compatibility layer for quote currency - falls back to pair split if empty. |
2119
| `is_open` | boolean | Is the trade currently open, or has it been concluded. |
22-
| `exchange` | string | Exchange where this trade was executed. |
2320
| `open_rate` | float | Rate this trade was entered at (Avg. entry rate in case of trade-adjustments). |
24-
| `open_rate_requested` | float | The rate that was requested when the trade was opened. |
25-
| `open_trade_value` | float | Value of the open trade including fees. |
2621
| `close_rate` | float | Close rate - only set when is_open = False. |
27-
| `close_rate_requested` | float | The close rate that was requested. |
28-
| `safe_close_rate` | float | Close rate or close_rate_requested or 0.0 if neither is available. |
2922
| `stake_amount` | float | Amount in Stake (or Quote) currency. |
30-
| `max_stake_amount` | float | Maximum stake amount that was used in this trade (including DCA orders). |
3123
| `amount` | float | Amount in Asset / Base currency that is currently owned. Will be 0.0 until the initial order fills. |
32-
| `amount_requested` | float | Amount that was originally requested for this trade. |
3324
| `open_date` | datetime | Timestamp when trade was opened **use `open_date_utc` instead** |
3425
| `open_date_utc` | datetime | Timestamp when trade was opened - in UTC. |
3526
| `close_date` | datetime | Timestamp when trade was closed **use `close_date_utc` instead** |
@@ -38,17 +29,9 @@ The following attributes / properties are available for each individual trade -
3829
| `close_profit_abs` | float | Absolute profit (in stake currency) at the time of trade closure. |
3930
| `realized_profit` | float | Absolute already realized profit (in stake currency) while the trade is still open. |
4031
| `leverage` | float | Leverage used for this trade - defaults to 1.0 in spot markets. |
41-
| `has_no_leverage` | boolean | Returns true if this is a non-leverage, non-short trade. |
42-
| `borrowed` | float | The amount of currency borrowed from the exchange for leverage trades. |
4332
| `enter_tag` | string | Tag provided on entry via the `enter_tag` column in the dataframe. |
44-
| `buy_tag` | string | **Deprecated** - use `enter_tag` instead. |
4533
| `exit_reason` | string | Reason why the trade was exited. |
46-
| `sell_reason` | string | **Deprecated** - use `exit_reason` instead. |
47-
| `exit_order_status` | string | Status of the exit order. |
48-
| `strategy` | string | Strategy name that was used for this trade. |
49-
| `timeframe` | int | Timeframe used for this trade. |
5034
| `is_short` | boolean | True for short trades, False otherwise. |
51-
| `trading_mode` | TradingMode | Trading mode (SPOT, MARGIN, FUTURES). |
5235
| `orders` | Order[] | List of order objects attached to this trade (includes both filled and cancelled orders). |
5336
| `date_last_filled_utc` | datetime | Time of the last filled order. |
5437
| `date_entry_fill_utc` | datetime | Date of the first filled entry order. |
@@ -57,72 +40,18 @@ The following attributes / properties are available for each individual trade -
5740
| `trade_direction` | "long" / "short" | Trade direction in text - long or short. |
5841
| `nr_of_successful_entries` | int | Number of successful (filled) entry orders. |
5942
| `nr_of_successful_exits` | int | Number of successful (filled) exit orders. |
60-
| `nr_of_successful_buys` | int | **Deprecated** - use `nr_of_successful_entries` for short support. |
61-
| `nr_of_successful_sells` | int | **Deprecated** - use `nr_of_successful_exits` for short support. |
6243
| `has_open_orders` | boolean | Has the trade open orders (excluding stoploss orders). |
63-
| `has_open_position` | boolean | True if there is an open position for this trade. |
64-
| `has_open_sl_orders` | boolean | True if there are open stoploss orders for this trade. |
6544
| `open_orders` | Order[] | All open orders for this trade excluding stoploss orders. |
66-
| `open_sl_orders` | Order[] | All open stoploss orders for this trade. |
67-
| `sl_orders` | Order[] | All stoploss orders for this trade (open and closed). |
68-
| `open_orders_ids` | string[] | List of open order IDs (excluding stoploss orders). |
69-
70-
### Fee related attributes
71-
72-
| Attribute | DataType | Description |
73-
|------------|-------------|-------------|
74-
| `fee_open` | float | Fee rate that was paid for opening the trade. |
75-
| `fee_open_cost` | float | Absolute fee cost that was paid for opening the trade. |
76-
| `fee_open_currency` | string | Currency the open fee was paid in. |
77-
| `fee_close` | float | Fee rate that was paid for closing the trade. |
78-
| `fee_close_cost` | float | Absolute fee cost that was paid for closing the trade. |
79-
| `fee_close_currency` | string | Currency the close fee was paid in. |
80-
81-
### Stop Loss related attributes
82-
83-
| Attribute | DataType | Description |
84-
|------------|-------------|-------------|
8545
| `stop_loss` | float | Absolute value of the stop loss. |
8646
| `stop_loss_pct` | float | Percentage value of the stop loss. |
8747
| `initial_stop_loss` | float | Absolute value of the initial stop loss. |
8848
| `initial_stop_loss_pct` | float | Percentage value of the initial stop loss. |
8949
| `is_stop_loss_trailing` | boolean | True if the stop loss is trailing. |
9050
| `stoploss_last_update_utc` | datetime | Timestamp of the last stoploss update. |
9151
| `stoploss_or_liquidation` | float | Returns the more restrictive of stoploss or liquidation price. |
92-
93-
### Price tracking attributes
94-
95-
| Attribute | DataType | Description |
96-
|------------|-------------|-------------|
9752
| `max_rate` | float | Highest price reached during this trade. |
9853
| `min_rate` | float | Lowest price reached during this trade. |
9954

100-
### Futures/Margin trading attributes
101-
102-
| Attribute | DataType | Description |
103-
|------------|-------------|-------------|
104-
| `liquidation_price` | float | Liquidation price for leveraged trades. |
105-
| `interest_rate` | float | Interest rate for margin trades. |
106-
| `funding_fees` | float | Total funding fees for futures trades. |
107-
| `funding_fee_running` | float | Running funding fees between last filled order and now. |
108-
109-
### Precision attributes
110-
111-
| Attribute | DataType | Description |
112-
|------------|-------------|-------------|
113-
| `amount_precision` | float | Amount precision for the pair. |
114-
| `price_precision` | float | Price precision for the pair. |
115-
| `precision_mode` | int | Precision mode for amounts. |
116-
| `precision_mode_price` | int | Precision mode for prices. |
117-
| `contract_size` | float | Contract size for futures trading. |
118-
119-
### Trade counters (for canceled orders)
120-
121-
| Attribute | DataType | Description |
122-
|------------|-------------|-------------|
123-
| `fully_canceled_entry_order_count` | int | Number of fully canceled entry orders. |
124-
| `canceled_exit_order_count` | int | Number of canceled exit orders. |
125-
12655
## Class methods
12756

12857
The following are class methods - which return generic information, and usually result in an explicit query against the database.
@@ -205,17 +134,6 @@ Sample return value: ETH/BTC had 5 trades, with a total profit of 1.5% (ratio of
205134
{"pair": "ETH/BTC", "profit": 0.015, "count": 5}
206135
```
207136

208-
### stoploss_reinitialization
209-
210-
Adjust initial Stoploss to desired stoploss for all open trades.
211-
212-
``` python
213-
from freqtrade.persistence import Trade
214-
215-
# ...
216-
Trade.stoploss_reinitialization(desired_stoploss=-0.1)
217-
```
218-
219137
### get_enter_tag_performance
220138

221139
Returns performance grouped by enter_tag.
@@ -284,35 +202,19 @@ Most properties here can be None as they are dependent on the exchange response.
284202
| Attribute | DataType | Description |
285203
|------------|-------------|-------------|
286204
| `trade` | Trade | Trade object this order is attached to |
287-
| `ft_trade_id` | int | ID of the trade this order belongs to |
288205
| `ft_pair` | string | Pair this order is for |
289206
| `ft_is_open` | boolean | is the order still open? |
290-
| `ft_amount` | float | Amount in base currency (freqtrade's internal amount) |
291-
| `ft_price` | float | Price the order was placed at (freqtrade's internal price) |
292-
| `ft_order_side` | string | Order side ('buy', 'sell', or 'stoploss') |
293-
| `ft_cancel_reason` | string | Reason why the order was canceled |
294-
| `ft_order_tag` | string | Custom order tag |
295-
| `ft_fee_base` | float | Fee paid in base currency |
296-
| `order_id` | string | Exchange order ID |
297207
| `order_type` | string | Order type as defined on the exchange - usually market, limit or stoploss |
298208
| `status` | string | Status as defined by [ccxt's order structure](https://docs.ccxt.com/#/README?id=order-structure). Usually open, closed, expired, canceled or rejected |
299-
| `symbol` | string | Symbol/pair as defined by the exchange |
300209
| `side` | string | buy or sell |
301210
| `price` | float | Price the order was placed at |
302211
| `average` | float | Average price the order filled at |
303212
| `amount` | float | Amount in base currency |
304213
| `filled` | float | Filled amount (in base currency) (use `safe_filled` instead) |
305214
| `safe_filled` | float | Filled amount (in base currency) - guaranteed to not be None |
306-
| `safe_amount` | float | Amount - falls back to ft_amount if None |
307-
| `safe_price` | float | Price - falls back through average, price, stop_price, ft_price |
308-
| `safe_placement_price` | float | Price at which the order was placed |
309215
| `remaining` | float | Remaining amount (use `safe_remaining` instead) |
310216
| `safe_remaining` | float | Remaining amount - either taken from the exchange or calculated. |
311-
| `safe_cost` | float | Cost of the order - guaranteed to not be None |
312-
| `safe_fee_base` | float | Fee in base currency - guaranteed to not be None |
313-
| `safe_amount_after_fee` | float | Amount after deducting fees |
314217
| `cost` | float | Cost of the order - usually average * filled (*Exchange dependent on futures, may contain the cost with or without leverage and may be in contracts.*) |
315-
| `stop_price` | float | Stop price for stop orders |
316218
| `stake_amount` | float | Stake amount used for this order. *Added in 2023.7.* |
317219
| `stake_amount_filled` | float | Filled Stake amount used for this order. *Added in 2024.11.* |
318220
| `order_date` | datetime | Order creation date **use `order_date_utc` instead** |

0 commit comments

Comments
 (0)