# Trades

Manage and view trading activity

## List marketplace trades

> Retrieves a list of trades in the marketplace.\
> Trades represent peer-to-peer exchanges between users, including offers and accepted deals.\
> \
> Results are ordered by creation date (most recent first).\
> \
> \*\*Note:\*\* This endpoint currently returns all trades without pagination support.<br>

```json
{"openapi":"3.1.0","info":{"title":"Decentraland Marketplace Server API","version":"1.0.0"},"tags":[{"name":"Trades","description":"Manage and view trading activity"}],"servers":[{"url":"https://marketplace-api.decentraland.org","description":"Production server"},{"url":"https://marketplace-api.decentraland.zone","description":"Development server"}],"security":[],"paths":{"/v1/trades":{"get":{"tags":["Trades"],"summary":"List marketplace trades","description":"Retrieves a list of trades in the marketplace.\nTrades represent peer-to-peer exchanges between users, including offers and accepted deals.\n\nResults are ordered by creation date (most recent first).\n\n**Note:** This endpoint currently returns all trades without pagination support.\n","operationId":"getTrades","responses":{"200":{"description":"List of trades","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Trade ID"},"buyer":{"type":"string","description":"Buyer address"},"seller":{"type":"string","description":"Seller address"},"item":{"type":"object","properties":{"id":{"type":"string","description":"Item ID"},"name":{"type":"string","description":"Item name"},"description":{"type":"string","description":"Item description"},"image":{"type":"string","description":"Item image URL"},"category":{"type":"string","description":"Item category"},"rarity":{"type":"string","description":"Item rarity"},"price":{"type":"number","description":"Item price"},"owner":{"type":"string","description":"Item owner"}},"required":["id","name","category"]},"price":{"type":"number","description":"Trade price"},"status":{"type":"string","enum":["pending","completed","cancelled"],"description":"Trade status"},"createdAt":{"type":"string","format":"date-time","description":"Trade creation timestamp"}},"required":["id","buyer","seller","price","status"]}}}}}}}}}}
```

## Create a new trade

> Creates a new trade offer in the marketplace.\
> \
> \*\*Authentication Required\*\*: This endpoint requires Decentraland authentication with signed metadata.\
> The authentication validates:\
> \- User identity via signed message (ADR-44l)\
> \- Authorized origins (dcl:marketplace or dcl:builder)\
> \- Metadata intent (dcl:create-trade)\
> \
> The trade will be validated against blockchain data and marketplace rules before creation.<br>

```json
{"openapi":"3.1.0","info":{"title":"Decentraland Marketplace Server API","version":"1.0.0"},"tags":[{"name":"Trades","description":"Manage and view trading activity"}],"servers":[{"url":"https://marketplace-api.decentraland.org","description":"Production server"},{"url":"https://marketplace-api.decentraland.zone","description":"Development server"}],"security":[{"SignedFetch":[]}],"components":{"securitySchemes":{"SignedFetch":{"type":"http","scheme":"bearer","description":"Signed fetch authentication using decentraland-crypto-middleware with metadata validation (ADR-44l). \nRequires auth chain headers (x-identity, x-signature, x-timestamp) for signature validation. \nSee http://adr.decentraland.org/adr/ADR-44l for details.\n"}}},"paths":{"/v1/trades":{"post":{"tags":["Trades"],"summary":"Create a new trade","description":"Creates a new trade offer in the marketplace.\n\n**Authentication Required**: This endpoint requires Decentraland authentication with signed metadata.\nThe authentication validates:\n- User identity via signed message (ADR-44l)\n- Authorized origins (dcl:marketplace or dcl:builder)\n- Metadata intent (dcl:create-trade)\n\nThe trade will be validated against blockchain data and marketplace rules before creation.\n","operationId":"createTrade","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string","description":"Item ID"},"price":{"type":"number","description":"Trade price"},"seller":{"type":"string","description":"Seller address"}},"required":["itemId","price","seller"]}}}},"responses":{"201":{"description":"Trade created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Trade ID"},"buyer":{"type":"string","description":"Buyer address"},"seller":{"type":"string","description":"Seller address"},"item":{"type":"object","properties":{"id":{"type":"string","description":"Item ID"},"name":{"type":"string","description":"Item name"},"description":{"type":"string","description":"Item description"},"image":{"type":"string","description":"Item image URL"},"category":{"type":"string","description":"Item category"},"rarity":{"type":"string","description":"Item rarity"},"price":{"type":"number","description":"Item price"},"owner":{"type":"string","description":"Item owner"}},"required":["id","name","category"]},"price":{"type":"number","description":"Trade price"},"status":{"type":"string","enum":["pending","completed","cancelled"],"description":"Trade status"},"createdAt":{"type":"string","format":"date-time","description":"Trade creation timestamp"}},"required":["id","buyer","seller","price","status"]}}}},"401":{"description":"Unauthorized - invalid signed fetch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}},"403":{"description":"Forbidden - invalid metadata","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}}}}}}}
```

## Get trade by ID

> Retrieves detailed information about a specific trade including:\
> \- Trade participants (buyer and seller)\
> \- Item details and metadata\
> \- Trade price and currency\
> \- Current status (pending, completed, or cancelled)\
> \- Timestamps (creation, updates, completion)<br>

```json
{"openapi":"3.1.0","info":{"title":"Decentraland Marketplace Server API","version":"1.0.0"},"tags":[{"name":"Trades","description":"Manage and view trading activity"}],"servers":[{"url":"https://marketplace-api.decentraland.org","description":"Production server"},{"url":"https://marketplace-api.decentraland.zone","description":"Development server"}],"security":[],"paths":{"/v1/trades/{id}":{"get":{"tags":["Trades"],"summary":"Get trade by ID","description":"Retrieves detailed information about a specific trade including:\n- Trade participants (buyer and seller)\n- Item details and metadata\n- Trade price and currency\n- Current status (pending, completed, or cancelled)\n- Timestamps (creation, updates, completion)\n","operationId":"getTrade","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Unique trade identifier"}],"responses":{"200":{"description":"Trade details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Trade ID"},"buyer":{"type":"string","description":"Buyer address"},"seller":{"type":"string","description":"Seller address"},"item":{"type":"object","properties":{"id":{"type":"string","description":"Item ID"},"name":{"type":"string","description":"Item name"},"description":{"type":"string","description":"Item description"},"image":{"type":"string","description":"Item image URL"},"category":{"type":"string","description":"Item category"},"rarity":{"type":"string","description":"Item rarity"},"price":{"type":"number","description":"Item price"},"owner":{"type":"string","description":"Item owner"}},"required":["id","name","category"]},"price":{"type":"number","description":"Trade price"},"status":{"type":"string","enum":["pending","completed","cancelled"],"description":"Trade status"},"createdAt":{"type":"string","format":"date-time","description":"Trade creation timestamp"}},"required":["id","buyer","seller","price","status"]}}}},"404":{"description":"Trade not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}}}}}}}
```

## Get trade acceptance event

> Retrieves information about a trade acceptance event using the hashed signature.\
> This endpoint is used to verify and track when a trade offer was accepted on-chain.\
> \
> The hashed signature serves as a unique identifier linking the off-chain trade\
> to its blockchain transaction acceptance event.<br>

```json
{"openapi":"3.1.0","info":{"title":"Decentraland Marketplace Server API","version":"1.0.0"},"tags":[{"name":"Trades","description":"Manage and view trading activity"}],"servers":[{"url":"https://marketplace-api.decentraland.org","description":"Production server"},{"url":"https://marketplace-api.decentraland.zone","description":"Development server"}],"security":[],"paths":{"/v1/trades/{hashedSignature}/accept":{"get":{"tags":["Trades"],"summary":"Get trade acceptance event","description":"Retrieves information about a trade acceptance event using the hashed signature.\nThis endpoint is used to verify and track when a trade offer was accepted on-chain.\n\nThe hashed signature serves as a unique identifier linking the off-chain trade\nto its blockchain transaction acceptance event.\n","operationId":"getTradeAcceptedEvent","parameters":[{"name":"hashedSignature","in":"path","required":true,"schema":{"type":"string"},"description":"Keccak-256 hashed signature of the trade acceptance transaction"}],"responses":{"200":{"description":"Trade accepted event","content":{"application/json":{"schema":{"type":"object","properties":{"tradeId":{"type":"string","description":"Trade ID"},"hashedSignature":{"type":"string","description":"Hashed signature"},"timestamp":{"type":"string","format":"date-time","description":"Event timestamp"}},"required":["tradeId","hashedSignature"]}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}}}}}}}
```
