> For the complete documentation index, see [llms.txt](https://docs.ticko.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ticko.xyz/api-documentation/account/rest-api/get-trading-flow.md).

# Get Trading Flow

## Get Trading Flow

> Returns trading-related balance and position flows. This endpoint uses cursor pagination. If \`start\_time\` and \`end\_time\` are omitted, the default window is the last 7 days. History is limited to the last 365 days and the maximum single query window is 365 days.\
> \
> \*\*Time filter:\*\* \`start\_time <= time < end\_time\`.\
> \
> \*\*Rate-limit weight\*\*\
> \
> \- \*\*By IP:\*\* \`2\`

```json
{"openapi":"3.1.0","info":{"title":"Ticko API","version":"1.0"},"tags":[{"name":"Account","description":"Account state and settings: balances, positions, flows, leverage, margin, transfers, and withdrawals. Read endpoints are public by address; write endpoints are signed."}],"servers":[{"url":"https://api.testnet.ticko.xyz/v1","description":"Testnet"}],"paths":{"/account/trading-flow":{"get":{"operationId":"getTradingFlow","summary":"Get Trading Flow","tags":["Account"],"description":"Returns trading-related balance and position flows. This endpoint uses cursor pagination. If `start_time` and `end_time` are omitted, the default window is the last 7 days. History is limited to the last 365 days and the maximum single query window is 365 days.\n\n**Time filter:** `start_time <= time < end_time`.\n\n**Rate-limit weight**\n\n- **By IP:** `2`","parameters":[{"name":"address","in":"query","required":true,"description":"Account address.","schema":{"type":"string"}},{"name":"coin_id","in":"query","required":false,"description":"Coin ID.","schema":{"type":"integer"}},{"name":"symbol_id","in":"query","required":false,"description":"Trading pair ID.","schema":{"type":"integer"}},{"name":"type","in":"query","required":false,"description":"Single trading flow type.","schema":{"type":"string"}},{"name":"action","in":"query","required":false,"description":"Single trading flow action subtype.","schema":{"type":"string"}},{"name":"margin_mode","in":"query","required":false,"description":"`cross` or `isolated`.","schema":{"type":"string","enum":["cross","isolated"]}},{"name":"start_time","in":"query","required":false,"description":"Start timestamp.","schema":{"type":"integer"}},{"name":"end_time","in":"query","required":false,"description":"End timestamp.","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Default `50`, maximum `2000`.","schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"description":"Pagination cursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"list":{"type":"array","description":"Trading flow objects.","items":{"type":"object","properties":{"flow_id":{"type":"string","description":"Flow ID."},"address":{"type":"string","description":"Account address."},"tx_hash":{"type":"string","description":"Transaction hash."},"time":{"type":"integer","description":"Flow timestamp."},"type":{"type":"string","description":"Trading flow type."},"action":{"type":"string","description":"Trading flow action subtype."},"order_id":{"type":["string","null"],"description":"Source order ID, or `null` for system events."},"trade_id":{"type":["string","null"],"description":"Trade ID, or `null` for non-trade events."},"coin_id":{"type":"integer","description":"Coin ID."},"symbol_id":{"type":["integer","null"],"description":"Trading pair ID, or `null` when not applicable."},"margin_mode":{"type":["string","null"],"enum":["cross","isolated",null],"description":"`cross`, `isolated`, or `null`."},"position_side":{"type":["string","null"],"enum":["both","long","short",null],"description":"`both`, `long`, `short`, or `null`."},"fee":{"type":["string","null"],"description":"Fee from the user's perspective. Positive means rebate; negative means fee paid."},"fill_price":{"type":["string","null"],"description":"Execution price, or `null` when not applicable."},"oracle_price":{"type":["string","null"],"description":"Oracle price, or `null` when not applicable."},"mark_price":{"type":["string","null"],"description":"Mark price, or `null` when not applicable."},"closed_pnl":{"type":["string","null"],"description":"Closed PnL for this event, or `null` when not applicable."},"position_change":{"type":["string","null"],"description":"Position change, signed where applicable."},"position":{"type":["string","null"],"description":"Position after the change, signed where applicable."},"position_balance_change":{"type":["string","null"],"description":"Isolated margin balance change, or `null` when not applicable."},"position_balance":{"type":["string","null"],"description":"Isolated margin balance after the change, or `null` when not applicable."},"balance_change":{"type":"string","description":"Cross balance change."},"balance":{"type":"string","description":"Cross balance after the change."}}}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page."},"has_more":{"type":"boolean","description":"Whether another page is available."}}}}}]}}}}}}}},"components":{"schemas":{"Envelope":{"type":"object","description":"Standard success response envelope. `data` is defined per endpoint.","properties":{"code":{"type":"string","description":"`\"0\"` on success."},"msg":{"type":"string","description":"Empty on success."},"trace_code":{"type":"string","description":"Backend trace identifier. Empty on success."}}}}}}
```


---

# 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.ticko.xyz/api-documentation/account/rest-api/get-trading-flow.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.
