FX Rates

Daily foreign exchange data, defaulting to USDCNH (US dollar against offshore renminbi), with open/high/low/close for both the bid and ask quotes. The offshore CNH rate is a key gauge of market expectations for the renminbi and of cross-border capital conditions, commonly used for cross-border portfolio valuation, FX hedging and reading foreign capital flows. Updated each trading day; quoted as USD per CNH, and other currency pairs can be specified.

GET /v2/fx/daily

Parameters

Name Type Required Description
symbol string No FX pair, default USDCNH.FXCM
start_date string No Start date (YYYYMMDD)
end_date string No End date (YYYYMMDD)
trade_date string No Trading date YYYYMMDD (single day)

Response Fields

Field Type Description
symbol string Currency pair code
trade_date string Trading date
bid_open number Bid opening price
bid_close number Bid closing price
bid_high number Bid highest price
bid_low number Bid lowest price
ask_open number Ask opening price
ask_close number Ask closing price

API Example

cURL
curl -H "X-API-Key: YOUR_KEY" \
  "https://asharehub.com/v2/fx/daily?symbol=USDCNH.FXCM"
Python SDK
from asharehub import AShareHub

client = AShareHub(api_key="YOUR_KEY")
df = client.fx_daily(symbol="USDCNH.FXCM")
print(df.head())

Sample Data

returns a pandas.DataFrame
symboltrade_datebid_openbid_closebid_highbid_lowask_openask_closeask_highask_low… +1
USDCNH.FXCM202606256.80096.80236.80296.79816.80236.8036.80366.8008
USDCNH.FXCM202606246.81276.80096.81616.79666.81396.80236.81836.7972
USDCNH.FXCM202606236.79446.81276.81926.79086.79556.81396.81986.7913