# Get Last Trade Info

## Get Last Trade Info

<mark style="color:blue;">`GET`</mark> `https://api.swivel.exchange/v2/fills?underlying=u&maturity=m&protocol=p&depth=d`

This endpoint allows you to request the agreement most recently initiated in a given market. (The trade last made in a given market)\
\
Returns the parameters of the most recent agreement for the specified market.

#### Query Parameters

| Name                                         | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                       |
| -------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| underlying<mark style="color:red;">\*</mark> | string  | The underlying token being transacted. E.g. USDC, DAI, etc.,                                                                                                                                                                                                                                                                                                                                                                      |
| maturity<mark style="color:red;">\*</mark>   | string  | The maturity of market in unix seconds.                                                                                                                                                                                                                                                                                                                                                                                           |
| depth<mark style="color:red;">\*</mark>      | string  | Specify **1** for getting the last trade. If more depth is specified, the result will be a sorted list of last trades.                                                                                                                                                                                                                                                                                                            |
| protocol<mark style="color:red;">\*</mark>   | integer | <p>A pointer that refers to a given yield bearing market like Lido or Compound.</p><p></p><p>The protocol enum values:</p><p></p><p><code>enum Protocols {</code></p><p>  <code>Erc4626 = 0,</code> </p><p>  <code>Compound = 1,</code> </p><p>  <code>Rari = 2,</code> </p><p>  <code>Yearn = 3,</code> </p><p>  <code>Aave = 4,</code> </p><p>  <code>Euler = 5,</code> </p><p>  <code>Lido = 6</code></p><p><code>}</code></p> |

{% tabs %}
{% tab title="200 " %}

```
[
    {
        "key": "0xae3f59eabffcf1f15f384d5e582985d31a9aef4b181ecf56a0a37bab85013f1f",
        "price": "0.0799",
        "exit": false,
        "vault": false,
        "volume": "1.251564456e+20"
    }
]
```

{% endtab %}

{% tab title="400: Bad Request E.g. Invalid maturity" %}

```javascript
{
    "error": {
        "message": "invalid maturity"
    }
}
```

{% endtab %}
{% endtabs %}
