> For the complete documentation index, see [llms.txt](https://docs.dexlab.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexlab.space/api-documentation/rest-api/trade-api-1.md).

# \[Deprecated] Trade Info API

Dex trade history 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
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dexlab.space/api-documentation/rest-api/trade-api-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
