Note: All issues other than enhancement requests will be closed without further comment if the above template is deleted or not filled out.
The bot buys accurately but has different value when selling.
```Ftx: Buying THETABULL/USD
Amount: 0.17013233
Open Rate: 1587.00000000
Current Rate: 1587.00000000
Total: (270.000000 USD, 270.000 USD)
Close message:
```Ftx: Selling THETABULL/USD
Amount: 0.17010000
Open Rate: 1616.00000000
Current Rate: 1750.00000000
Close Rate: 1750.00000000
Sell Reason: roi
Duration: 0:04:32 (4.5 min)
Profit: 8.17% (profit: 22.47683346 USD / 22.477 USD)
Note: Please copy/paste text of the messages, no screenshots of logs please.
2020-06-02 01:00:44,379 - freqtrade.freqtradebot - INFO - Executing Buy for THETABULL/USD
2020-06-02 01:00:44,379 - freqtrade.freqtradebot - INFO - Using Last Bid / Last Price
2020-06-02 01:00:44,668 - freqtrade.wallets - INFO - Wallets synced.
2020-06-02 01:00:44,671 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'type': buy, 'exchange': 'Ftx', 'pair': 'THETABULL/USD', 'limit': 1587.0, 'order_type': 'market', 'stake_amount': 270.0, 'stake_currency': 'USD', 'fiat_currency': 'USD', 'amount': 0.17013232514177692, 'open_date': datetime.datetime(2020, 6, 2, 1, 0, 44, 597306), 'current_rate': 1587.0}
2020-06-02 01:00:45,110 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=47, pair=THETABULL/USD, amount=0.17013233, open_rate=1587.00000000, open_since=2020-06-02 01:00:44)
2020-06-02 01:00:45,319 - freqtrade.wallets - INFO - Wallets synced.
2020-06-02 01:00:45,319 - freqtrade.freqtradebot - INFO - Fee amount for Trade(id=47, pair=THETABULL/USD, amount=0.17013233, open_rate=1587.00000000, open_since=2020-06-02 01:00:44) was in base currency - Eating Fee 9.404829e-05 into dust.
2020-06-02 01:00:45,319 - freqtrade.persistence - INFO - Updating trade (id=47) ...
2020-06-02 01:00:45,320 - freqtrade.persistence - INFO - MARKET_BUY has been fulfilled for Trade(id=47, pair=THETABULL/USD, amount=0.17010000, open_rate=1616.00000000, open_since=2020-06-02 01:00:44).
2020-06-02 01:01:00,070 - freqtrade.worker - INFO - Bot heartbeat. PID=82947, version='develop-003724e4', state='RUNNING'
2020-06-02 01:02:00,103 - freqtrade.worker - INFO - Bot heartbeat. PID=82947, version='develop-003724e4', state='RUNNING'
2020-06-02 01:03:00,139 - freqtrade.worker - INFO - Bot heartbeat. PID=82947, version='develop-003724e4', state='RUNNING'
2020-06-02 01:04:00,175 - freqtrade.worker - INFO - Bot heartbeat. PID=82947, version='develop-003724e4', state='RUNNING'
2020-06-02 01:05:00,215 - freqtrade.worker - INFO - Bot heartbeat. PID=82947, version='develop-003724e4', state='RUNNING'
2020-06-02 01:05:16,576 - freqtrade.freqtradebot - INFO - Executing Sell for THETABULL/USD. Reason: SellType.ROI
2020-06-02 01:05:16,685 - freqtrade.wallets - INFO - Wallets synced.
2020-06-02 01:05:16,821 - freqtrade.freqtradebot - INFO - Using cached sell rate for THETABULL/USD.
2020-06-02 01:05:16,822 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'type': sell, 'exchange': 'Ftx', 'pair': 'THETABULL/USD', 'gain': 'profit', 'limit': 1750.0, 'order_type': 'market', 'amount': 0.1701, 'open_rate': 1616.0, 'current_rate': 1750.0, 'profit_amount': 22.47683346, 'profit_ratio': 0.08172396, 'sell_reason': 'roi', 'open_date': datetime.datetime(2020, 6, 2, 1, 0, 44, 597306), 'close_date': datetime.datetime(2020, 6, 2, 1, 5, 16, 822253), 'stake_currency': 'USD', 'fiat_currency': 'USD'}
2020-06-02 01:05:17,263 - freqtrade.wallets - INFO - Wallets synced.
2020-06-02 01:05:20,286 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=47, pair=THETABULL/USD, amount=0.17010000, open_rate=1616.00000000, open_since=2020-06-02 01:00:44)
2020-06-02 01:05:20,398 - freqtrade.persistence - INFO - Updating trade (id=47) ...
2020-06-02 01:05:20,398 - freqtrade.persistence - INFO - Marking Trade(id=47, pair=THETABULL/USD, amount=0.17010000, open_rate=1616.00000000, open_since=closed) as closed as the trade is fulfilled and found no open orders for it.
2020-06-02 01:05:20,398 - freqtrade.persistence - INFO - MARKET_SELL has been fulfilled for Trade(id=47, pair=THETABULL/USD, amount=0.17010000, open_rate=1616.00000000, open_since=closed).
I think we need to be careful with wording - one thing is sending the notification (which is what we're talking about) - and one thing is "recording" - which is how it's in the database.
freqtrade sends the message when it places the sell order.
Depending on the API, the response to the order posting will contain the filled price (works for market orders on binance ...) - but may not work for FTX (did not test that yet).
If the filled price IS contained, then that price will be used for the notificat, otherwise the price used to post the order (which corresponds to "current_sell_rate" - as configured in "ask_stategy").
Anyhow - upon closing the order, the final price WILL be updated in the database, as you'll see.
please post the output of the following command:
freqtrade show-trades --db-url sqlite:///pathtoyourdb.sqlite --trade-ids 47 --print-json
Sorry,I forgot to post it. I verified on the database. Will post log tomorrow
You are correct. It seems i got confused, the closed rate actually matches! sorry for the inconvenience, will close.
Most helpful comment
Sorry,I forgot to post it. I verified on the database. Will post log tomorrow