Skip to main content

Get Purchases by Market ID

Get all external purchases for a specific market within a date range.

Endpoint: GET /api/v1/integration/external-purchases/markets/{market_id}

Authentication: Required (Bearer token)

Required Headers:

Authorization: Bearer <access_token>
X-Target-Server: integration

Path Parameters

ParameterTypeRequiredDescription
market_idstring (UUID)YesMarket ID

Query Parameters

ParameterTypeRequiredDescription
start_datestring (ISO 8601)YesStart date in ISO 8601 format (e.g., 2026-01-06T00:00:00Z)
end_datestring (ISO 8601)YesEnd date in ISO 8601 format (e.g., 2026-01-06T23:59:59Z)

Response

Status: 200 OK

Returns a paginated list of purchases for the market within the specified date range.

{
"purchases": [
{
"id": "695d2d10385e3d666a37185a",
"token_id": "26512436-045c-4c32-bd78-13b7dd9c24f3",
"market_id": "b25d4424-0c0c-48c2-9b05-c6c436073a6b",
"quantity": 1,
"price": 1313.662723,
"currency": {
"symbol": "TRY",
"decimal": 6,
"address": "0x32d55702aef0e031f9264f9bbb20b3f89ee57a95"
},
"buyer_address": "0xa112983907944387B64ba512daF256B3f28f93f5",
"seller_address": "",
"hash": "0x10890efafbf3375427a43a0713ec05a91da34c53ba3d0cf11fff9c5d606abcdf",
"created_at": "2026-01-06T22:35:02.789563Z"
}
],
"total": 1,
"page": 1,
"per_page": 1
}

Example cURL Request

curl --location 'http://localhost:3458/api/v1/integration/external-purchases/markets/b25d4424-0c0c-48c2-9b05-c6c436073a6b?start_date=2026-01-06T00%3A00%3A00Z&end_date=2026-01-06T23%3A59%3A59Z' \
--header 'X-Target-Server: integration' \
--header 'Authorization: Bearer <access_token>'