requests installed. Run python -m pip install requests if needed. The snippets share the variables defined in step 1.
1. Build a follow list
Leaderboard lists S-, A-, and B-grade wallets, sorted by score. It has nomin_grade filter, so keep S and A in your code.
next_cursor with the same filters. If you receive cursor_expired, discard that traversal and start again from the first page.
2. Compare copy scores and freshness
Batch traders reads up to 25 wallets per call. Useexpand: ["quant_metrics"] to request copy_score and smart_score.
A
fresh ranking group has a timestamp, but you still need to compare it with your own maximum age. The example accepts rankings no older than 6 hours. It skips undated rankings and sorts wallets without a copy_score last.
Step 3 watches only wallets accepted by this freshness check.
null score means insufficient or unavailable data; it is not a low score. The quant metrics page defines the calculation. SDK users can apply their own freshness limit with assessDataQuality, assess_data_quality, or AssessDataQuality.
3. Match recent trades against the list
Large trades returns recent trades, newest first. It has no wallet filter, so matchtrader.address against your list.
This example reads one page and stores deduplication IDs in memory. It can miss trades during a long pause and repeats them after a restart. For a durable consumer, use the event replay recipe in Alert bot.
To read one wallet’s historical large trades, use Large trades history with
trader.
4. Inspect entries and exits in one market
Takemarket.condition_id from a matching trade and request Position timeline.
running_amount gives the share balance after each stored fill. running_avg_price gives the buy-weighted average price; selling does not change it. Both include earlier pages, so you do not need to recompute them while paging.
The timeline excludes other position-changing operations, such as redemptions. It is available only for closely tracked wallets. A 404 with trader_not_tracked means the timeline is unavailable; retrying does not create it.
Limits
- A wallet’s historical grade or score does not guarantee a future result.
- The feed contains recorded large trades, not every fill from a followed wallet.
- Trade prices describe executed fills, not quotes available to you.
- The API does not place, cancel, or read orders.
- The polling example does not provide durable delivery. Use Alert bot when missing an event is unacceptable.