> For the complete documentation index, see [llms.txt](https://docs.0max1.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0max1.com/trust/human-error-free-with-ai-automation/monitor/process.md).

# Process

**Process:**&#x20;

```
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.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.0max1.com/trust/human-error-free-with-ai-automation/monitor/process.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
