search_history
Retrieve historical order, perpetual position, and CLMM position data from the database for analysis, reporting, and tax purposes. Filter by account, connector, trading pair, status, time range, and more.
Instructions
Search historical data from the backend database.
This tool is for historical analysis, reporting, and tax purposes.
For real-time current state, use get_portfolio_overview() instead.
Data Types:
- orders: Historical order data (filled, cancelled, failed)
- perp_positions: Perpetual positions (both open and closed)
- clmm_positions: CLMM LP positions (both open and closed)
Common Filters (apply to all data types):
account_names: Filter by account names (optional)
connector_names: Filter by connector names (optional)
trading_pairs: Filter by trading pairs (optional)
status: Filter by status (optional, e.g., 'OPEN', 'CLOSED', 'FILLED', 'CANCELED')
start_time: Start timestamp in seconds (optional)
end_time: End timestamp in seconds (optional)
limit: Maximum number of results (default: 50, max: 1000)
offset: Pagination offset (default: 0)
CLMM-Specific Filters:
network: Network filter for CLMM positions (optional)
wallet_address: Wallet address filter for CLMM positions (optional)
position_addresses: Specific position addresses for CLMM (optional)
Examples:
- Search filled orders: search_history("orders", status="FILLED", limit=100)
- Search closed perp positions: search_history("perp_positions", status="CLOSED")
- Search all CLMM positions: search_history("clmm_positions", limit=100)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_type | Yes | ||
| account_names | No | ||
| connector_names | No | ||
| trading_pairs | No | ||
| status | No | ||
| start_time | No | ||
| end_time | No | ||
| limit | No | ||
| offset | No | ||
| network | No | ||
| wallet_address | No | ||
| position_addresses | No |