StockX fees calculator API: real checkout prices per size in Python
One request to Packet's StockX subtotal endpoint returns the checkout price of every size for each delivery method. Real runs on a Jordan 4 and an adidas Samba show why a fixed-percentage fee calculator gets cheap pairs wrong.
On this page
This post gets you two Python scripts. The first prints the StockX checkout price for every size of a product, for each delivery method. The second compares that price with the lowest ask, so you can see the fee gap in dollars and as a percentage. It is for developers building price comparisons, arbitrage alerts or a StockX fees calculator that has to match what a buyer pays, rather than an estimate from a hardcoded percentage. Every number below comes from live calls to Packet's StockX checkout subtotal endpoint, made on November 16, 2026. Packet is an independent service and is not affiliated with StockX.
Get the checkout subtotal for every size in one request
GET /v1/stockx/subtotal takes a StockX product UUID in id, plus an optional country_code (default US) and currency_code (default USD). One request returns every size with its delivery options and costs 1 credit. According to the endpoint description, the subtotal includes delivery and platform fees.
First you need the product UUID. The StockX search endpoint returns it:
import os
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
r = requests.get(
f"{API}/v1/stockx/search",
headers=HEADERS,
params={"query": "Jordan 4 Retro SB Pine Green"},
timeout=30,
)
r.raise_for_status()
node = r.json()["data"]["browse"]["results"]["edges"][0]["node"]
print(node["id"], node["title"], node["market"]["state"]["lowestAsk"]["amount"])
ea540dc0-f05c-48e0-b703-363009124853 Jordan 4 Retro SB Pine Green 245
The 245 is the lowest ask across all sizes, in dollars. Now the checkout subtotal for every size:
import os
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
PINE_GREEN = "ea540dc0-f05c-48e0-b703-363009124853" # Jordan 4 Retro SB Pine Green
LABELS = {
"STANDARD": "standard",
"EXPRESS_STANDARD": "xpress",
"EXPRESS_EXPEDITED": "expedited",
"EXPRESS_NEXTDAY": "next_day",
}
r = requests.get(
f"{API}/v1/stockx/subtotal",
headers=HEADERS,
params={"id": PINE_GREEN},
timeout=30,
)
r.raise_for_status()
product = r.json()["data"]["product"]
print(product["title"])
print(f"{'size':<6}" + "".join(f"{label:>10}" for label in LABELS.values()))
for v in product["variants"]:
totals = {m["type"]: m["subTotal"] for m in v["deliveryOptions"]["methods"]}
cells = [f"{totals[t]:>10.2f}" if t in totals else f"{'-':>10}" for t in LABELS]
print(f"{v['traits']['size']:<6}" + "".join(cells))
Jordan 4 Retro SB Pine Green
size standard xpress expedited next_day
3.5 632.34 705.10 710.10 718.10
4 410.85 414.06 - -
4.5 362.70 362.70 367.70 375.70
5 469.70 662.30 - -
5.5 416.20 459.00 519.64 527.64
6 473.98 479.33 - -
6.5 393.73 401.22 447.95 455.95
7 294.22 294.22 300.29 308.29
7.5 303.85 335.95 340.95 348.95
8 282.45 283.52 288.52 296.52
8.5 277.10 300.64 308.85 316.85
9 326.32 326.32 333.46 341.46
9.5 378.75 384.10 399.80 407.80
10 398.01 463.28 468.28 476.28
10.5 462.21 509.29 554.95 562.95
11 463.28 469.70 474.70 482.70
11.5 594.89 941.57 - -
12 485.75 522.13 527.13 535.13
I cut the output after size 12. The response continues through the larger sizes. One variant in the raw response looks like this, with the descriptions removed:
{
"id": "a7e11153-9b0b-43f5-9826-a437674be584",
"traits": {"size": "4.5"},
"deliveryOptions": {
"methods": [
{"type": "STANDARD", "title": "Standard Shipping", "subTotal": 362.7},
{"type": "EXPRESS_STANDARD", "title": "Xpress Shipping", "subTotal": 362.7},
{"type": "EXPRESS_EXPEDITED", "title": "Xpress Shipping", "subTotal": 367.7},
{"type": "EXPRESS_NEXTDAY", "title": "Xpress Shipping", "subTotal": 375.7}
]
}
}
All three Xpress methods share the title "Xpress Shipping", so key on type, never on title.
Reading the delivery methods
Each method comes with a description string. These are the four type values and the descriptions the API returned:
| type | Description in the response |
|---|---|
STANDARD |
Verified by StockX or Xpress ships directly from a StockX Verified Seller. |
EXPRESS_STANDARD |
Xpress ships and is pre-verified by StockX or ships directly from a StockX Verified Seller. |
EXPRESS_EXPEDITED |
Xpress ships and is pre-verified by StockX. |
EXPRESS_NEXTDAY |
Xpress ships and is pre-verified by StockX. |
The Pine Green run shows several patterns that matter if you build on this data:
- Not every size has every method. Sizes 4, 5, 6 and 11.5 only had standard and Xpress. A variant can also come back with
"methods": []. The Samba below returned an empty list for sizes 13.5 and 14, and the GB request for the Pine Green did the same for 13.5. Treat an empty list as "not buyable right now", not as a price of zero. - Xpress sometimes costs nothing extra. In sizes 4.5, 7 and 9 the Xpress total equals the standard total to the cent.
- Sometimes it costs a lot more. Size 11.5 was $594.89 standard and $941.57 Xpress, a $346.68 difference. Size 5 was $192.60 more.
- Next day was exactly $8.00 more than expedited in all 14 sizes that offered both.
- Expedited was exactly $5.00 more than Xpress in 7 of those 14 sizes (3.5, 4.5, 7.5, 8, 10, 11, 12). In the other seven the gap ran from $6.07 (size 7) to $60.64 (size 5.5). Expedited only covers stock pre-verified by StockX, so a larger gap suggests the cheapest qualifying pair is a different, pricier listing.
For a "cheapest way to get this size by Friday" feature, take the minimum over the methods that exist and show each faster option with its premium over standard. Comparing totals like this is more reliable than adding a shipping surcharge to an ask, because the faster methods can draw on different listings.
Comparing the lowest ask with the checkout price
The subtotal endpoint returns one total per method, with no breakdown. To see the fee gap, pull the per-size lowest ask from the StockX product endpoint (also 1 credit) and match the two responses on variant ID. The script below does this for the Pine Green and for a cheap pair, the adidas Samba OG Core Black Cloud White Gum (ID 01dd9624-ffbf-4672-8ef5-05f6d5506cc7, found with the same search call).
import os
import time
import requests
API = "https://api.pckt.sh"
HEADERS = {"Authorization": f"Bearer {os.environ['PCKT_API_KEY']}"}
PINE_GREEN = "ea540dc0-f05c-48e0-b703-363009124853" # Jordan 4 Retro SB Pine Green
SAMBA = "01dd9624-ffbf-4672-8ef5-05f6d5506cc7" # adidas Samba OG Core Black Cloud White Gum
def get_product(path, **params):
r = requests.get(f"{API}{path}", headers=HEADERS, params=params, timeout=30)
r.raise_for_status()
time.sleep(1.1) # Free plan: 1 request per second
return r.json()["data"]["product"]
def fee_gap(product_id, **market):
product = get_product("/v1/stockx/product", id=product_id, **market)
checkout = get_product("/v1/stockx/subtotal", id=product_id, **market)
asks = {}
for v in product["variants"]:
state = v.get("market", {}).get("state", {})
asks[v["id"]] = (state.get("lowestAsk") or {}).get("amount")
print(product["title"])
print(f"{'size':<6}{'ask':>6}{'checkout':>10}{'gap':>8}{'gap %':>7}")
for v in checkout["variants"]:
ask = asks.get(v["id"])
standard = next(
(m["subTotal"] for m in v["deliveryOptions"]["methods"] if m["type"] == "STANDARD"),
None,
)
if not ask or standard is None:
continue
gap = standard - ask
print(f"{v['traits']['size']:<6}{ask:>6}{standard:>10.2f}{gap:>8.2f}{gap / ask:>7.1%}")
fee_gap(PINE_GREEN)
fee_gap(SAMBA)
Output, cut to the first eight sizes of each product:
Jordan 4 Retro SB Pine Green
size ask checkout gap gap %
3.5 577 632.34 55.34 9.6%
4 370 410.85 40.85 11.0%
4.5 325 362.70 37.70 11.6%
5 425 469.70 44.70 10.5%
5.5 375 416.20 41.20 11.0%
6 429 473.98 44.98 10.5%
6.5 354 393.73 39.73 11.2%
7 261 294.22 33.22 12.7%
adidas Samba OG Core Black Cloud White Gum
size ask checkout gap gap %
4 104 125.90 21.90 21.1%
4.5 104 125.90 21.90 21.1%
5 70 91.90 21.90 31.3%
5.5 71 92.90 21.90 30.8%
6 92 113.90 21.90 23.8%
6.5 90 111.90 21.90 24.3%
7 51 72.90 21.90 42.9%
7.5 38 59.90 21.90 57.6%
The two products follow different patterns. On the Pine Green, all eight sizes match ask × 1.07 + 14.95 to the cent. For size 7 that is 261 × 1.07 + 14.95 = 294.22. On the Samba, the gap is a flat $21.90 for every ask from $38 to $104.
If you used the Pine Green pattern for the Samba, you would get $55.61 for size 7.5 instead of $59.90, and $126.23 for size 4 instead of $125.90. As a share of the ask, the gap ran from 9.6% to 12.7% on the Jordan and from 21.1% to 57.6% on the Samba. On a cheap pair, the checkout gap can be a large part of the price. Somewhere between a $104 ask and a $245 ask the pattern changes, and these two products don't show where.
These patterns describe this run, not a fee schedule published by StockX. The endpoint doesn't itemise the total, and nothing guarantees the pattern holds for other categories, markets or dates. That is why a fees calculator should read the subtotal instead of copying the formula.
Checkout prices in another market
Pass country_code and currency_code to get the checkout total a buyer in another country sees. The same function works for the UK:
fee_gap(PINE_GREEN, country_code="GB", currency_code="GBP")
Jordan 4 Retro SB Pine Green
size ask checkout gap gap %
3.5 475 517.20 42.20 8.9%
4 331 363.12 32.12 9.7%
4.5 292 322.46 30.46 10.4%
5 237 262.54 25.54 10.8%
5.5 347 380.24 33.24 9.6%
6 403 440.16 37.16 9.2%
6.5 396 432.67 36.67 9.3%
7 261 288.22 27.22 10.4%
Amounts are in pounds. Seven of the eight sizes match ask × 1.07 + 8.95. Size 4.5 is the exception: its subtotal implies an ask of £293, but the product call returned £292. The two requests ran one after the other, and Packet's live endpoints cache for up to 5 minutes, so the ask and the subtotal can come from slightly different moments. If an ask moves between the two calls, expect a mismatch like this one.
The UK response also offers fewer methods. None of the sizes had EXPRESS_NEXTDAY, and expedited only showed up in some of them. The asks themselves differ by market too: size 5 was $425 in the US and £237 in the UK. Converting a US subtotal into pounds won't give you the UK checkout price. Request each market separately.
What it costs
The subtotal, product and search endpoints each cost 1 credit per request.
| Task | Requests | Credits |
|---|---|---|
| Find a product UUID | 1 search | 1 |
| Checkout table for one product, one market | 1 subtotal | 1 |
| Ask vs checkout gap, one product, one market | 1 product + 1 subtotal | 2 |
| Every call made for this post | 2 search + 3 subtotal + 3 product | 8 |
| 20 products, gap check once a day, 30 days | 20 × 2 × 30 | 1,200 |
| 20 products, gap check every hour, 30 days | 20 × 2 × 24 × 30 | 28,800 |
The Free plan gives 500 credits a month, and new accounts can earn up to 550 bonus credits. That covers 500 subtotal calls, or a daily gap check on 8 products (8 × 2 × 30 = 480). The hourly 20-product check fits in the Developer plan's 50,000 credits. Plan details are on the Packet pricing page, and the credit calculator works out other schedules.
You can spend less with a hybrid setup. The cached StockX prices endpoint returns asks for up to 20 products in one 0.4-credit request. Polling it hourly for 30 days costs 24 × 30 × 0.4 = 288 credits. If you call the subtotal only when an ask drops, five alerts a day add 150 credits, for 438 in total. That fits in the Free plan.
What the subtotal does not tell you
The subtotal is the buyer's checkout total for one delivery method at one moment. Some things it leaves out:
- No breakdown. You get one number per method. The response doesn't separate shipping from fees, and it doesn't say whether tax is included.
- Buyer side only. It says nothing about what a seller receives after a sale.
- A snapshot. Asks change and live responses can be up to 5 minutes old, so save the timestamp of your request next to each total.
- Patterns, not rules. The 7%-plus-flat and $21.90 patterns above held for two products on one day. Check them against the endpoint before relying on them.
For the polling half of the hybrid setup, the sneaker price tracker tutorial stores cached asks per size in SQLite and flags drops. You can call fee_gap from its alert branch to attach the real checkout price to each alert. To check whether a checkout price is reasonable against what pairs have sold for, the StockX sales history guide covers the live, cached and daily sales endpoints.
Victor Lourme
Working at pckt.sh