phoenix-rise 0.1.2

SDK for interacting with Phoenix
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::http_client::HttpClientInner;
use crate::phoenix_rise_types::{ApiCandle, CandlesQueryParams, PhoenixHttpError};

pub struct CandlesClient<'a> {
    pub(crate) http: &'a HttpClientInner,
}

impl CandlesClient<'_> {
    pub async fn get_candles(
        &self,
        params: CandlesQueryParams,
    ) -> Result<Vec<ApiCandle>, PhoenixHttpError> {
        self.http.get_json_with_query("/candles", &params).await
    }
}