数据来源:https://www.100ppi.com/sf/
代码:
import akshare as ak
import pandas as pd
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
pd.set_option('display.width', 1000)
futures_spot_price_daily = ak.futures_spot_price_daily('20240317', '20240319', ['RB','AL'])
print(futures_spot_price_daily)
结果:
symbol spot_price near_contract near_contract_price dominant_contract dominant_contract_price near_basis dom_basis near_basis_rate dom_basis_rate date
0 RB 3458.44 rb2404 3426.0 rb2405 3474.0 -32.44 15.56 -0.00938 0.004499 20240318
1 AL 19266.67 al2404 19270.0 al2405 19270.0 3.33 3.33 0.000173 0.000173 20240318
2 RB 3489.56 rb2404 3476.0 rb2405 3545.0 -13.56 55.44 -0.003886 0.015887 20240319
3 AL 19263.33 al2404 19305.0 al2405 19305.0 41.67 41.67 0.002163 0.002163 20240319
文章评论