lovebug356 / elm-crypto-com-exchange / CryptoComExchange

This module exposes the types used in the API.


type alias OrderReference =
{ id : OrderId
, clientId : String 
}

Combination of order id and client order id.


type alias LimitOrderRequest =
{ instrumentName : InstrumentName
, side : OrderSide
, price : String
, quantity : String 
}

Information needed to create a limit order.


type OrderSide
    = Buy
    | Sell

Side information for an order.


type OrderType
    = Limit

Type information for an order.


type OrderId
    = OrderId String

Id of an order generated by the exchange.


type Interval
    = Interval String

Interval of the candlesticks.


type InstrumentName
    = InstrumentName String

Name of the instrument as defined by the exchange.


type alias Account =
{ balance : Basics.Float
, available : Basics.Float
, order : Basics.Float
, stake : Basics.Float
, currency : String 
}

Summary of an account.


type alias Trade =
{ instrumentName : String
, price : Basics.Float
, quantity : Basics.Float
, side : String
, id : Basics.Int
, timestamp : Time.Posix 
}

Information from a trade.


type alias Candle =
{ timestamp : Basics.Int
, open : Basics.Float
, high : Basics.Float
, low : Basics.Float
, close : Basics.Float
, volume : Basics.Float 
}

Single candle information.


type alias Candlestick =
{ instrumentName : String
, interval : String
, data : List Candle 
}

All data of a candlestick diagram.


type alias Ticker =
{ instrumentName : InstrumentName
, currentBidPrice : Basics.Float
, currentAskPrice : Basics.Float
, priceOfLatestTrade : Basics.Float
, timestamp : Basics.Int
, total24hTradedVolume : Basics.Float
, priceOf24hHighestTrade : Basics.Float
, priceOf24hLowestTrade : Basics.Float
, priceChange24h : Basics.Float 
}

Information of a ticker


type alias Instrument =
{ instrumentName : InstrumentName
, baseCurrency : String
, quoteCurrency : String
, priceDecimals : Basics.Int
, quantityDecimals : Basics.Int
, marginTradingEnabled : Basics.Bool 
}

Information of an instrument.