# strategiesByPair()

{% code title="CarbonController.sol" overflow="wrap" lineNumbers="true" %}

```solidity
   function strategiesByPair(
        Token token0,
        Token token1,
        uint256 startIndex,
        uint256 endIndex
    ) external view returns (Strategy[] memory)
```

{% endcode %}

This function is used to obtain a list of strategies for the specified token pair.&#x20;

### **Function Arguments**

<table><thead><tr><th>Name</th><th width="138.66666666666663">Type</th><th>Description</th></tr></thead><tbody><tr><td>token0</td><td>Token</td><td>The address of the first token in the pair</td></tr><tr><td>token1</td><td>Token</td><td>The address of the second token in the pair</td></tr><tr><td>startIndex</td><td>uint256</td><td>Index of first strategy to view</td></tr><tr><td>endIndex</td><td>uint256</td><td>Index of last strategy to view</td></tr></tbody></table>

### Returns

This function returns a list of strategy objects containing details for strategies from the specified token pair.&#x20;

### Example

```
strategiesByPairl(
 0x514910771AF9Ca656af840dff83E8264EcF986CA, //token0
 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE, //token1
 0, //startIndex
 25, //endIndex
)

// returns
// [(Strategy), (Strategy), (Strategy)]

// struct Strategy {
//    uint256 id;
//    address owner;
//    Token[2] tokens;
//    Order[2] orders;
// }

// Order objects:
//        [
//            Order({
//                y: uint128,
//                z: uint128,
//                A: uint64,
//                B: uint64
//            }),
//            Order({
//                y: uint128),
//                z: uint128,
//                A: uint64,
//                B: uint64
//            })
//        ]
```


---

# Agent Instructions: 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.carbondefi.xyz/contracts-and-functions/carboncontroller-functions/read-functions/strategiesbypair.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.
