Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

jeff47/binance_funding_fee_history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

binance_funding_fee_history

Get funding fee history information from Binance

This is a pretty simple python script designed to pull funding fee histories from Binance to aid in the creation of Spot-Arbitrage Bots on Pionex.

The information is available via the web at Binance. However, it is difficult to compare tokens side by side. Instead, this script pulls the history going back a determined amount and displays the average funding fee, the stdev (to give a sense of its variation), the low and high so you can see if it's gone negative, as well as the number of historical data points used.

Direct Link

If you don't want to run the script yourself, I try to keep a reasonably up-to-date spreadsheet on Google Sheets.

Requirements

  • Python 3
  • Pandas in additional to other standard libraries. Easily installed using pip if needed.

Usage

./funding_history.py

Options:

-d {optional} Days of history to fetch. Defaults to 7 days.
-s {optional} Weighting factor (span) for Exponentially Weighted Moving Average (EWMA). How much recent funding fees will outweigh old ones. Defaults to 9 funding periods.
-v {optional} Verbose. Will print out the symbols as it processes.

To-Do:

  • Add some measure of the variability of the token itself. This can be helpful to avoid tokens that come with higher risk of deleverage events, but I'm working on which stat to use still.

Thanks to:

xuefeng-huang for adding the calculations to the script, rather than depending on Google Sheets.

About

Get funding fee history information from Binance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages