lovebug356/elm-crypto-com-exchange/1.0.0

NOTE: the latest version is 2.0.0

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.

= Buy
| Sell

Side information for an order.

= Limit

Type information for an order.

type OrderId
= OrderId String

Id of an order generated by the exchange.

= Interval String

Interval of the candlesticks.

= InstrumentName String

Name of the instrument as defined by the exchange.

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

Summary of an account.

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

Information from a trade.

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

Single candle information.

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

All data of a candlestick diagram.

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

Information of a ticker

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

Information of an instrument.