Package com.longbridge.market
Class MarketContext
- java.lang.Object
-
- com.longbridge.market.MarketContext
-
- All Implemented Interfaces:
AutoCloseable
public class MarketContext extends Object implements AutoCloseable
Market data context — broker holdings, A/H premium, trade statistics, market anomalies, index constituents and more.
-
-
Constructor Summary
Constructors Constructor Description MarketContext()
-
Method Summary
-
-
-
Method Detail
-
create
public static MarketContext create(Config config)
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getMarketStatus
public CompletableFuture<MarketStatusResponse> getMarketStatus() throws OpenApiException
Get current trading status for all markets- Throws:
OpenApiException
-
getBrokerHolding
public CompletableFuture<BrokerHoldingTop> getBrokerHolding(BrokerHoldingOptions opts) throws OpenApiException
Get top broker holdings. period: 0=rct_1,1=rct_5,2=rct_20,3=rct_60- Throws:
OpenApiException
-
getBrokerHoldingDetail
public CompletableFuture<BrokerHoldingDetail> getBrokerHoldingDetail(String symbol) throws OpenApiException
Get full broker holding details- Throws:
OpenApiException
-
getBrokerHoldingDaily
public CompletableFuture<BrokerHoldingDailyHistory> getBrokerHoldingDaily(BrokerHoldingDailyOptions opts) throws OpenApiException
Get daily broker holding history- Throws:
OpenApiException
-
getAhPremium
public CompletableFuture<AhPremiumKlines> getAhPremium(AhPremiumOptions opts) throws OpenApiException
Get A/H premium K-lines- Throws:
OpenApiException
-
getAhPremiumIntraday
public CompletableFuture<AhPremiumIntraday> getAhPremiumIntraday(String symbol) throws OpenApiException
Get A/H premium intraday- Throws:
OpenApiException
-
getTradeStats
public CompletableFuture<TradeStatsResponse> getTradeStats(String symbol) throws OpenApiException
Get trade statistics- Throws:
OpenApiException
-
getAnomaly
public CompletableFuture<AnomalyResponse> getAnomaly(String market) throws OpenApiException
Get market anomaly alerts- Throws:
OpenApiException
-
getConstituent
public CompletableFuture<IndexConstituents> getConstituent(String symbol) throws OpenApiException
Get index constituent stocks- Throws:
OpenApiException
-
-