
    fib                     
   d Z ddlZddlZddlZddlmZmZmZm	Z	 dej
        fdZdej
        fdZdej
        fdZedk    rA e            Z ee            e            Z ee            e            Z ee           dS dS )	u  
Date: 2022/6/28 14:57
Desc: 中国外汇交易中心暨全国银行间同业拆借中心-市场数据-市场行情-外汇市场行情
人民币外汇即期报价: fx_spot_quote
人民币外汇远掉报价: fx_swap_quote
外币对即期报价: fx_pair_quote
    N)SHORT_HEADERSFX_SPOT_URLFX_SWAP_URLFX_PAIR_URLreturnc            	         dt          t          t          t          j                    dz                                i} t	          j        t          | t                    }t          j	        |
                                d                   }|g d         }g d|_        |g d         }t          j        |d         d	
          |d<   t          j        |d         d	
          |d<   |S )u	  
    中国外汇交易中心暨全国银行间同业拆借中心-市场数据-市场行情-外汇市场行情-人民币外汇即期报价
    http://www.chinamoney.com.cn/chinese/mkdatapfx/
    :return: 人民币外汇即期报价
    :rtype: pandas.DataFrame
    t  dataheadersrecordsccyPairbidPrcaskPrcmidpricetime	   货币对	   买报价	   卖报价-r   r   r   r   r   coerceerrorsr   )strintroundr   requestspostr   r   pd	DataFramejsoncolumns
to_numericpayloadrestemp_dfs      >/usr/local/lib/python3.11/dist-packages/akshare/fx/fx_quote.pyfx_spot_quoter-           CE$)++"45566778G
-'=
I
I
ICl388::i011GIIIJG  GO ===>G=)=hOOOGK=)=hOOOGKN    c            	      D   dt          t          t          t          j                    dz                                i} t	          j        t          | t                    }t          j	        |
                                d                   }|g d         }g d|_        |S )u
  
    中国外汇交易中心暨全国银行间同业拆借中心-市场数据-市场行情-债券市场行情-人民币外汇远掉报价
    https://www.chinamoney.com.cn/chinese/index.html
    :return: 人民币外汇远掉报价
    :rtype: pandas.DataFrame
    r	   r
   r   r   )r   label_1Wlabel_1Mlabel_3Mlabel_6Mlabel_9Mlabel_1Y)r   u   1周u   1月u   3月u   6月u   9月u   1年)r   r   r    r   r!   r"   r   r   r#   r$   r%   r&   r(   s      r,   fx_swap_quoter7   0   s     CE$)++"45566778G
-'=
I
I
ICl388::i011G	
 	
 	

G  GO Nr/   c            	         dt          t          t          t          j                    dz                                i} t	          j        t          | t                    }t          j	        |
                                d                   }|g d         }g d|_        |g d         }t          j        |d         d	
          |d<   t          j        |d         d	
          |d<   |S )u   
    中国外汇交易中心暨全国银行间同业拆借中心-市场数据-市场行情-债券市场行情-外币对即期报价
    http://www.chinamoney.com.cn/chinese/mkdatapfx/
    :return: 外币对即期报价
    :rtype: pandas.DataFrame
    r	   r
   r   r   r   r   r   r   r   r   r   )r   r   r    r   r!   r"   r   r   r#   r$   r%   r&   r'   r(   s      r,   fx_pair_quoter9   Q   r.   r/   __main__)__doc__r   pandasr#   r!   akshare.fx.consr   r   r   r   r$   r-   r7   r9   __name__fx_spot_quote_dfprintfx_swap_quote_dffx_pair_quote_df r/   r,   <module>rD      s5                    r|    0r|    Br|    0 z$}	E
$}	E
$}	E
 r/   