Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend on downloading funding rate data #9

Open
River-Shi opened this issue May 19, 2024 · 0 comments
Open

Recommend on downloading funding rate data #9

River-Shi opened this issue May 19, 2024 · 0 comments

Comments

@River-Shi
Copy link

Hi, I think you can try using the pagination function provided by ccxt, bellow is the simple demo

import ccxt
import pandas as pd

EXCHANGE = 'binance'

CONFIG = {}

exchange = getattr(ccxt, EXCHANGE)(CONFIG)
markets = exchange.load_markets()

def get_fundings(exchange: ccxt.Exchange):
    fundings = exchange.fetch_funding_rate_history(symbol='BTC/USDT:USDT', params={"paginate": True}) 
    df = pd.DataFrame(fundings)
    print(df)

get_fundings(exchange)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant