Enum crypto_crawler::MarketType[]

pub enum MarketType {
    Spot,
    LinearFuture,
    InverseFuture,
    LinearSwap,
    InverseSwap,
    Option,
    QuantoFuture,
    QuantoSwap,
    Move,
    BVOL,
}

Market type.

  • In spot market, cryptocurrencies are traded for immediate delivery, see https://en.wikipedia.org/wiki/Spot_market.
  • In futures market, delivery is set at a specified time in the future, see https://en.wikipedia.org/wiki/Futures_exchange.
  • Swap market is a variant of futures market with no expiry date.

Margin

A market can have margin enabled or disabled.

  • All contract markets are margin enabled, including future, swap and option.
  • Most spot markets don’t have margin enabled, only a few exchanges have spot market with margin enabled.

Linear VS. Inverse

A market can be inverse or linear.

  • Linear means USDT-margined, i.e., you can use USDT as collateral
  • Inverse means coin-margined, i.e., you can use BTC as collateral.
  • Spot market is always linear.

Margin and Inverse are orthogonal.

Variants

Spot
LinearFuture
InverseFuture
LinearSwap
InverseSwap
Option
QuantoFuture
QuantoSwap
Move
BVOL

Trait Implementations

impl Clone for MarketType

impl Copy for MarketType

impl Debug for MarketType

impl<'de> Deserialize<'de> for MarketType

impl Display for MarketType

impl FromStr for MarketType

type Err = ParseError

The associated error which can be returned from parsing.

impl PartialEq<MarketType> for MarketType

impl Serialize for MarketType

impl StructuralPartialEq for MarketType

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,