Class Quote
java.lang.Object
com.codename1.crypto.market.Quote
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBase()The asset priced, upper case.doublegetPrice()The price of one whole unit of the base asset.getQuote()The currency of the price, upper case.The feed that answered.longWhen the source updated the price, in epoch milliseconds.invert()The quote with base and quote swapped.toString()Returns a string representation of the object.doubleThe value of an amount in base units (wei, satoshis, lamports, token units) with the asset's decimals, in the quote currency.
-
Constructor Details
-
Quote
A quote.
Parameters
base: the asset priced, such asBTCquote: the currency of the price, such asUSDprice: the price of one unit ofbasetimestamp: when the source last updated it, in epoch millisecondssource: a short name of the feed
-
-
Method Details
-
getBase
The asset priced, upper case. -
getQuote
The currency of the price, upper case. -
getPrice
public double getPrice()The price of one whole unit of the base asset. -
getTimestamp
public long getTimestamp()When the source updated the price, in epoch milliseconds. -
getSource
The feed that answered. -
valueOf
The value of an amount in base units (wei, satoshis, lamports, token units) with the asset's decimals, in the quote currency. -
invert
The quote with base and quote swapped. -
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-