> For the complete documentation index, see [llms.txt](https://docs.optswap.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optswap.org/user-manual/meta-oracle/fetching-price-data.md).

# Fetching Price Data

TODO -- the meta oracle provides various types of prices and aggregations which should be carefully considered and chosen for your particular use case

TODO -- Warning: Be very careful while using the Average aggregation with TWAPDuration = 1 (instantaneous spot price) as manipulating the spot price will also skew the average. Median should still be OK to use though, as long as you're also including at least twice as many sufficiently long enough TWAPDurations!

{% hint style="danger" %}
Be careful while using TWAPs in isolation and without aggregation with low time durations; as short term TWAPS can be easily manipulated by bad actors!
{% endhint %}

### **Spot Price**

TODO

### **Settlement Price**

TODO

### **Multiple Prices**

TODO

### **Aggregated Price**

TODO

### **Safety Considerations**

in general, it's better to use an aggregation. e.g. use MAX of spot & recent LTWAPs (60 sec - 60+ mins) while selling calls, but MIN while buying calls; vice-versa for puts -- such that it's "favorable to the party involved". MEDIAN is also a good choice, generally speaking.&#x20;


---

# 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:

```
GET https://docs.optswap.org/user-manual/meta-oracle/fetching-price-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
