> For the complete documentation index, see [llms.txt](https://dexible.gitbook.io/dexible-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexible.gitbook.io/dexible-sdk/reporting/summary-reports.md).

# Summary Reports

The SDK can be used to generate order summary reports. The API is pretty simple:

```
const rows = await sdk.reports.getSummary({
    chainId: 1, 
    start: new Date(Date.now()-86400000), 
    end: new Date()
});
```

The chainId reflects swap requests placed on a particular chain. The start and end dates are simply javascript Date objects. The rows returned is an array of arrays where the first array contains the header fields. Here is an example:

```
 [
  [
    'order_id',
    'status',
    'txn_hash',
    'date_time',
    'wallet',
    'token_in_symbol',
    'token_in_spot_usd',
    'token_in_amount',
    'token_out_symbol',
    'token_out_spot_usd',
    'token_out_amount',
    'fee_token_symbol',
    'fee_token_spot_usd',
    'gas_fee_amount',
    'dexible_fee_amount'
  ],
  [
    63,
    'COMPLETED',
    '0x420c2b24a9ca5a7c01cd7f892d40ae0b13e5ca415a09733d9dc38280c8b997f8',
    '2021-12-09T18:35:58.000Z',
    '0x165eb78ce7a9a5ff1842b7b0e67b027ae6299775',
    'DAI',
    0,
    2388.49236,
    'WETH',
    0,
    9.646563937096968,
    'WETH',
    0,
    0.110737049,
    0.003363969483991109
  ]
]
```

These fields can be used to reformat into csv or any other output as needed.


---

# 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://dexible.gitbook.io/dexible-sdk/reporting/summary-reports.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.
