# \[Deprecated] Trade Info API

## Get All market last trade

<mark style="color:blue;">`GET`</mark> `https://open-api.dexlab.space/v1/trades`

last closing price of the dex exchanges

{% tabs %}
{% tab title="200 All market last trade history" %}

```javascript
{
    "success": true,
    "data": [
        {
            "id": 228025,
            "price": "25.2990000000",
            "size": "200.0000000000",
            "market": "LINK/USDC",
            "side": "buy",
            "time": "2021-02-03T05:46:50.649Z",
            "orderId": "466721071808925348356986",
            "feeCost": "5.0598000000",
            "marketAddress": "7JCG9TsCx3AErSV3pvhxiW4AbkKRcJ6ZAveRmJwrgQ16",
            "createdAt": "2021-02-03T05:48:32.714Z"
        },
        {
            "id": 228104,
            "price": "1583.8500000000",
            "size": "5.0000000000",
            "market": "ETH/USDC",
            "side": "buy",
            "time": "2021-02-03T06:25:49.291Z",
            "orderId": "2921890474299298120430813",
            "feeCost": "11.0869500000",
            "marketAddress": "H5uzEytiByuXt964KampmuNCurNDwkVVypkym75J2DQW",
            "createdAt": "2021-02-03T06:26:47.278Z"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get market 24hour trades

<mark style="color:blue;">`GET`</mark> `https://open-api.dexlab.space/v1/trades/:address/24h`

24-hour transaction history inquiry of a specific market\
\
**Update history:**\
2021-08-06: Change api path **/all -> /24h**\
( I change the path because it is misleading. Existing /all is also preserved. )

#### Path Parameters

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| address | string |             |

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

```javascript
{
    "success": true,
    "data": [
        {
            "id": 228018,
            "price": "25.1630000000",
            "size": "304.0700000000",
            "market": "LINK/USDC",
            "side": "buy",
            "time": "2021-02-03T05:44:50.688Z",
            "orderId": "464212314614900849337471",
            "feeCost": "16.8328900000",
            "marketAddress": "7JCG9TsCx3AErSV3pvhxiW4AbkKRcJ6ZAveRmJwrgQ16",
            "createdAt": "2021-02-03T05:46:43.832Z"
        },
        {
            "id": 228019,
            "price": "25.1630000000",
            "size": "124.8100000000",
            "market": "LINK/USDC",
            "side": "buy",
            "time": "2021-02-03T05:45:00.921Z",
            "orderId": "464193867870827139785844",
            "feeCost": "6.9093070000",
            "marketAddress": "7JCG9TsCx3AErSV3pvhxiW4AbkKRcJ6ZAveRmJwrgQ16",
            "createdAt": "2021-02-03T05:46:44.018Z"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get market 24hour last trade

<mark style="color:blue;">`GET`</mark> `https://open-api.dexlab.space/v1/trades/:address/last`

Query last transaction information of a specific market

#### Path Parameters

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| address | string |             |

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

```javascript
{
    "success": true,
    "data": [
        {
            "id": 228025,
            "price": "25.2990000000",
            "size": "200.0000000000",
            "market": "LINK/USDC",
            "side": "buy",
            "time": "2021-02-03T05:46:50.649Z",
            "orderId": "466721071808925348356986",
            "feeCost": "5.0598000000",
            "marketAddress": "7JCG9TsCx3AErSV3pvhxiW4AbkKRcJ6ZAveRmJwrgQ16",
            "createdAt": "2021-02-03T05:48:32.714Z"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# 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.dexlab.space/api-documentation/rest-api/trade-api-1.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.
