forked from bitsoex/bitso-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBitsoTicker.java
More file actions
35 lines (27 loc) · 884 Bytes
/
Copy pathBitsoTicker.java
File metadata and controls
35 lines (27 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.bitso;
import org.json.JSONObject;
import com.bitso.exchange.Ticker;
import com.bitso.helpers.Helpers;
public class BitsoTicker extends Ticker {
private String book;
public BitsoTicker(JSONObject o) {
mLast = Helpers.getBD(o, "last");
mHigh = Helpers.getBD(o, "high");
mLow = Helpers.getBD(o, "low");
mVwap = Helpers.getBD(o, "vwap");
mVolume = Helpers.getBD(o, "volume");
mBid = Helpers.getBD(o, "bid");
mAsk = Helpers.getBD(o, "ask");
mCreatedAt = Helpers.getZonedDatetime(o, "created_at");
book = Helpers.getString(o, "book");
}
public String getBook() {
return book;
}
public void setBook(String book) {
this.book = book;
}
public String toString() {
return Helpers.fieldPrinter(this, BitsoTicker.class) + super.toString();
}
}