Skip to content

Commit 19140e9

Browse files
committed
doc: fix funding fee doc sample
1 parent b0c3f2f commit 19140e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/strategy-customization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,9 +913,9 @@ Retrieves the current funding rate for the pair and only works for futures pairs
913913
``` python
914914
if self.dp.runmode.value in ('live', 'dry_run'):
915915
funding_rate = self.dp.funding_rate(metadata['pair'])
916-
dataframe.iloc[-1, 'current_funding_rate'] = funding_rate['fundingRate']
917-
dataframe.iloc[-1, 'next_funding_timestamp'] = funding_rate['fundingTimestamp']
918-
dataframe.iloc[-1, 'next_funding_datetime'] = funding_rate['fundingDatetime']
916+
dataframe['current_funding_rate'] = funding_rate['fundingRate']
917+
dataframe['next_funding_timestamp'] = funding_rate['fundingTimestamp']
918+
dataframe['next_funding_datetime'] = funding_rate['fundingDatetime']
919919
```
920920

921921
The funding rate structure is aligned with the funding rate structure from [ccxt](https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure), so the result will be formatted as follows:

0 commit comments

Comments
 (0)