Add documentation for leverage_tiers update
This commit is contained in:
parent
963cc17c18
commit
97abcf4b32
@ -314,6 +314,32 @@ The output will show the last entry from the Exchange as well as the current UTC
|
|||||||
If the day shows the same day, then the last candle can be assumed as incomplete and should be dropped (leave the setting `"ohlcv_partial_candle"` from the exchange-class untouched / True). Otherwise, set `"ohlcv_partial_candle"` to `False` to not drop Candles (shown in the example above).
|
If the day shows the same day, then the last candle can be assumed as incomplete and should be dropped (leave the setting `"ohlcv_partial_candle"` from the exchange-class untouched / True). Otherwise, set `"ohlcv_partial_candle"` to `False` to not drop Candles (shown in the example above).
|
||||||
Another way is to run this command multiple times in a row and observe if the volume is changing (while the date remains the same).
|
Another way is to run this command multiple times in a row and observe if the volume is changing (while the date remains the same).
|
||||||
|
|
||||||
|
### Update binance cached leverage tiers
|
||||||
|
|
||||||
|
Updating leveraged tiers should be done regularly - and requires an authenticated account with futures enabled.
|
||||||
|
|
||||||
|
``` python
|
||||||
|
import ccxt
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
exchange = ccxt.binance({
|
||||||
|
'apiKey': '<apikey>',
|
||||||
|
'secret': '<secret>'
|
||||||
|
'options': {'defaultType': 'future'}
|
||||||
|
})
|
||||||
|
_ = exchange.load_markets()
|
||||||
|
|
||||||
|
lev_tiers = exchange.fetch_leverage_tiers()
|
||||||
|
|
||||||
|
# Assumes this is running in the root of the repository.
|
||||||
|
file = Path('freqtrade/exchange/binance_leverage_tiers.json')
|
||||||
|
json.dump(lev_tiers, file.open('w'), indent=2)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This file should then be contributed upstream, so others can benefit from this, too.
|
||||||
|
|
||||||
## Updating example notebooks
|
## Updating example notebooks
|
||||||
|
|
||||||
To keep the jupyter notebooks aligned with the documentation, the following should be ran after updating a example notebook.
|
To keep the jupyter notebooks aligned with the documentation, the following should be ran after updating a example notebook.
|
||||||
|
@ -16907,4 +16907,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user