Function cryptocompare::get_price_historical [] [src]

pub fn get_price_historical(
    fsym: &str,
    tsyms: &str,
    options: &Options
) -> Result<Value, Box<Error>>

Get the price of any cryptocurrency in any other currency that you need at a given timestamp.

The price comes from the daily info - so it would be the price at the end of the day GMT based on the requested TS. If the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. Tries to get direct trading pair data, if there is none or it is more than 30 days before the ts requested, it uses BTC conversion.

Example

    let option: Options = Options { exchanges: "Bitfinex", try_conversion: false };
    let price_historical = cryptocompare::get_price_historical("IOT", "USD,BTC,ETH", &option);