@@ -312,6 +312,9 @@ describe('RestClient', () => {
312312 const stock = client . stock as RestStockClient ;
313313 expect ( stock . ownership ) . toBeDefined ( ) ;
314314 expect ( stock . ownership ) . toHaveProperty ( 'etfHoldings' ) ;
315+ expect ( stock . ownership ) . toHaveProperty ( 'institutionalTrades' ) ;
316+ expect ( stock . ownership ) . toHaveProperty ( 'directorHoldings' ) ;
317+ expect ( stock . ownership ) . toHaveProperty ( 'tdccDistribution' ) ;
315318 } ) ;
316319
317320 describe ( '.etfHoldings()' , ( ) => {
@@ -345,6 +348,102 @@ describe('RestClient', () => {
345348 ) ;
346349 } ) ;
347350 } ) ;
351+
352+ describe ( '.institutionalTrades()' , ( ) => {
353+ it ( 'should request with api key' , async ( ) => {
354+ const client = new RestClient ( { apiKey : 'api-key' } ) ;
355+ const stock = client . stock as RestStockClient ;
356+ await stock . ownership . institutionalTrades ( { symbol : '2330' } ) ;
357+ expect ( fetch ) . toBeCalledWith (
358+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/institutional-trades/2330' ,
359+ { headers : { 'X-API-KEY' : 'api-key' } } ,
360+ ) ;
361+ } ) ;
362+
363+ it ( 'should request with bearer token' , async ( ) => {
364+ const client = new RestClient ( { bearerToken : 'bearer-token' } ) ;
365+ const stock = client . stock as RestStockClient ;
366+ await stock . ownership . institutionalTrades ( { symbol : '2330' } ) ;
367+ expect ( fetch ) . toBeCalledWith (
368+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/institutional-trades/2330' ,
369+ { headers : { 'Authorization' : 'Bearer bearer-token' } } ,
370+ ) ;
371+ } ) ;
372+
373+ it ( 'should request with query params' , async ( ) => {
374+ const client = new RestClient ( { apiKey : 'api-key' } ) ;
375+ const stock = client . stock as RestStockClient ;
376+ await stock . ownership . institutionalTrades ( { symbol : '2330' , from : '2026-07-01' , to : '2026-07-31' , sort : 'desc' } ) ;
377+ expect ( fetch ) . toBeCalledWith (
378+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/institutional-trades/2330?from=2026-07-01&sort=desc&to=2026-07-31' ,
379+ { headers : { 'X-API-KEY' : 'api-key' } } ,
380+ ) ;
381+ } ) ;
382+ } ) ;
383+
384+ describe ( '.directorHoldings()' , ( ) => {
385+ it ( 'should request with api key' , async ( ) => {
386+ const client = new RestClient ( { apiKey : 'api-key' } ) ;
387+ const stock = client . stock as RestStockClient ;
388+ await stock . ownership . directorHoldings ( { symbol : '2330' } ) ;
389+ expect ( fetch ) . toBeCalledWith (
390+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/director-holdings/2330' ,
391+ { headers : { 'X-API-KEY' : 'api-key' } } ,
392+ ) ;
393+ } ) ;
394+
395+ it ( 'should request with bearer token' , async ( ) => {
396+ const client = new RestClient ( { bearerToken : 'bearer-token' } ) ;
397+ const stock = client . stock as RestStockClient ;
398+ await stock . ownership . directorHoldings ( { symbol : '2330' } ) ;
399+ expect ( fetch ) . toBeCalledWith (
400+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/director-holdings/2330' ,
401+ { headers : { 'Authorization' : 'Bearer bearer-token' } } ,
402+ ) ;
403+ } ) ;
404+
405+ it ( 'should request with query params' , async ( ) => {
406+ const client = new RestClient ( { apiKey : 'api-key' } ) ;
407+ const stock = client . stock as RestStockClient ;
408+ await stock . ownership . directorHoldings ( { symbol : '2330' , from : '2026-01-01' , to : '2026-05-31' , sort : 'desc' } ) ;
409+ expect ( fetch ) . toBeCalledWith (
410+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/director-holdings/2330?from=2026-01-01&sort=desc&to=2026-05-31' ,
411+ { headers : { 'X-API-KEY' : 'api-key' } } ,
412+ ) ;
413+ } ) ;
414+ } ) ;
415+
416+ describe ( '.tdccDistribution()' , ( ) => {
417+ it ( 'should request with api key' , async ( ) => {
418+ const client = new RestClient ( { apiKey : 'api-key' } ) ;
419+ const stock = client . stock as RestStockClient ;
420+ await stock . ownership . tdccDistribution ( { symbol : '2330' } ) ;
421+ expect ( fetch ) . toBeCalledWith (
422+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/tdcc-distribution/2330' ,
423+ { headers : { 'X-API-KEY' : 'api-key' } } ,
424+ ) ;
425+ } ) ;
426+
427+ it ( 'should request with bearer token' , async ( ) => {
428+ const client = new RestClient ( { bearerToken : 'bearer-token' } ) ;
429+ const stock = client . stock as RestStockClient ;
430+ await stock . ownership . tdccDistribution ( { symbol : '2330' } ) ;
431+ expect ( fetch ) . toBeCalledWith (
432+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/tdcc-distribution/2330' ,
433+ { headers : { 'Authorization' : 'Bearer bearer-token' } } ,
434+ ) ;
435+ } ) ;
436+
437+ it ( 'should request with query params' , async ( ) => {
438+ const client = new RestClient ( { apiKey : 'api-key' } ) ;
439+ const stock = client . stock as RestStockClient ;
440+ await stock . ownership . tdccDistribution ( { symbol : '2330' , from : '2026-06-01' , to : '2026-07-03' , sort : 'desc' } ) ;
441+ expect ( fetch ) . toBeCalledWith (
442+ 'https://api.fugle.tw/marketdata/v1.0/stock/ownership/tdcc-distribution/2330?from=2026-06-01&sort=desc&to=2026-07-03' ,
443+ { headers : { 'X-API-KEY' : 'api-key' } } ,
444+ ) ;
445+ } ) ;
446+ } ) ;
348447 } ) ;
349448
350449 describe ( '.snapshot' , ( ) => {
0 commit comments