Taiwan Securities Lending Balance & Borrow Fee API (TWSE+TPEx)
Pricing
from $0.50 / 1,000 results
Taiwan Securities Lending Balance & Borrow Fee API (TWSE+TPEx)
Shares on loan for every Taiwan listed & OTC stock since 2004 — the exchange SLB system, broker OTC lending and lending-account borrowing — plus every SLB trade with its borrow fee rate and each securities firm's lending book. Official TWSE data, cross-checked report against report.
Pricing
from $0.50 / 1,000 results
Rating
0.0
(0)
Developer
chris
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
Share
Taiwan Securities Lending Balance & SLB Borrow Fee API (借券餘額・借券成交明細・借券費率)
How many shares of every Taiwan stock are out on loan, through which channel, and at what borrow fee? Daily securities lending balances for every TWSE-listed and TPEx OTC stock back to 2004-11-22, split into the exchange's SLB system, broker OTC lending and lending-account borrowing — plus every trade struck on the SLB system with its fee rate and term, and each securities firm's lending book.
借券餘額 is the short-side number Taiwan's financial press quotes every day ("TSMC securities lending balance hits a new high"). It is not the same as the SBL short-sale balance: a lending balance counts every borrowed share not yet returned, whether it was sold short, used for hedging or held for settlement. This Actor publishes the exchange's own figures, splits them the way the exchange does, and checks them against a separate trade-by-trade report.
Output
Four record types in one dataset, told apart by record_type. Real rows from 2026-10-08:
stock_balance — shares on loan per stock per day (TWT72U 借券餘額表, all four tables merged on one row)
{"record_type": "stock_balance","date": "2026-10-08","market": "TWSE","stock_code": "2330","stock_name": "台積電","close_price": 2550.0,"balance_prev_shares": 185732000,"borrowed_shares": 2592000,"returned_shares": 1010000,"balance_shares": 187314000,"balance_change_shares": 1582000,"balance_value_twd": 477650700000,"slb_balance_shares": 179834000,"slb_borrowed_shares": 2591000,"nlb_balance_shares": 7480000,"nlb_borrowed_shares": 1000,"lon_balance_shares": 11185000,"lon_borrowed_shares": 0,"balance_identity_ok": true,"value_matches_close": true,"trade_log_matches": true}
(Each channel also carries _balance_prev_shares, _returned_shares and _balance_value_twd; trimmed here.)
market_total — the same columns for TWSE, TPEx and the whole market (market: "ALL"). On 2026-10-08 the whole market had 28,287,926,000 shares on loan worth NT$3.70 trillion.
slb_trade — every trade on the TWSE SLB system, with its borrow fee (t13sa710 歷史借券成交明細)
{"record_type": "slb_trade","date": "2026-10-08","market": "TWSE","stock_code": "2330","stock_name": "台積電","trade_method": "negotiated","trade_method_zh": "議借","lots": 591,"shares": 591000,"fee_rate_pct": 4.73,"close_price": 2550.0,"trade_value_twd": 1507050000.0,"agreed_return_date": "2027-04-08","agreed_days": 182,"fee_rate_changed": false}
broker_activity — each securities firm's and finance house's borrowed and lent balances (TWTBBU 證商/證金辦理有價證券借貸業務概況表)
{"record_type": "broker_activity","date": "2026-10-08","broker_code": "9800","broker_name": "元大","borrowed_balance_shares": 4079772000,"borrowed_balance_value_twd": 248965569920,"lent_balance_shares": 4502903000,"lent_balance_value_twd": 305828407620}
A default daily run returns about 2,070 rows (one per stock with a balance, plus three totals) in five requests.
The three lending channels
The exchange publishes four balance tables. This Actor puts them side by side on one row:
| Prefix | Table | What it is | History |
|---|---|---|---|
| (none) | SLBNLB 合計表 | All lending: SLB system + OTC lending | 2004-11-22 → |
slb_ | 證交所借券系統 | Borrowed through the exchange's SLB system (excluding lending accounts) | 2004-11-22 → |
nlb_ | 證商/證金營業處所 | Borrowed from securities firms and finance houses over the counter | 2008-04-09 → |
lon_ | 借貸專戶自證交所借券系統借入 | Firms' lending accounts borrowing from the SLB system | 2008-09-09 → |
The total is exactly SLB + NLB, column by column, per the report's own footnote. LON is not part of SLB — the SLB table's footnote excludes lending-account borrowing — so it is a separate channel, not a subset. Channel columns are null before that channel's report begins, and null when includeChannelBreakdown is off.
Verification
Every figure below was measured against the live reports before release.
- The SLB trade log reconciles with the balance table, stock by stock. SLB borrowing plus lending-account borrowing equals the lots traded on the SLB system that session × 1,000 — two separate reports — for every stock on six sessions sampled from 2010 to 2026 (393 of 393 stocks on 2026-10-07). Each row records the result in
trade_log_matches. - Until 2007-06-29 the balance report booked an SLB trade one session late. 1,200 lots of 2881 traded on 2004-11-22 appear as 2004-11-23's borrowing. Checked week by week through 2007: from 2007-07-02 trades are booked the same session. The cross-check follows the convention of each era, so it holds back to 2004 (41 of 41 stocks on 2004-11-23).
- Totals add up. Every column of each market's 合計 row equals the sum of its stocks, TWSE + TPEx equals 整體市場, and the total table equals SLB + NLB — exact on every session sampled from 2004 to 2026. A failure stops the run.
- The trade log's own footnote (trade count, lots, value at the close) is recomputed from the rows on every request.
- Firm lending books add up to the report's 合計 row in all four columns.
- The balance identity (4) = (1) + (2) − (3), printed in the column header, is checked on every row of every channel.
Traps in the source that this Actor handles
- The exchange's own slips are flagged, not hidden. On 2011-01-03 the NLB row for 2377 微星 reads 1,079,000 − 1,187,000 = 108,000 — the sign is lost. The figure is published as printed with
balance_identity_ok: false. A whole column read out of place would break nearly every row, so a session with more than a handful of breaks stops the run instead. - A trade is occasionally booked a session late even now. In September 2026, 2409 友達 showed 12,109 lots more in the trade log than in the balance on 09-23 and the same 12,109 lots more in the balance on 09-24; every other stock matched on all 20 sessions. Such rows carry
trade_log_matches: falseand the run logs a warning; only a mismatch across many stocks stops it. - Value is not always balance × close. On 2010-01-04 four OTC-lending rows (including 2014, 2344 and 5346) were valued at some other price. The published value is kept and
value_matches_closeis false. - The first session prints no prices. 2004-11-22 shows 0.00 for every close;
close_priceis null that day, not zero. - The firm table changes meaning in 2016. Before 2016-05-26 the same request answers a monthly-average table with different columns. Only the daily table is read; earlier dates return no
broker_activityrows. - Firm names are padded inside the characters (
合 庫,宏 遠); the padding is removed. - One report covers both markets. TPEx publishes no lending balance of its own and links to this TWSE report;
marketcomes from its 市場別 column. - Codes are not always four digits (00400A, 00631L).
Input
recordTypes—stock_balanceandmarket_totalby default; addslb_tradeandbroker_activity.startDate/endDate— leave both empty for the latest session. Fill them in for history back to 2004-11-22.market—both,twseortpex.stockCodes— keep only these.includeChannelBreakdown— the SLB / NLB / LON split (four requests a session). Off gives totals only, one request a session.crossCheckTradeLog— reconcile against the SLB trade log (one request a month).maxRequests— a cap for long backfills (default 400).useApifyProxy— for multi-year backfills; TWSE's firewall blocks an address that asks too often.
Use cases
- Short-side positioning: rising lending balances ahead of earnings, and how much of a stock's float is on loan.
- Borrow cost: actual negotiated and auction fee rates per trade, by stock and term.
- Squeeze screening: combine
balance_shareswith the short-sale balance in taiwan-sbl-short-sale-balance and shortable shares in taiwan-short-sale-eligibility. - Market structure: which firms lend and borrow the most, and how the SLB system and OTC lending split the market.
Limitations, stated plainly
- The SBL short-sale balance is not always below the lending balance. It usually is — on 2026-10-08, 2,051 of 2,055 stocks — but three ETFs (00711B, 00852L, 00875) and one stock (3694) showed a larger short-sale balance than lending balance. The two reports measure different things and neither is adjusted.
- OTC lending (NLB) has no trade-by-trade report, so only the SLB and LON channels can be reconciled against trades.
slb_trade.marketis looked up from the same session's balance table and is null when balances were not requested.
Source
Taiwan Stock Exchange (臺灣證券交易所): TWT72U 借券餘額表 (selectType SLBNLB, SLB, NLB, LON, TWTBBU) and t13sa710 歷史借券成交明細. The TWT72U report covers both TWSE-listed and TPEx OTC stocks.
Taiwan Market Data Suite
This Actor is part of a suite of 44 Taiwan market data APIs by chamarix — official sources only, cross-validated against independent official endpoints, clean JSON out. Code samples for the whole suite: GitHub.
Market data:
- taiwan-corporate-bonds — Every corporate, bank & Formosa bond — terms, balance, ratings & ISINs, daily OTC trades since 2005 and USD bond fair values since 2017
- taiwan-securities-lending-balance — Shares on loan for every stock since 2004 by lending channel, every SLB trade with its borrow fee rate, and each firm's lending book
- taiwan-ipo-listings — Every TWSE & TPEx listing application since 2000 from filing to first trading day — review, approval, price, underwriter & withdrawals, plus delistings
- taiwan-board-directors — Every independent director's career and other board seats linked to stock codes, board rosters, chair/CEO duality & director elections
- taiwan-broker-financials — Every securities firm's monthly balance sheet & P&L since 2013, full trial balance, and the register of firms & branches
- taiwan-short-sale-eligibility — Can it be shorted today? Below-close short list, shares available to borrow, borrow fees, margin haircuts & forced cover dates
- taiwan-gold-spot — The Taipei Exchange physical gold board since 2015 — daily VWAP, traded high/low, market-maker spread and every print by firm and price
- taiwan-convertible-bonds — Daily bars for every convertible bond on the Taipei Exchange, with conversion price, conversion window, put date & put price
- taiwan-corporate-action-prices — Capital reductions, par value changes & ETF splits — the official reopening price & adjustment factor for every price discontinuity since 2011
- taiwan-ipo-subscription — Every IPO ballot since 2006 & every competitive auction since 2016 — odds, ticket cost, reserve & bid-to-cover
- taiwan-intraday-5sec-stats — Market-wide order book & all sector indices every 5 seconds since 2004, 3,241 rows a session
- taiwan-stock-daily-quotes — Daily OHLCV, VWAP, P/E, price-to-book & dividend yield for every listed/OTC stock since 2004
- taiwan-index-history — Daily TAIEX & TPEx index history since 1990 with market turnover, the total-return index & all 273 TWSE indices
- twse-institutional-trades — Daily institutional buy/sell (foreign, investment trust, dealer) per stock — TWSE listed
- tpex-institutional-trades — Daily institutional buy/sell per stock — TPEx OTC market
- taiwan-monthly-revenue — Monthly revenue of 1,900+ listed & OTC companies, MoM/YoY
- taiwan-financial-statements — Quarterly income statement, balance sheet & cash flow back to 2013
- taiwan-director-compensation — Board pay for 1,950+ companies, parent vs consolidated scope, with EPS, ROE & profit on the same row
- taiwan-esg-disclosures — 21 ESG topics for 1,950+ companies — Scope 1/2/3 emissions, energy, water, waste, pay, board & climate risk
- taiwan-dividend-calendar — Ex-dividend / ex-rights dates, reference prices & payouts back to 2003
- taiwan-margin-trading — Daily margin trading & short sale balances per stock
- taiwan-sbl-short-sale-balance — Securities-lending short sale balances per stock
- taiwan-short-sale-volume — Daily short sale turnover per stock — margin & borrowed lots, value and implied price, since 2008
- taiwan-day-trading-stats — Day-trading volume, value & ratio per stock since 2014
- taiwan-odd-lot-trading — Both odd-lot sessions per stock — intraday & after-hours, shares, turnover, OHLC & quotes since 2004
- taiwan-broker-rankings — Securities-firm turnover, market share & the top firms in each hot stock on the OTC board since 2007
- tdcc-shareholding-dispersion — Weekly TDCC shareholding dispersion (retail vs whale structure)
- taiwan-foreign-shareholding — Foreign ownership percentage & remaining quota per stock
- taiwan-futures-daily — Daily bars, settlement price & open interest for all 384 TAIFEX futures contracts since 1998, with the large-trader report
- taifex-institutional-derivatives — Institutional futures & options positions (TAIFEX), incl. put/call ratio
- taifex-options-chain — Full options chain by strike & expiry, both sessions, with the exchange's own Delta, since 2001
- taiwan-warrants-daily — Daily quotes, strike, expiry & moneyness for every listed/OTC warrant since 2004
- taiwan-government-bonds — Central government bond benchmark yields, the full yield curve & issuance master, with staleness stated
- taiwan-stock-alerts — Watch-list, disposition & short-sale suspension alerts
- taiwan-insider-share-transfers — Insider share-transfer filings (directors, officers, 10% holders) since 2002
- taiwan-director-shareholdings — Monthly director/officer shareholdings & share-pledge ratio since 1999
- taiwan-block-trades — Every block trade (鉅額交易) with price, size & basket constituents since 2005
- taiwan-shareholder-meetings — Shareholder meeting dates, book closure periods & e-voting since 2005
- taiwan-emerging-stock-quotes — Emerging (興櫃) board quotes, pre-IPO register & history since 2003
- taiwan-etf-regular-investment — Monthly regular savings plan (定期定額) rankings for stocks & ETFs since 2020
- taiwan-treasury-stock-buybacks — Every treasury-stock buyback (庫藏股) filing, plan vs execution, since 2000
Property market:
- taiwan-real-estate-transactions — Actual registered sale, presale & lease prices (實價登錄) for all 22 cities since 2012
Government & civic data:
- taiwan-legislator-monitor — Legislative Yuan bills, legislators & meetings
- taiwan-tender-monitor — Government e-procurement tenders (open calls, awards, failures)