{"openapi":"3.1.0","info":{"title":"FTK Market Data API","description":"FTK cross-venue funding and spread data. Values are observational market data, not execution guarantees.","version":"1.0.0"},"paths":{"/v1/bundle":{"get":{"summary":"Multi-venue bundle for one symbol (Binance, Hyperliquid, Lighter)","description":"One call, one symbol, all venues: best bid/ask fetched from each venue's order book at request time (Hyperliquid falls back to impact prices from the <=60 s snapshot if that fetch fails; Lighter and Binance have no fallback and are then null, Binance with book_source unavailable), current funding rate, funding interval, next funding time, and the cross-venue spread in basis points for every pair of venues that both have a book, in both directions, gross and after estimated taker fees. Needs at least 2 of the 3 venues to list the symbol; the third, if it does not list it, is returned with status no_market and null fields. If fewer than 2 venues list the symbol: free 404 whose body names the one venue that lists it, or none (`venues_listed`), and nothing else. It is answered before the paywall (no 402, no payment needed) whenever cached listings decide it; if a venue's listing is unknown at that moment (Binance listings or that venue's last snapshot unavailable) the request goes through the paywall and gets the same 404, and the payment is not settled. Free delayed single-symbol sample with the same schema: /v1/sample/bundle. Free tier: add ?free=1 (no payment header) for any symbol from a snapshot at least 15 minutes old, snapshot books only (no request-time book, no Binance funding schedule), `spreads` empty; 30 calls per client IP per UTC day, then the normal 402.","operationId":"v1_bundle_v1_bundle_get","parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":32,"description":"Base asset, e.g. BTC, ETH, SOL (BTCUSDT, BTC-PERP and kPEPE are normalized). Required.","title":"Symbol"},"description":"Base asset, e.g. BTC, ETH, SOL (BTCUSDT, BTC-PERP and kPEPE are normalized). Required."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"symbol":{"type":"string","description":"Normalized base asset symbol you asked for (e.g. BTC)."},"as_of":{"type":"integer","description":"Unix seconds of the market snapshot used for funding (and for any book with book_source snapshot*)."},"generated_at":{"type":"integer","description":"Unix seconds when this response was built."},"venues":{"type":"array","description":"One object per venue, always in the order binance, hyperliquid, lighter.","items":{"type":"object","properties":{"venue":{"type":"string","description":"binance, hyperliquid (main perp DEX, not HIP-3 builder DEXs) or lighter."},"status":{"type":"string","description":"ok; partial (listed but no book and no funding); no_market (this venue does not list the symbol; the other venues are still returned); not_checked (Binance only: not in the snapshot and Binance could not be queried, so whether it is listed is unknown); error (venue fetch failed in the last snapshot)."},"bid":{"type":["number","null"],"description":"Best bid, USD per 1 unit of the base asset (1000x-contract prices are divided out)."},"ask":{"type":["number","null"],"description":"Best ask, USD per 1 unit of the base asset."},"mid":{"type":["number","null"],"description":"(bid + ask) / 2."},"mark":{"type":["number","null"],"description":"Mark price, USD per unit: from the snapshot, or for Binance (when the snapshot has none) from Binance premiumIndex at request time."},"book_source":{"type":["string","null"],"description":"live = fetched from the venue's order book at request time (Binance: /fapi/v1/ticker/bookTicker); snapshot_impact = Hyperliquid impact prices from the <=60 s snapshot (not strictly best bid/ask), used when its request-time fetch fails; unavailable = Binance only: the request-time fetch failed or is backing off after a Binance 418/429/451, bid/ask are null; null = no book (venue does not list the symbol, or the Lighter fetch failed: Lighter has no snapshot book)."},"book_ts":{"type":["integer","null"],"description":"Unix seconds of the book quote."},"funding_rate_1h":{"type":["number","null"],"description":"Current funding rate per hour (decimal; positive = longs pay shorts)."},"funding_apr":{"type":["number","null"],"description":"funding_rate_1h x 8760 (simple annualized, decimal)."},"funding_interval_h":{"type":["number","null"],"description":"Hours between funding settlements for this symbol at this venue. null = could not be obtained from the venue (see funding_interval_source)."},"funding_rate_next":{"type":["number","null"],"description":"Rate that would apply at the next settlement if unchanged: Binance's own per-settlement rate (premiumIndex lastFundingRate) when funding_rate_source is venue, else funding_rate_1h x funding_interval_h. null if the interval is unknown."},"next_funding_time":{"type":["integer","null"],"description":"Unix seconds of the next funding settlement. null = unavailable; never guessed for Binance."},"next_funding_source":{"type":["string","null"],"description":"venue = reported by the venue (Binance premiumIndex nextFundingTime); computed = next top of the hour (Hyperliquid and Lighter only: both settle hourly on the hour and neither API reports the time); unavailable = the venue could not be queried, value is null."},"funding_rate_source":{"type":["string","null"],"description":"venue = the venue's own API; lighter_feed = Binance rate relayed by Lighter's /funding-rates comparison feed (an 8h-equivalent rate, divided by 8), used only when Binance itself could not be queried."},"funding_interval_source":{"type":["string","null"],"description":"venue = from the venue's API (Binance /fapi/v1/fundingInfo); venue_schedule = fixed hourly schedule stated in the venue docs (Hyperliquid, Lighter); unavailable = could not be obtained, value is null."}}}},"spreads":{"type":"array","description":"Every ordered pair of venues that both have a book: both directions are listed (A->B and B->A).","items":{"type":"object","properties":{"buy":{"type":"string","description":"Venue where you buy (at its ask)."},"sell":{"type":"string","description":"Venue where you sell (at its bid)."},"gross_bp":{"type":"number","description":"(sell bid / buy ask - 1) x 10,000. Positive = crossed books."},"net_bp":{"type":"number","description":"gross_bp minus estimated taker fees for four fills (enter and exit both legs), in basis points."},"carry_apr":{"type":["number","null"],"description":"funding_apr of the sell venue minus the buy venue (what a short-sell/long-buy pair would earn, annualized)."}}}}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix timestamp in seconds for the snapshot used in this response.","schema":{"type":"integer"}},"X-FTK-Age-Seconds":{"description":"Age of that snapshot in seconds when the response was generated.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"No fresh snapshot; payment is not settled."},"404":{"description":"If fewer than 2 venues list the symbol: free 404 whose body names the one venue that lists it, or none (`venues_listed`), and nothing else. It is answered before the paywall (no 402, no payment needed) whenever cached listings decide it; if a venue's listing is unknown at that moment (Binance listings or that venue's last snapshot unavailable) the request goes through the paywall and gets the same 404, and the payment is not settled."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"any symbol from a snapshot at least 15 minutes old, snapshot books only (no request-time book, no Binance funding schedule), `spreads` empty","calls_per_ip_per_utc_day":30,"quota_group":"bundle","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"network":"eip155:8453","asset":"USDC"}}},"/v1/funding":{"get":{"summary":"Cross-venue funding opportunities","description":"One row per symbol: the best venue pair to short/long for funding carry, current/24h/7d annualized spread, entry basis, fees, liquidity and a capacity estimate. Sorted by usd_day descending. Free fixed sample with the same schema: /v1/sample/funding. Free tier: add ?free=1 (no payment header) for top 20 rows from a snapshot at least 15 minutes old; 100 calls per client IP per UTC day, then the normal 402.","operationId":"v1_funding_v1_funding_get","parameters":[{"name":"min_vol","in":"query","required":false,"schema":{"type":"number","default":1000000.0,"title":"Min Vol"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sym":{"type":"string","description":"Base asset symbol, normalized across venues (e.g. BTC)."},"short":{"type":"string","description":"Venue with the highest current funding among venues that also have price and volume (the leg to short)."},"long":{"type":"string","description":"Venue with the lowest current funding among those venues (the leg to long)."},"apr_now":{"type":"number","description":"Current funding spread short minus long, annualized simple rate as a decimal (0.10 = 10%/yr)."},"apr_24h":{"type":["number","null"],"description":"Same spread from hourly averages over the last 24h; null if history is missing."},"apr_7d":{"type":["number","null"],"description":"Same spread from hourly averages over the last 7 days; null if history is missing."},"entry_bp":{"type":["number","null"],"description":"Entry basis in basis points: short-venue bid / long-venue ask - 1 (positive = favourable)."},"cost_bp":{"type":"number","description":"Estimated round-trip taker fees for four fills, in basis points."},"vol24":{"type":"number","description":"24h USD volume of the weaker leg."},"oi":{"type":"number","description":"Open interest in USD of the weaker leg (0 if unknown)."},"cap":{"type":"number","description":"Rough capacity estimate in USD: min(1% of vol24, 2% of oi)."},"usd_day":{"type":"number","description":"cap x max(base APR, 0) / 365, base = apr_7d if >=48h history else apr_24h else apr_now. Default sort key (descending)."},"n_venues":{"type":"integer","description":"Number of venues quoting funding for this symbol."},"short_fr":{"type":"number","description":"Annualized funding rate of the short leg (decimal)."},"long_fr":{"type":"number","description":"Annualized funding rate of the long leg (decimal)."},"ref_hi":{"type":"string","description":"Venue with the highest funding including funding-only venues."},"ref_lo":{"type":"string","description":"Venue with the lowest funding including funding-only venues."},"apr_all":{"type":"number","description":"Annualized spread between ref_hi and ref_lo (decimal)."}}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix timestamp in seconds for the snapshot used in this response.","schema":{"type":"integer"}},"X-FTK-Age-Seconds":{"description":"Age of that snapshot in seconds when the response was generated.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"No fresh snapshot; payment is not settled."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"top 20 rows from a snapshot at least 15 minutes old","calls_per_ip_per_utc_day":100,"quota_group":"market","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"network":"eip155:8453","asset":"USDC"}}},"/v1/spreads":{"get":{"summary":"Cross-venue spreads","description":"One row per symbol: the venue with the highest bid vs the venue with the lowest ask, gross and after estimated taker fees, plus the funding carry of that pair. Sorted by net_bp descending. Free fixed sample with the same schema: /v1/sample/spreads. Free tier: add ?free=1 (no payment header) for top 20 rows from a snapshot at least 15 minutes old; 100 calls per client IP per UTC day, then the normal 402.","operationId":"v1_spreads_v1_spreads_get","parameters":[{"name":"min_vol","in":"query","required":false,"schema":{"type":"number","default":1000000.0,"title":"Min Vol"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sym":{"type":"string","description":"Base asset symbol, normalized across venues."},"sell":{"type":"string","description":"Venue with the highest best bid (where you would sell)."},"buy":{"type":"string","description":"Venue with the lowest best ask (where you would buy)."},"gross_bp":{"type":"number","description":"(sell-venue bid / buy-venue ask - 1) x 10,000."},"net_bp":{"type":"number","description":"gross_bp minus estimated taker fees for four fills (enter + exit), in basis points. Sort key (descending)."},"vol24":{"type":"number","description":"24h USD volume of the weaker leg."},"carry_apr":{"type":"number","description":"Funding of the sell venue minus the buy venue, annualized (decimal)."}}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix timestamp in seconds for the snapshot used in this response.","schema":{"type":"integer"}},"X-FTK-Age-Seconds":{"description":"Age of that snapshot in seconds when the response was generated.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"No fresh snapshot; payment is not settled."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"top 20 rows from a snapshot at least 15 minutes old","calls_per_ip_per_utc_day":100,"quota_group":"market","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"network":"eip155:8453","asset":"USDC"}}},"/v1/polymarket/wallet":{"get":{"summary":"Polymarket wallet: true PnL and strategy breakdown","description":"One Polymarket wallet: Polymarket's own PnL (economic_pnl) next to the true PnL, which counts positions that have no market price (mostly NegRisk placeholder outcomes, valued at cost by Polymarket) at 0, as of the end of yesterday UTC; plus a strategy breakdown (label, PnL split into realized / unrealized / fees / rebates for all time, 30d and 7d, activity, capital, categories) for wallets in our scored set. Other wallets get the true PnL only (`coverage` = true_pnl_only, `strategy` = null). An address that is not 0x + 40 hex gets a free 400. Pay-per-call is served only from the cache: our scored wallets (precomputed daily, in rank order, starting 00:05 UTC) and wallets already computed. A wallet not yet computed for today's cut is answered from the most recent cut at most 48 hours old, with `as_of`, `snapshot_date` and `previous_cut` = true (header `X-FTK-Snapshot-Date`); a wallet with no cached cut in that window gets a free 404 before any 402 saying so. With a monthly-plan key (`x-api-key`) an uncached wallet is queued instead: free 503 with Retry-After and `queue_position`, computed in the background in about 2 minutes (Polymarket opens one new positions snapshot per client every 30 s); at most 3 waiting or being computed and 30 new wallets per UTC day per key. Free cached or delayed sample with the same schema: /v1/sample/polymarket-wallet. Free tier: add ?free=1 (no payment header) for cached wallets only (our scored set and wallets already computed today): Polymarket PnL, true PnL and the difference; no strategy breakdown, no PnL split; 10 calls per client IP per UTC day, then the normal 402.","operationId":"v1_pm_wallet_v1_polymarket_wallet_get","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","description":"Polymarket proxy wallet address (0x + 40 hex). Required.","title":"Address"},"description":"Polymarket proxy wallet address (0x + 40 hex). Required."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address, lower case."},"user_name":{"type":["string","null"],"description":"Polymarket display name if the wallet is in our scored set."},"profile_url":{"type":"string","description":"Public profile URL of the wallet."},"coverage":{"type":"string","description":"full = true PnL and strategy breakdown; true_pnl_only = wallet outside our scored set, strategy is null."},"as_of":{"type":"integer","description":"Unix seconds of the snapshot cut used for this answer (normally 00:00 UTC today = end of yesterday; one day earlier when previous_cut is true)."},"as_of_date":{"type":"string","description":"UTC date (YYYY-MM-DD) whose end is the snapshot cut."},"snapshot_date":{"type":"string","description":"Snapshot date this answer was computed for (same as as_of_date)."},"latest_snapshot_date":{"type":"string","description":"Today's snapshot date (end of yesterday UTC)."},"previous_cut":{"type":"boolean","description":"true when the wallet is not computed for today's cut yet and is answered from the most recent cut at most 48 hours old (the daily precompute runs through the day in rank order)."},"native_total":{"type":"number","description":"Polymarket's own economic PnL at the cut (realized + unrealized + rebates), USDC."},"native_realized":{"type":["number","null"],"description":"Polymarket's realized PnL at the cut, USDC."},"native_unrealized":{"type":["number","null"],"description":"Polymarket's unrealized PnL at the cut, USDC."},"unpriced_value":{"type":"number","description":"Value Polymarket gives to positions that have no market price (valued at cost; mostly NegRisk placeholder outcomes), USDC."},"true_total":{"type":"number","description":"native_total - unpriced_value: PnL with unpriced positions counted at 0."},"difference":{"type":"number","description":"true_total - native_total (0 or negative)."},"n_positions":{"type":"integer","description":"Positions in the snapshot."},"n_unpriced_positions":{"type":"integer","description":"Positions valued at cost (no market price)."},"method":{"type":"string","description":"One-sentence definition of the numbers above."},"computed_at":{"type":"integer","description":"Unix seconds when this wallet's true PnL was computed (cached per wallet per day)."},"strategy":{"type":["object","null"],"description":"Strategy breakdown from the daily scored set; null when coverage is true_pnl_only.","properties":{"label":{"type":["string","null"],"description":"Strategy label: negrisk_split_convert, merge_arb, latency_bot, market_maker, directional or other."},"label_zh":{"type":["string","null"],"description":"Label in Chinese."},"rules_version":{"type":["string","null"],"description":"Version of the labelling rules."},"label_reasons":{"type":"array","description":"Why the label was given (rule hits)."},"pnl":{"type":"object","description":"All-time PnL: realized, unrealized, fees, rebates, net (USDC)."},"pnl_30d":{"type":"object","description":"Same split for the last 30 days."},"pnl_7d":{"type":"object","description":"Same split for the last 7 days."},"pnl_check":{"type":"object","description":"Cash-flow identity check: equity_pnl, diff_vs_native, native_unreliable, checked_at."},"volume_usdc":{"type":["number","null"],"description":"Traded volume, USDC."},"trade_count":{"type":["number","null"],"description":"Number of trades."},"active_days":{"type":["integer","null"],"description":"Days with activity."},"win_day_ratio":{"type":["number","null"],"description":"Share of active days with positive PnL."},"max_daily_loss":{"type":["number","null"],"description":"Worst daily PnL, USDC."},"avg_hold_hours":{"type":["number","null"],"description":"Average holding time, hours."},"peak_capital_usdc":{"type":["number","null"],"description":"Peak cost of simultaneously open positions (upper bound of capital used)."},"main_category":{"type":["string","null"],"description":"Market category with the largest share of cost."},"categories":{"type":"array","description":"Per category: category, cost_usdc, share, n_positions."},"maker_share":{"type":["number","null"],"description":"Share of volume as maker (sampled)."},"maker_taker_note":{"type":["string","null"],"description":"How maker_share was measured."},"updated_at":{"type":["integer","null"],"description":"Unix seconds the breakdown was computed."},"data_fetched_at":{"type":["integer","null"],"description":"Unix seconds the underlying data was fetched."}}},"data_note":{"type":"string","description":"Source and non-affiliation statement."}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix seconds of the data cut (wallet: snapshot cut; leaderboard: scored-set computed_at).","schema":{"type":"integer"}},"X-FTK-Snapshot-Date":{"description":"Snapshot date (YYYY-MM-DD) the answer was computed for; the previous day's (at most 48 h old) when today's cut is not computed for this wallet yet (body previous_cut = true).","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"Wallet data missing or stale, or upstream snapshot slot busy (Retry-After); not charged, normally answered before any 402."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"cached wallets only (our scored set and wallets already computed today): Polymarket PnL, true PnL and the difference; no strategy breakdown, no PnL split","calls_per_ip_per_utc_day":10,"quota_group":"pm-wallet","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.25"},"network":"eip155:8453","asset":"USDC"}}},"/v1/polymarket/leaderboard":{"get":{"summary":"Polymarket wallets ranked by PnL after fees, true-PnL corrected","description":"Wallets in our scored set ranked by net PnL after fees (realized + unrealized + rebates). Wallets whose cash-flow identity does not reconcile with Polymarket's own PnL are dropped. For window=all, NegRisk split+convert wallets are ranked by their true PnL (placeholder outcomes at 0, `pnl_source` placeholder_corrected); for 30d and 7d that correction does not exist yet, so those wallets are left out (counted in `excluded`). The response states coverage (how many wallets, which samples), when it was computed and a survivorship-bias note. Rebuilt once a day. Bad parameters get a free 422. Free cached or delayed sample with the same schema: /v1/sample/polymarket-leaderboard. Free tier: add ?free=1 (no payment header) for top 10 rows (same filters); 10 calls per client IP per UTC day, then the normal 402.","operationId":"v1_pm_leaderboard_v1_polymarket_leaderboard_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","description":"PnL window: all (all time, true-PnL corrected), 30d or 7d.","default":"30d","title":"Window"},"description":"PnL window: all (all time, true-PnL corrected), 30d or 7d."},{"name":"max_capital","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Only wallets whose capital estimate (USDC) is at most this, e.g. 5000 for a small-capital board.","title":"Max Capital"},"description":"Only wallets whose capital estimate (USDC) is at most this, e.g. 5000 for a small-capital board."},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only wallets with this strategy label.","title":"Label"},"description":"Only wallets with this strategy label."},{"name":"min_active_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only wallets active on at least this many days in the window.","title":"Min Active Days"},"description":"Only wallets active on at least this many days in the window."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Rows returned (1-200).","default":50,"title":"Limit"},"description":"Rows returned (1-200)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"string","description":"all, 30d or 7d."},"filters":{"type":"object","description":"The filters applied (max_capital, label, min_active_days, limit)."},"rules_version":{"type":"string","description":"Version of the labelling rules."},"coverage":{"type":"object","description":"wallets_scored (wallets with results), samples (wallets per sample: month_top, all_top, band_sample, ...), description."},"computed_at":{"type":"integer","description":"Unix seconds the scored set was last computed."},"data_fetched_at":{"type":["integer","null"],"description":"Unix seconds of the newest underlying data fetch."},"generated_at":{"type":"integer","description":"Unix seconds this response was built."},"n_ranked":{"type":"integer","description":"Wallets that passed the filters and exclusions (before limit)."},"excluded":{"type":"object","description":"Wallets left out: equity_identity_failed (cash-flow identity does not reconcile), split_convert_uncorrected (split+convert wallets without a true-PnL correction for this window)."},"survivorship_note":{"type":"string","description":"The samples were chosen among wallets that already made money: survivorship bias."},"data_note":{"type":"string","description":"Source and non-affiliation statement."},"rows":{"type":"array","description":"Ranked wallets, best first.","items":{"type":"object","properties":{"rank":{"type":"integer","description":"1 = highest net."},"address":{"type":"string","description":"Wallet address, lower case."},"user_name":{"type":["string","null"],"description":"Polymarket display name."},"profile_url":{"type":"string","description":"Public profile URL."},"label":{"type":["string","null"],"description":"Strategy label."},"label_zh":{"type":["string","null"],"description":"Label in Chinese."},"net":{"type":"number","description":"Sort key: net PnL in the window after fees (for placeholder_corrected rows: true_total)."},"realized":{"type":["number","null"],"description":"Realized PnL in USDC (after fees)."},"unrealized":{"type":["number","null"],"description":"Unrealized PnL in USDC at current prices. For placeholder_corrected rows, minus the unpriced value."},"fees":{"type":["number","null"],"description":"Trading fees in USDC (negative; already inside realized/unrealized, shown for information)."},"rebates":{"type":["number","null"],"description":"Maker/taker rebates, rewards and other wallet income in USDC."},"true_total":{"type":["number","null"],"description":"All-time true PnL (window=all only; equals net unless placeholder_corrected)."},"capital_estimate":{"type":["number","null"],"description":"Capital estimate, USDC (peak account equity when the identity reconciles, else peak open cost)."},"peak_capital_usdc":{"type":["number","null"],"description":"Peak cost of simultaneously open positions."},"active_days":{"type":["integer","null"],"description":"Active days in the window."},"win_day_ratio":{"type":["number","null"],"description":"Share of active days with positive PnL in the window."},"pnl_source":{"type":"string","description":"native (Polymarket's numbers) or placeholder_corrected (true PnL)."}}}}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix seconds of the data cut (wallet: snapshot cut; leaderboard: scored-set computed_at).","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"Wallet data missing or stale, or upstream snapshot slot busy (Retry-After); not charged, normally answered before any 402."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"top 10 rows (same filters)","calls_per_ip_per_utc_day":10,"quota_group":"pm-leaderboard","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.50"},"network":"eip155:8453","asset":"USDC"}}},"/v1/polymarket/btc-edge":{"get":{"summary":"Polymarket BTC price-target markets vs options-implied probability, after fees","description":"Every open Polymarket BTC price-target market (above $K at expiry, price range at expiry, reach / dip to $K before the end) with our options-implied probability (p_model), the Polymarket bid/ask/mid, the cost per share to buy 400, 1500 or 5000 USDC of YES or NO by walking the book with the taker fee, and the edge after fees for each side. Derived values only: no option quotes, implied volatilities or index prices. Cross-section every 10 minutes; older than 20 minutes gets a free 503 with Retry-After (not charged). Bad parameters get a free 422. p_model is a risk-neutral probability (volatility risk premium included), not a forecast; an edge is a price gap, not a promise of profit. Free cached or delayed sample with the same schema: /v1/sample/polymarket-btc-edge. Free tier: add ?free=1 (no payment header) for the 5 nearest-expiry markets with p_model and Polymarket bid/ask/mid; no fill costs, no edge after fees, no sizes; 20 calls per client IP per UTC day, then the normal 402.","operationId":"v1_pm_btc_edge_v1_polymarket_btc_edge_get","parameters":[{"name":"tier","in":"query","required":false,"schema":{"type":"integer","description":"USDC amount the fill cost is computed for (walks the Polymarket book, taker fee included): 400, 1500 or 5000. Selects the tier used for edge, side, sorting and min_edge; all three tiers are always in `tiers`.","default":400,"title":"Tier"},"description":"USDC amount the fill cost is computed for (walks the Polymarket book, taker fee included): 400, 1500 or 5000. Selects the tier used for edge, side, sorting and min_edge; all three tiers are always in `tiers`."},{"name":"min_edge","in":"query","required":false,"schema":{"type":"number","description":"Only markets whose best edge at the tier is at least this (probability units: 0.02 = 2 cents per share). Default 0 = only markets with a positive edge; -1 returns every market.","default":0,"title":"Min Edge"},"description":"Only markets whose best edge at the tier is at least this (probability units: 0.02 = 2 cents per share). Default 0 = only markets with a positive edge; -1 returns every market."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only one market type: terminal_above (above $K at expiry), terminal_range (inside a price range at expiry), touch_up (reaches $K before the end), touch_down (dips to $K before the end).","title":"Kind"},"description":"Only one market type: terminal_above (above $K at expiry), terminal_range (inside a price range at expiry), touch_up (reaches $K before the end), touch_down (dips to $K before the end)."},{"name":"min_hours","in":"query","required":false,"schema":{"type":"number","description":"Only markets ending at least this many hours from now (default 6).","default":6,"title":"Min Hours"},"description":"Only markets ending at least this many hours from now (default 6)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"measured_at":{"type":"integer","description":"Unix seconds the cross-section started."},"age_seconds":{"type":"integer","description":"Age of the cross-section when this response was built (at most 1200; older gets a free 503)."},"generated_at":{"type":"integer","description":"Unix seconds this response was built."},"tier":{"type":"integer","description":"Tier used for edge, side, sorting and min_edge."},"tiers_available":{"type":"array","description":"Tier amounts in USDC (400, 1500, 5000)."},"filters":{"type":"object","description":"The filters applied (min_edge, kind, min_hours)."},"n_markets":{"type":"integer","description":"Markets in the cross-section before filters."},"n_returned":{"type":"integer","description":"Rows returned."},"method":{"type":"string","description":"How p_model and the costs are computed, and what they are not."},"data_note":{"type":"string","description":"Derived-values-only, non-affiliation and personal-use statement."},"rows":{"type":"array","description":"One row per Polymarket market, largest edge first.","items":{"type":"object","properties":{"market_id":{"type":"string","description":"Polymarket market id."},"condition_id":{"type":["string","null"],"description":"Polymarket condition id."},"event":{"type":"string","description":"Polymarket event slug."},"question":{"type":"string","description":"Market title."},"kind":{"type":"string","description":"terminal_above, terminal_range, touch_up or touch_down."},"strike":{"type":["number","array"],"description":"Threshold in USD as Polymarket states it (Binance BTC/USDT); [low, high] for a range, null for an open end."},"end":{"type":"string","description":"Market end time (ISO 8601, UTC)."},"hours_to_end":{"type":"number","description":"Hours from now to the end time."},"p_model":{"type":"number","description":"Options-implied risk-neutral probability of YES (our model; see method)."},"pm_bid":{"type":["number","null"],"description":"Best YES bid on Polymarket."},"pm_ask":{"type":["number","null"],"description":"Best YES ask."},"pm_mid":{"type":["number","null"],"description":"YES mid price (bid + ask) / 2."},"no_bid":{"type":["number","null"],"description":"Best NO bid."},"no_ask":{"type":["number","null"],"description":"Best NO ask."},"gap_mid":{"type":["number","null"],"description":"p_model minus pm_mid (before costs)."},"fee_rate":{"type":"number","description":"Polymarket taker fee rate for the market (fee per share = rate x p x (1 - p))."},"yes_cost":{"type":["number","null"],"description":"Cost per YES share to buy the tier amount, average fill price plus taker fee (null: no asks). At the selected tier."},"yes_fill_ratio":{"type":["number","null"],"description":"Share of the tier amount the YES asks can absorb (1 = fully filled). At the selected tier."},"edge_yes":{"type":["number","null"],"description":"p_model minus yes_cost. At the selected tier."},"no_cost":{"type":["number","null"],"description":"Cost per NO share for the tier amount, fee included. At the selected tier."},"no_fill_ratio":{"type":["number","null"],"description":"Share of the tier amount the NO asks can absorb. At the selected tier."},"edge_no":{"type":["number","null"],"description":"(1 - p_model) minus no_cost. At the selected tier."},"edge":{"type":["number","null"],"description":"max(edge_yes, edge_no) at the selected tier, after fees and spread."},"side":{"type":["string","null"],"description":"YES or NO when that edge is positive, else null."},"tiers":{"type":"object","description":"All three tiers keyed \"400\", \"1500\", \"5000\"; each has yes_cost, yes_fill_ratio, edge_yes, no_cost, no_fill_ratio, edge_no."}}}}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix seconds the cross-section started.","schema":{"type":"integer"}},"X-FTK-Age-Seconds":{"description":"Age of the cross-section in seconds (at most 1200).","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"Cross-section missing or older than 20 minutes (Retry-After); not charged, answered before any 402 and re-checked after payment verification."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"the 5 nearest-expiry markets with p_model and Polymarket bid/ask/mid; no fill costs, no edge after fees, no sizes","calls_per_ip_per_utc_day":20,"quota_group":"pm-btc-edge","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.50"},"network":"eip155:8453","asset":"USDC"}}},"/v1/polymarket/gpu-rental":{"get":{"summary":"Polymarket GPU rental-price markets vs public GPU rental prices","description":"Every open Polymarket GPU rental-price market (monthly average above $K, value on one day inside a bracket, reach / dip to $K) with the Polymarket bid/ask/mid, implied probability and days remaining in the settlement window; per event the market-implied median and mean from the strike ladder or brackets; live public on-demand list prices per GPU-hour (min and median) from GPU.ai, Akash and Lambda and the gap between the market-implied mean and them; and our model on our own rental index once it has enough history. Also the settlement index (Ornn OCPI, from Ornn's public API): month-to-date average and latest value, our model probability fitted on it, and our own index compared with it. Snapshot every 5 minutes; older than 20 minutes gets a free 503 with Retry-After (not charged). Bad parameters get a free 422. A gap is a comparison of price levels, not a promise of profit. Free cached or delayed sample with the same schema: /v1/sample/polymarket-gpu-rental. Free tier: add ?free=1 (no payment header) for a snapshot at least 15 minutes old: per market Polymarket bid/ask, implied probability and days remaining, plus the public rental prices; no settlement-index values, no model prices or gaps, no per-event implied averages, no own index; 10 calls per client IP per UTC day, then the normal 402.","operationId":"v1_pm_gpu_rental_v1_polymarket_gpu_rental_get","parameters":[{"name":"gpu","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only one GPU model (rows, events, rental prices and own index).","title":"Gpu"},"description":"Only one GPU model (rows, events, rental prices and own index)."},{"name":"family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only one market family: avg (monthly average above $K), end (value on one day inside a price bracket), hit (reaches / dips to $K before the end).","title":"Family"},"description":"Only one market family: avg (monthly average above $K), end (value on one day inside a price bracket), hit (reaches / dips to $K before the end)."},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only markets whose settlement window ends in this month, YYYY-MM (e.g. 2026-12).","title":"Period"},"description":"Only markets whose settlement window ends in this month, YYYY-MM (e.g. 2026-12)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"measured_at":{"type":"integer","description":"Unix seconds of the Polymarket order-book snapshot."},"age_seconds":{"type":"integer","description":"Age of the snapshot when this response was built (at most 1200; older gets a free 503)."},"generated_at":{"type":"integer","description":"Unix seconds this response was built."},"filters":{"type":"object","description":"The filters applied (gpu, family, period)."},"n_markets":{"type":"integer","description":"Open markets in the snapshot before filters."},"n_returned":{"type":"integer","description":"Rows returned."},"method":{"type":"string","description":"How every number is computed, and what it is not."},"data_note":{"type":"string","description":"Sources, non-affiliation and personal-use statement."},"rental":{"type":"object","description":"Public GPU rental list prices: as_of, by_gpu, sources, skipped.","properties":{"as_of":{"type":["integer","null"],"description":"Unix seconds of the last hourly fetch."},"by_gpu":{"type":"object","description":"Per GPU model: min and median on-demand USD per GPU-hour across all offers, and per source (`rental.by_gpu.<GPU>.sources.<source>`: min, median, n_offers, available)."},"sources":{"type":"array","description":"Sources read: id, name, url, kind, ok, n_offers."},"skipped":{"type":"array","description":"Sources we do NOT read and why (terms or robots.txt forbid automated reading, login required, ...): name, url, reason."}}},"own_index":{"type":"object","description":"FTK own rental index (from the public list prices only): name, method, min_days_for_model, by_gpu (history_days, latest_date, latest_value, latest_provisional, latest_n_sources, model_ready, note)."},"events":{"type":"array","description":"One row per Polymarket event (a strike ladder or a bracket set).","items":{"type":"object","properties":{"event":{"type":"string","description":"Polymarket event slug."},"gpu":{"type":"string","description":"GPU model."},"family":{"type":"string","description":"avg, end or hit."},"window_start":{"type":"string","description":"First day of the settlement window (YYYY-MM-DD)."},"window_end":{"type":"string","description":"Last day of the settlement window."},"days_remaining":{"type":"integer","description":"Days of the window from today (UTC) to its end, today included."},"n_markets":{"type":"integer","description":"Open markets in the event."},"implied_median":{"type":["number","null"],"description":"Market-implied median of the settlement value (USD per GPU-hour), from the mids; null for hit events."},"implied_mean":{"type":["number","null"],"description":"Market-implied mean of the settlement value."},"rental_min":{"type":["number","null"],"description":"Lowest public on-demand list price per GPU-hour for this GPU."},"rental_median":{"type":["number","null"],"description":"Median public on-demand list price per GPU-hour."},"gap_implied_mean_vs_rental_median":{"type":["number","null"],"description":"implied_mean minus rental_median (USD)."},"ratio_implied_mean_to_rental_median":{"type":["number","null"],"description":"implied_mean / rental_median."},"ocpi_mtd_avg":{"type":["number","null"],"description":"Ornn OCPI month-to-date average (mean of the published daily values this month)."},"ocpi_mtd_days":{"type":"integer","description":"Days in that average."},"gap_implied_mean_vs_ocpi_mtd":{"type":["number","null"],"description":"implied_mean minus the month-to-date average."}}}},"rows":{"type":"array","description":"One row per open Polymarket market.","items":{"type":"object","properties":{"market_id":{"type":"string","description":"Polymarket market id."},"condition_id":{"type":["string","null"],"description":"Polymarket condition id."},"event":{"type":"string","description":"Polymarket event slug."},"question":{"type":"string","description":"Market title."},"family":{"type":"string","description":"avg, end or hit."},"kind":{"type":"string","description":"avg_above, end_bracket, hit_up or hit_down."},"gpu":{"type":"string","description":"GPU model."},"strike":{"type":["number","null"],"description":"K for avg_above / hit markets (USD per GPU-hour)."},"low":{"type":["number","null"],"description":"Bracket low (inclusive) for end_bracket; null = open."},"high":{"type":["number","null"],"description":"Bracket high (exclusive) for end_bracket; null = open."},"window_start":{"type":"string","description":"First day of the settlement window."},"window_end":{"type":"string","description":"Last day of the settlement window."},"window_days":{"type":"integer","description":"Days in the window."},"days_elapsed":{"type":"integer","description":"Days of the window before today (UTC)."},"days_remaining":{"type":"integer","description":"Days of the window from today to its end, today included."},"pm_bid":{"type":["number","null"],"description":"Best YES bid."},"pm_ask":{"type":["number","null"],"description":"Best YES ask."},"pm_mid":{"type":["number","null"],"description":"YES mid."},"no_bid":{"type":["number","null"],"description":"Best NO bid (1 - YES ask)."},"no_ask":{"type":["number","null"],"description":"Best NO ask (1 - YES bid)."},"spread":{"type":["number","null"],"description":"pm_ask - pm_bid."},"bid_size":{"type":["number","null"],"description":"Shares at the best bid."},"ask_size":{"type":["number","null"],"description":"Shares at the best ask."},"implied_p":{"type":["number","null"],"description":"Market-implied probability of YES (= pm_mid)."},"model_own_p":{"type":["number","null"],"description":"Our model probability on the FTK own rental index; null until own_index has enough history (see own_index.by_gpu.<GPU>.note)."},"gap_own":{"type":["number","null"],"description":"model_own_p minus pm_mid."},"ocpi_mtd_avg":{"type":["number","null"],"description":"Ornn OCPI average of the published days in the row's month (avg markets) or the current month."},"ocpi_mtd_days":{"type":"integer","description":"Days in that average."},"ocpi_last_value":{"type":["number","null"],"description":"Latest published Ornn OCPI value."},"ocpi_last_date":{"type":["string","null"],"description":"Date of that value."},"model_p":{"type":["number","null"],"description":"Our model probability fitted on Ornn OCPI daily values (published days fixed, remaining days simulated)."},"gap_model":{"type":["number","null"],"description":"model_p minus pm_mid."}}}},"ocpi_as_of":{"type":"string","description":"Date of the latest Ornn OCPI value used."},"ocpi_source":{"type":"string","description":"Where the OCPI values come from and how the OCPI-based fields are computed."},"own_vs_ocpi":{"type":"object","description":"Per GPU: our own rental index vs OCPI on the latest day both exist (own, ocpi, ratio, date) and the mean ratio over all overlapping days (overlap_days, mean_ratio)."}}}}},"headers":{"X-FTK-As-Of":{"description":"Unix seconds of the order-book snapshot.","schema":{"type":"integer"}},"X-FTK-Age-Seconds":{"description":"Age of the snapshot in seconds (at most 1200).","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"x402 payment required"},"503":{"description":"Snapshot missing or older than 20 minutes (Retry-After); not charged, answered before any 402 and re-checked after payment verification."}},"x-free-tier":{"query":"free=1","header":"X-FTK-Free: 1","what":"a snapshot at least 15 minutes old: per market Polymarket bid/ask, implied probability and days remaining, plus the public rental prices; no settlement-index values, no model prices or gaps, no per-event implied averages, no own index","calls_per_ip_per_utc_day":10,"quota_group":"pm-gpu-rental","over_quota":"402 payment required (same price)"},"security":[{"X402Payment":[]}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.25"},"network":"eip155:8453","asset":"USDC"}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"X402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 payment proof sent after the initial 402 challenge."}}},"servers":[{"url":"https://api.ftkai.io"}]}