# coinpay methodology

Canonical page: https://coinpay.hk/en/data

Every 30 minutes coinpay reads the first public USDT ads on Binance P2P and OKX P2P for each market, takes the median price for buying and for selling, and compares it with a USD reference rate (XE or Frankfurter, named on each market page). KRW uses the Bithumb spot price. Premium = (median price ÷ reference − 1) × 100.

## Sampling
- Samples are taken every 30 minutes (UTC :00 and :30) for every market, in the background: page views never take or write samples.
- Each sample reads up to 10 public USDT ads per side (buy and sell) on Binance P2P and OKX P2P, the same ads as the live market pages.
- "Buy USDT" covers ads where you buy USDT with the fiat; "Sell USDT" covers ads where you sell USDT for the fiat.

## Median price and premium
- Median price: the median of up to 10 public ads per side and exchange, in fiat per USDT. It is the headline metric of the live pages and markets.md.
- Premium = (USDT fiat price / USD fiat reference − 1) × 100. USDT and USD are different assets; this is a reference comparison, not an executable USD conversion.

## FX reference
- Each market's USD reference rate comes from XE (mid-market) or Frankfurter; the provider is named on each market page and stored per sample in the fx_source column of the 30-minute files. It is a USD reference, not a local cash or black-market rate.

| Market | FX reference source (latest sample) | 1 USD = |
| --- | --- | ---: |
| USDT/VES · Venezuela | XE Mid-market | 900.91 |
| USDT/ARS · Argentina | Frankfurter | 1,546.29 |
| USDT/NGN · Nigeria | Frankfurter | 1,349.37 |
| USDT/IDR · Indonesia | Frankfurter | 18,123 |
| USDT/VND · Vietnam | Frankfurter | 25,672 |
| USDT/HKD · Hong Kong SAR China | XE Mid-market | 7.84 |
| USDT/MYR · Malaysia | Frankfurter | 4.06 |
| USDT/USD · United States | XE Mid-market | 1 |
| USDT/AED · United Arab Emirates | XE Mid-market | 3.67 |
| USDT/AUD · Australia | Frankfurter | 1.45 |
| USDT/BDT · Bangladesh | XE Mid-market | 125.68 |
| USDT/BRL · Brazil | Frankfurter | 5.56 |
| USDT/CAD · Canada | Frankfurter | 1.42 |
| USDT/CNY · China | Frankfurter | 6.67 |
| USDT/COP · Colombia | Frankfurter | 3,291 |
| USDT/EUR · Eurozone | XE Mid-market | 0.9 |
| USDT/GBP · United Kingdom | XE Mid-market | 0.753 |
| USDT/INR · India | Frankfurter | 93.81 |
| USDT/JPY · Japan | Frankfurter | 159 |
| USDT/KHR · Cambodia | Frankfurter | 4,079 |
| USDT/KRW · South Korea | Frankfurter | 1,339 |
| USDT/LAK · Laos | XE Mid-market | 22,615 |
| USDT/LKR · Sri Lanka | XE Mid-market | 335.4 |
| USDT/MXN · Mexico | XE Mid-market | 18.63 |
| USDT/PEN · Peru | XE Mid-market | 3.43 |
| USDT/PHP · Philippines | Frankfurter | 63.1 |
| USDT/PKR · Pakistan | XE Mid-market | 277.34 |
| USDT/TRY · Türkiye | XE Mid-market | 50.23 |
| USDT/ZAR · South Africa | Frankfurter | 16.47 |

## Long-term series
- At each sample coinpay also keeps the highest premium among the first five public ads for each side, calculated as (price ÷ FX reference − 1) × 100. The archive holds this series since 2026-08-06; the daily premium_* columns of the data files use it.
- History tracks the best visible premium sampled every 30 minutes, not the current top-10 median. New markets build history from launch.
- Richer samples also record the median price and median premium of up to 10 ads, the first-ranked ad price, the ad count and the FX reference; these fields are empty for earlier samples.

## Outliers
- A short excursion (at most four consecutive samples, two hours) that moves more than 5 percentage points (more when prices are widely spread) away from the level both before and after it, then returns, is left out of the daily figures. Steps to a new level and the newest samples are never excluded.
- Flagged samples stay in the 30-minute files with outlier=true and count in the daily outlier_samples column.

Exact rule, as stated in the data files:

> Long-term series: premium_pct (and the daily premium_* columns) = highest premium among the first five public ads returned for each side at sample time vs the FX reference, (price / FX reference - 1) * 100. median_price and median_premium_pct describe the median of up to 10 ads per side, the headline metric of the live rates page (sampled_ads gives the count per sample; the earliest samples with this field used 5); they, top_price and fx_reference exist only for samples recorded in the richer archive format. Sampled every 30 minutes (UTC :00/:30); daily statistics use the successful samples of each UTC day. Outliers, per side and exchange (premium_pct and median_premium_pct checked separately): a run of at most 4 consecutive samples spanning at most 90 minutes whose premiums are all more than max(5 percentage points, 6 * 1.4826 * MAD) from both the median of the up to 7 samples before the run and the median of the 7 after it (within 12 hours; MAD = the larger of the two sides' own median absolute deviations), with the samples next to the run inside that band and the two medians agreeing (the series returns to its level), is excluded from the daily avg/min/max/close (premium_pct) or median/top averages (median_premium_pct). Level shifts and the newest samples are never flagged. When more than max(1, 10%) of a UTC day's samples would be flagged, nothing in that day is excluded and runs reaching into it are kept whole. Outliers are judged within each month file, so the first and last samples of a month have context on one side only. Flagged samples stay in the 30-minute files with outlier=true and are counted in the daily outlier_samples column. Premiums are not profits.

## Special cases
- KRW: Compare Bithumb USDT/KRW spot prices with the USD/KRW FX reference. This is a spot proxy, not a Korean P2P market. The Bithumb Spot price covers both directions.
- MYR: Binance quotes are collected through Binance's RON market mapping, as on the live page; verify the mapping before relying on these prices.
- Single-exchange markets: NGN (OKX P2P only), MYR (Binance P2P only), BRL (OKX P2P only).
- NGN: Binance no longer lists NGN P2P. This page uses OKX public offers and measures premium against the USD/NGN FX reference, not a cross-exchange spread.

## Caveats
- The FX reference is a USD reference, not a local cash or black-market rate, and official central-bank rates (for example the BCV rate for VES) are not collected separately.
- Is a premium the same as net profit? No. A premium compares a USDT quote with the USD FX benchmark. Net profit must also subtract trading and withdrawal fees, and depends on compatible payments, limits and executable liquidity. Use the calculator with your own costs.
- Local supply, demand, payment methods and execution restrictions can change P2P quotes. The FX reference is a provider benchmark, not a local cash or black-market rate.
- Public quotes are indicative. Check order limits, payment compatibility, KYC and execution costs. A premium is not a guaranteed profit.
- Public ads change between samples: check the sample time before relying on a quote.

## Related guides
- [Open data](https://coinpay.hk/data.md)
- [All USDT P2P markets](https://coinpay.hk/markets.md)
- [coinpay](https://coinpay.hk/index.md)
