Trade API Documentation
Search trade history, export CSV files, and view trending powers from one API endpoint.
Base Endpoint
https://pythbots.com/api/trade.php
The Trade API can return data from two different sources:
- Raw trade history from the
tabletrades - Trending / summarized power data from the
tableavg
What This API Can Do
Basic Examples
All trades
https://pythbots.com/api/trade.php
Search by power
https://pythbots.com/api/trade.php?power=gold
Search by user ID
https://pythbots.com/api/trade.php?user_id=221192
Buy trades only
https://pythbots.com/api/trade.php?type=buy
Sell trades only
https://pythbots.com/api/trade.php?type=sell
Parameters
power
Search one exact normalized power name.
https://pythbots.com/api/trade.php?power=gold
Power search is an exact match after normalization.
For example,
For example,
gold matches gold, but not golden.userid
Return trades for one specific user ID.
https://pythbots.com/api/trade.php?user_id=221192
username
Search by username using a partial match.
https://pythbots.com/api/trade.php?username=mathias
type
Allowed values:
buysellhttps://pythbots.com/api/trade.php?type=buy
date
Search one exact day.
Accepted format:
dd.mm.yy
Example:
https://pythbots.com/api/trade.php?date=17.03.26
datefrom and dateto
Search a date range.
https://pythbots.com/api/trade.php?date_from=01.03.26&date_to=17.03.26
timefrom and timeto
Search a time range.
https://pythbots.com/api/trade.php?time_from=10:00&time_to=18:00
amountmin and amountmax
Filter by trade amount.
https://pythbots.com/api/trade.php?amount_min=100&amount_max=5000
perdaymin and perdaymax
Filter by per-day value.
https://pythbots.com/api/trade.php?per_day_min=2&per_day_max=20
dayscount
Return trades for powers with a specific day count.
https://pythbots.com/api/trade.php?days_count=30
hasprice
Filter by whether the row has a price.
1 = only rows with prices0 = only rows without priceshttps://pythbots.com/api/trade.php?has_price=1
https://pythbots.com/api/trade.php?has_price=0
raw
Search inside the original stored trade message.
https://pythbots.com/api/trade.php?raw=buy%20gold
sort
Allowed sort fields:
idusernameuser_iddatetimetypepoweramountdays_countper_daycreated_atExample:
https://pythbots.com/api/trade.php?sort=amount&order=desc
order
Allowed values:
ascdeschttps://pythbots.com/api/trade.php?sort=amount&order=asc
limit
Control how many rows are returned.
https://pythbots.com/api/trade.php?limit=25
offset
Useful for pagination.
https://pythbots.com/api/trade.php?limit=25&offset=25
summaryonly
Return only summary totals without the full row list.
https://pythbots.com/api/trade.php?power=gold&summary_only=1
exclude_unknown
Hide rows where the username is blank or
Unknown.
https://pythbots.com/api/trade.php?power=gold&exclude_unknown=1
Output Formats
Default JSON output
https://pythbots.com/api/trade.php?power=gold
CSV export
Add
format=csv.
https://pythbots.com/api/trade.php?power=gold&format=csv
https://pythbots.com/api/trade.php?user_id=221192&format=csv
All normal search filters work with CSV export too.
Trending Powers
Trending mode uses the
avg table and returns the top 3 powers.
Top 3 by total trade count
https://pythbots.com/api/trade.php?trending=1
Top 3 by average overall price
https://pythbots.com/api/trade.php?trending=1&trending_by=avg_all
Top 3 by average buy price
https://pythbots.com/api/trade.php?trending=1&trending_by=avg_buy
Top 3 by average sell price
https://pythbots.com/api/trade.php?trending=1&trending_by=avg_sell
Top 3 by highest max price
https://pythbots.com/api/trade.php?trending=1&trending_by=max_price
Top 3 by minimum price
https://pythbots.com/api/trade.php?trending=1&trending_by=min_price
Export trending powers as CSV
https://pythbots.com/api/trade.php?trending=1&format=csv
Filter trending by power
https://pythbots.com/api/trade.php?trending=1&power=gold
Filter trending by day count
https://pythbots.com/api/trade.php?trending=1&days_count=30
Trending mode uses the
Normal trade searches use the
avg table.Normal trade searches use the
trades table.Clean Example URLs
One power
https://pythbots.com/api/trade.php?power=gold
One power as CSV
https://pythbots.com/api/trade.php?power=gold&format=csv
One user
https://pythbots.com/api/trade.php?user_id=221192
One user, buy trades only
https://pythbots.com/api/trade.php?user_id=221192&type=buy
Date range
https://pythbots.com/api/trade.php?date_from=01.03.26&date_to=17.03.26
Amount range
https://pythbots.com/api/trade.php?amount_min=100&amount_max=5000
Only rows with prices
https://pythbots.com/api/trade.php?has_price=1
Summary only
https://pythbots.com/api/trade.php?power=gold&summary_only=1
Trending powers
https://pythbots.com/api/trade.php?trending=1
Trending as CSV
https://pythbots.com/api/trade.php?trending=1&format=csv
JSON Response Structure
A normal JSON response includes:
okfilterssummarygrouped.by_powergrouped.by_usergrouped.by_datecount_returnedrowsExample shape:
{
"ok": true,
"filters": { ... },
"summary": { ... },
"grouped": {
"by_power": [ ... ],
"by_user": [ ... ],
"by_date": [ ... ]
},
"count_returned": 25,
"rows": [ ... ]
}
Summary fields
The
summary object may contain:
total_rowsunique_usersunique_powerstotal_buystotal_sellspriced_rowsunpriced_rowsmin_amountmax_amountavg_amountavg_per_dayearliest_datelatest_dateTrending Response Structure
Trending mode returns:
oktrending.sort_bytrending.counttrending.rowsExample shape:
{
"ok": true,
"trending": {
"sort_by": "trades",
"count": 3,
"rows": [
{
"power": "gold",
"trades": 42,
"avg_all": 1200,
"avg_buy": 1100,
"avg_sell": 1300,
"min_price": 800,
"max_price": 2000,
"last_seen": "17.03.26 14:10"
}
]
}
}
Important Notes
Dates must be passed in
dd.mm.yy or dd.mm.yyyy format.Normal searches and trending searches use different tables:
Normal search =
Trending search =
tradesavgBy default, rows with username
Use
Unknown are included.Use
exclude_unknown=1 only if you want to hide them.Quick Reference
https://pythbots.com/api/trade.php
https://pythbots.com/api/trade.php?power=gold
https://pythbots.com/api/trade.php?user_id=221192
https://pythbots.com/api/trade.php?type=buy
https://pythbots.com/api/trade.php?date=17.03.26
https://pythbots.com/api/trade.php?date_from=01.03.26&date_to=17.03.26
https://pythbots.com/api/trade.php?amount_min=100&amount_max=5000
https://pythbots.com/api/trade.php?per_day_min=2&per_day_max=20
https://pythbots.com/api/trade.php?has_price=1
https://pythbots.com/api/trade.php?summary_only=1
https://pythbots.com/api/trade.php?format=csv
https://pythbots.com/api/trade.php?trending=1
https://pythbots.com/api/trade.php?trending=1&trending_by=avg_all
https://pythbots.com/api/trade.php?trending=1&format=csv
End of Trade API documentation