Foreign flow API for Indonesian stocks

Foreign flow is the buying and selling by foreign investors in an IDX stock, aggregated across all foreign brokers instead of reported per broker. The Index Alpha foreign flow API returns it as three numbers: foreign_buy, foreign_sell, and net_foreign (foreign buy minus foreign sell).

The endpoint is GET /foreign-flow, and it takes a ticker, a from date, a to date, and an optional market segment (RG, NG, or ALL; the default is ALL). It is calculated from the same underlying data as broker summary, summed across the records tagged with investor type f.

Like broker summary, a multi-day range returns one aggregated total for the whole range rather than per-day values. Coverage starts 2025-01-01 for RG and NG.

Example request

curl -X 'GET' \
  'https://api.indexalpha.id/foreign-flow?ticker=BBCA&from=2026-07-01&to=2026-07-28' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <your_api_token>'