> For the complete documentation index, see [llms.txt](https://docs.21x.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.21x.eu/api-reference-v1.0/trade.md).

# Trade

## getWalletTrades

> Fetches all completed trades involving the wallet, optionally restricted to one trading pair.<br>

```json
{"openapi":"3.1.0","info":{"title":"EDX Public API Model","version":"1.0.0"},"tags":[{"name":"Trade"}],"servers":[{"url":"/api/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"cursor":{"name":"cursor","description":"Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous response.\n","in":"query","required":false,"schema":{"type":"string"}},"limit":{"name":"limit","description":"The maximum number of items to return.\n","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},"count":{"name":"count","description":"Returns the total number of items in the collection.\n","in":"query","required":false,"schema":{"type":"boolean"}}},"schemas":{"TradeList":{"required":["items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Trade"}},"next_cursor":{"type":"string","maxLength":255},"total_count":{"type":"integer","format":"int64","minimum":0}}},"Trade":{"required":["id","transactionType","baseTokenSymbol","quoteTokenSymbol","baseTokenQuantity","quoteTokenQuantity","price"],"type":"object","properties":{"id":{"type":"string","readOnly":true,"maxLength":255},"sequenceNo":{"description":"Trade number generated by the order book\n","type":"integer","format":"int64","readOnly":true,"minimum":0},"transactionDate":{"description":"The time at which the corresponding block-chain block was generated\n","type":"string","format":"date-time","readOnly":true},"finalityDate":{"description":"The time since when the transaction is considered final by 21X.\n","type":"string","format":"date-time","readOnly":true},"transactionType":{"description":"The kind of trade (buy/sell)\n","$ref":"#/components/schemas/OrderKindEnum"},"baseTokenSymbol":{"description":"The symbol of the financial instrument token that was traded\n","type":"string","maxLength":255},"quoteTokenSymbol":{"description":"The e-money token that was used in the trade\n","type":"string","maxLength":255},"baseTokenQuantity":{"description":"The number of financial instrument tokens that were transferred\n","type":"string","pattern":"^(-)?[0-9][0-9]*(?:.[0-9]{1,18})?$","maxLength":255},"quoteTokenQuantity":{"description":"The number of e-money tokens that were transferred (excluding commission)\n","type":"string","pattern":"^(-)?[0-9][0-9]*(?:.[0-9]{1,18})?$","maxLength":255},"price":{"description":"The price point at which the trade was executed\n","type":"string","pattern":"^(-)?[0-9][0-9]*(?:.[0-9]{1,18})?$","maxLength":255},"commission":{"description":"The number of e-money tokens the participant paid as commission\n","type":"string","pattern":"^(-)?[0-9][0-9]*(?:.[0-9]{1,18})?$","maxLength":255},"orderId":{"description":"Link to the participant's order involved in the trade\n","type":"string","maxLength":255},"transactionHash":{"description":"Unique identifier of the corresponding blockchain transaction\n","type":"string","maxLength":255}}},"OrderKindEnum":{"type":"string","enum":["BUY","SELL"]},"AppError":{"required":["code","message"],"type":"object","properties":{"code":{"description":"A identifier that categorizes the error","type":"string"},"message":{"description":"A brief, human-readable message about the error","type":"string"},"status":{"description":"The HTTP response code","type":"integer","format":"int32"},"path":{"description":"A URI that identifies the specific occurrence of the error","type":"string"},"timestamp":{"type":"string","format":"date-time"},"details":{"description":"Detailed explanations of the error","type":"array","items":{"type":"string"}}}}},"responses":{"DefaultError":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppError"}}}}}},"paths":{"/wallets/{wallet_address}/trades":{"get":{"tags":["Trade"],"summary":"getWalletTrades","description":"Fetches all completed trades involving the wallet, optionally restricted to one trading pair.\n","operationId":"getWalletTrades","parameters":[{"name":"wallet_address","in":"path","required":true,"schema":{"type":"string"}},{"name":"trading_pair","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/count"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeList"}}}},"default":{"$ref":"#/components/responses/DefaultError"}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.21x.eu/api-reference-v1.0/trade.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
