[−][src]Struct pikmin::downloader::bitmex::MexDownloader
A pre-built downloader for BitMEX.
Methods
impl MexDownloader
[src]
pub fn new(start: DateTime<Utc>, end: DateTime<Utc>) -> Self
[src]
Creates a new downloader with a specific range. The input source is fixed.
Trait Implementations
impl Downloader for MexDownloader
[src]
type IDT = Pagination<DateTime<Utc>, DateTimeID>
A type of element which ID is made up of.
type ID = PaginatedID<DateTime<Utc>, DateTimeID>
A type of ID for specifying the downloading point in an API client.
type RAW = MexGetExecution
A type of downloaded trade data.
fn start_id(&self) -> Self::IDT
[src]
fn end_id(&self) -> Self::IDT
[src]
fn continue_condition(&self, current: &Self::IDT, end: &Self::IDT) -> bool
[src]
fn fetch(&self, c: &Self::IDT) -> Result<Vec<MexGetExecution>>
[src]
fn convert(&self, v: &MexGetExecution) -> Result<Trade>
[src]
fn output(&self, u: Vec<Trade>, writer: &mut impl Writer) -> Result<Self::IDT>
[src]
Possibly some trades will be cut from the response if we just increment the starting timestamp since the API will return just requested number fo trades for single request. In order to avoid this, the last trades in terms of the traded timestamp should be ignored at the first time, and request again from the timestamp.
Mex API allows to send an offset parameter, so this will never get into an infinite loop.
fn sleep_millis(&self) -> u64
[src]
if we login, the API limit becomes 300/5min if not, it's 150/5min
fn init_id(
&self,
default: Self::IDT,
recorder: &mut impl ProgressRecorder
) -> Result<Self::ID>
[src]
&self,
default: Self::IDT,
recorder: &mut impl ProgressRecorder
) -> Result<Self::ID>
Returns initial ID from a progress file. If reading is failed, use a given default
value.
fn run(
&self,
writer: &mut impl Writer,
recorder: &mut impl ProgressRecorder
) -> Result<()>
[src]
&self,
writer: &mut impl Writer,
recorder: &mut impl ProgressRecorder
) -> Result<()>
Executes downloading.
impl Debug for MexDownloader
[src]
Auto Trait Implementations
impl Send for MexDownloader
impl Sync for MexDownloader
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self