> For the complete documentation index, see [llms.txt](https://docs.solanavibestation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solanavibestation.com/developers/partner-marketplace/sailfish/normalized-trades.md).

# Normalized Trades

## POST /sailfish/trades/query

> Query normalized trades

```json
{"openapi":"3.1.0","info":{"title":"Sailfish API","version":"1.0.0"},"servers":[{"url":"https://free.sailfish.solanavibestation.com","description":"Free tier"},{"url":"https://basic.sailfish.solanavibestation.com","description":"Basic tier (requires Authorization header)"}],"paths":{"/sailfish/trades/query":{"post":{"summary":"Query normalized trades","operationId":"fetchTrades","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesQuery"}}}},"responses":{"200":{"description":"Map of trades grouped by backend-defined key (e.g. pool address or tick)","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Trade"}}}}}}}}}},"components":{"schemas":{"TradesQuery":{"type":"object","properties":{"lower_tick":{"type":"integer"},"upper_tick":{"type":"integer"},"pool_types":{"type":"array","items":{"$ref":"#/components/schemas/PoolType"}},"pool_addresses":{"type":"array","items":{"type":"string"}},"token_addresses":{"type":"array","items":{"type":"string"}},"to_wallets":{"type":"array","items":{"type":"string"}},"from_wallets":{"type":"array","items":{"type":"string"}}},"required":["lower_tick","upper_tick","pool_types","pool_addresses","token_addresses","to_wallets","from_wallets"]},"PoolType":{"type":"string","enum":["RaydiumAmm","RaydiumCpmm","RaydiumClmm","RaydiumLaunchpad","PumpSwapAmm","PumpFunAmm","MeteoraDyn","MeteoraDynV2"]},"Trade":{"type":"object","description":"Normalized trade with base/quote semantics","properties":{"index":{"$ref":"#/components/schemas/TradeIndex"},"pool_address":{"type":"string"},"quote_token_address":{"type":"string"},"base_token_address":{"type":"string"},"quote_amount":{"type":"string","description":"Signed change in quote token balance"},"base_amount":{"type":"string","description":"Signed change in base token balance"},"price":{"type":"string","description":"base_token / quote_token"},"fee":{"type":"string"},"bribe":{"type":"string"},"from_wallet":{"type":"string"},"to_wallet":{"type":"string"},"from_wallet_account":{"type":"string","nullable":true},"to_wallet_account":{"type":"string","nullable":true}},"required":["index","pool_address","quote_token_address","base_token_address","quote_amount","base_amount","price","fee","bribe","from_wallet","to_wallet"]},"TradeIndex":{"type":"object","properties":{"tick":{"type":"integer","description":"Typically block/slot number"},"index_a":{"type":"integer","description":"Index within the tick"},"index_b":{"type":"integer","description":"Index within the transaction"},"tx_hash":{"type":"string"}},"required":["tick","index_a","index_b","tx_hash"]}}}}
```


---

# 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:

```
GET https://docs.solanavibestation.com/developers/partner-marketplace/sailfish/normalized-trades.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.
