index/interfaces/GetTradesOptions.md
Options for querying trades via GET /v1/trades
At least one of tokenName or userAddress must be provided.
Example
// Query by token
const result = await sdk.getTrades({ tokenName: 'anime' });
// Query by user
const result = await sdk.getTrades({ userAddress: 'eth|123...' });
// Query by both with filters
const result = await sdk.getTrades({
tokenName: 'anime',
userAddress: 'eth|123...',
txnType: 'BUY',
startDate: '2024-01-01',
endDate: '2024-12-31',
minAmount: 100,
maxAmount: 10000
});
Since
6.11.0 - Now extends BasePaginationOptions for DRY compliance
Extends
base pagination options
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
cursor? | string | Cursor token for fetching the next page (omit for first page) - for cursor-based pagination | BasePaginationOptions.cursor |
endDate? | string | Filter by date range end (ISO 8601 date string) Example: "2024-12-31" or "2024-12-31T23:59:59Z" | - |
maxAmount? | number | Filter by maximum trade amount (applies to inputAmount for BUY, outputAmount for SELL) | - |
minAmount? | number | Filter by minimum trade amount (applies to inputAmount for BUY, outputAmount for SELL) | - |
pageSize? | number | Page size for cursor-based pagination (defaults to 50, max 1000) | BasePaginationOptions.pageSize |
search? | string | Fuzzy search by token name (LIKE %search%). Ignored when tokenName is provided (exact match takes precedence). Must be alphanumeric, max 256 characters. | - |
startDate? | string | Filter by date range start (ISO 8601 date string) Example: "2024-01-01" or "2024-01-01T00:00:00Z" | - |
tokenName? | string | Filter by token name (e.g., "anime") | - |
txnType? | "BUY" | "SELL" | Filter by transaction type (BUY or SELL) | - |
userAddress? | string | Filter by user wallet address (eth|... or 0x... format) | - |
base pagination options end date max amount min page size start token name txn type user address