0max1
Home
  • Overview
    • Introduction
    • Our Solution
      • Quant AI Bot
        • Coin Future Funding Rate Farming
        • Spread Arbitrage
        • MEV Arbitrage
      • USDi Stablecoin
        • 1:1 Pegged to USD
        • Auto Income Distribution
      • 0max1 Token
    • Where to get USDi
  • Trust
    • Delta Neutral and Arbitrages
    • Transparency and Auditability:
      • Addresses
    • Human-error Free with AI Automation:
      • Data Source
      • Simulator
        • Definitions
        • Sample codes and details
      • Monitor
        • Process
        • Definitions
        • Sample codes and details.
  • API End Points
    • APIs for Funding ARB Analytics
Powered by GitBook
On this page
  1. Trust
  2. Human-error Free with AI Automation:
  3. Monitor

Process

Process:

1. Start

2. Set API Key
Retrieve the Binance API key from environment variables.

3. Fetch All Futures Symbols
Use get_futures_symbols() to get a list of all futures symbols available on   Binance.

4. For Each Symbol, Fetch Funding Rate History
Loop through each symbol.
Use get_funding_rate_history(symbol, 60) to fetch the last 60 days' worth of funding rate data for each symbol.

5. Data Processing and APR Calculation
For each dataset fetched:
Calculate 3-day, 7-day, and 30-day average funding rates.
Annualize these averages to get APRs by multiplying the average rates by 365 and converting to percentage.
Store these calculations in the DataFrame.

6. Optimize APR Score
For the funding rate data of each symbol, use optimize_apr_score(group) to compute the optimized APR score based on weighted averages of the 3-day, 7-day, 30-day, and the most recent funding rates.

7. Collect and Prepare Final Data
Compile all processed and optimized data into a final DataFrame.
Format and sort data based on optimized APR scores.

8. Output Results
Display the final DataFrame.
PreviousMonitorNextDefinitions

Last updated 9 months ago