This repository was archived by the owner on Oct 30, 2023. It is now read-only.
forked from joaopsilva/binance-java-api
-
Notifications
You must be signed in to change notification settings - Fork 607
Added AllMarketTickers channel #56
Merged
joaopsilva
merged 3 commits into
binance-exchange:master
from
tonyskulk:all-market-tickers
Jan 29, 2018
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
270 changes: 270 additions & 0 deletions
270
src/main/java/com/binance/api/client/domain/event/AllMarketTickersEvent.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,270 @@ | ||
| package com.binance.api.client.domain.event; | ||
|
|
||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| /** | ||
| */ | ||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| public class AllMarketTickersEvent { | ||
|
|
||
| @JsonProperty("e") | ||
| private String eventType; | ||
|
|
||
| @JsonProperty("E") | ||
| private long eventTime; | ||
|
|
||
| @JsonProperty("s") | ||
| private String symbol; | ||
|
|
||
| @JsonProperty("p") | ||
| private double priceChange; | ||
|
|
||
| @JsonProperty("P") | ||
| private double priceChangePercent; | ||
|
|
||
| @JsonProperty("w") | ||
| private double weightedAveragePrice; | ||
|
|
||
| @JsonProperty("x") | ||
| private double previousDaysClosePrice; | ||
|
|
||
| @JsonProperty("c") | ||
| private double currentDaysClosePrice; | ||
|
|
||
| @JsonProperty("Q") | ||
| private long closeTradesQuantity; | ||
|
|
||
| @JsonProperty("a") | ||
| private double bestAskPrice; | ||
|
|
||
| @JsonProperty("A") | ||
| private long bestAskQuantity; | ||
|
|
||
| @JsonProperty("o") | ||
| private double openPrice; | ||
|
|
||
| @JsonProperty("h") | ||
| private double highPrice; | ||
|
|
||
| @JsonProperty("l") | ||
| private double lowPrice; | ||
|
|
||
| @JsonProperty("v") | ||
| private long totalTradedBaseAssetVolume; | ||
|
|
||
| @JsonProperty("q") | ||
| private long totalTradedQuoteAssetVolume; | ||
|
|
||
| @JsonProperty("O") | ||
| private long statisticesOpenTime; | ||
|
|
||
| @JsonProperty("C") | ||
| private long statisticesCloseTime; | ||
|
|
||
| @JsonProperty("F") | ||
| private long firstTradeId; | ||
|
|
||
| @JsonProperty("L") | ||
| private long lastTradeId; | ||
|
|
||
| @JsonProperty("n") | ||
| private long totalNumberOfTrades; | ||
|
|
||
| public String getEventType() { | ||
| return eventType; | ||
| } | ||
|
|
||
| public void setEventType(String eventType) { | ||
| this.eventType = eventType; | ||
| } | ||
|
|
||
| public long getEventTime() { | ||
| return eventTime; | ||
| } | ||
|
|
||
| public void setEventTime(long eventTime) { | ||
| this.eventTime = eventTime; | ||
| } | ||
|
|
||
| public String getSymbol() { | ||
| return symbol; | ||
| } | ||
|
|
||
| public void setSymbol(String symbol) { | ||
| this.symbol = symbol; | ||
| } | ||
|
|
||
| public double getPriceChange() { | ||
| return priceChange; | ||
| } | ||
|
|
||
| public void setPriceChange(double priceChange) { | ||
| this.priceChange = priceChange; | ||
| } | ||
|
|
||
| public double getPriceChangePercent() { | ||
| return priceChangePercent; | ||
| } | ||
|
|
||
| public void setPriceChangePercent(double priceChangePercent) { | ||
| this.priceChangePercent = priceChangePercent; | ||
| } | ||
|
|
||
| public double getWeightedAveragePrice() { | ||
| return weightedAveragePrice; | ||
| } | ||
|
|
||
| public void setWeightedAveragePrice(double weightedAveragePrice) { | ||
| this.weightedAveragePrice = weightedAveragePrice; | ||
| } | ||
|
|
||
| public double getPreviousDaysClosePrice() { | ||
| return previousDaysClosePrice; | ||
| } | ||
|
|
||
| public void setPreviousDaysClosePrice(double previousDaysClosePrice) { | ||
| this.previousDaysClosePrice = previousDaysClosePrice; | ||
| } | ||
|
|
||
| public double getCurrentDaysClosePrice() { | ||
| return currentDaysClosePrice; | ||
| } | ||
|
|
||
| public void setCurrentDaysClosePrice(double currentDaysClosePrice) { | ||
| this.currentDaysClosePrice = currentDaysClosePrice; | ||
| } | ||
|
|
||
| public long getCloseTradesQuantity() { | ||
| return closeTradesQuantity; | ||
| } | ||
|
|
||
| public void setCloseTradesQuantity(long closeTradesQuantity) { | ||
| this.closeTradesQuantity = closeTradesQuantity; | ||
| } | ||
|
|
||
| public double getBestAskPrice() { | ||
| return bestAskPrice; | ||
| } | ||
|
|
||
| public void setBestAskPrice(double bestAskPrice) { | ||
| this.bestAskPrice = bestAskPrice; | ||
| } | ||
|
|
||
| public long getBestAskQuantity() { | ||
| return bestAskQuantity; | ||
| } | ||
|
|
||
| public void setBestAskQuantity(long bestAskQuantity) { | ||
| this.bestAskQuantity = bestAskQuantity; | ||
| } | ||
|
|
||
| public double getOpenPrice() { | ||
| return openPrice; | ||
| } | ||
|
|
||
| public void setOpenPrice(double openPrice) { | ||
| this.openPrice = openPrice; | ||
| } | ||
|
|
||
| public double getHighPrice() { | ||
| return highPrice; | ||
| } | ||
|
|
||
| public void setHighPrice(double highPrice) { | ||
| this.highPrice = highPrice; | ||
| } | ||
|
|
||
| public double getLowPrice() { | ||
| return lowPrice; | ||
| } | ||
|
|
||
| public void setLowPrice(double lowPrice) { | ||
| this.lowPrice = lowPrice; | ||
| } | ||
|
|
||
| public long getTotalTradedBaseAssetVolume() { | ||
| return totalTradedBaseAssetVolume; | ||
| } | ||
|
|
||
| public void setTotalTradedBaseAssetVolume(long totalTradedBaseAssetVolume) { | ||
| this.totalTradedBaseAssetVolume = totalTradedBaseAssetVolume; | ||
| } | ||
|
|
||
| public long getTotalTradedQuoteAssetVolume() { | ||
| return totalTradedQuoteAssetVolume; | ||
| } | ||
|
|
||
| public void setTotalTradedQuoteAssetVolume(long totalTradedQuoteAssetVolume) { | ||
| this.totalTradedQuoteAssetVolume = totalTradedQuoteAssetVolume; | ||
| } | ||
|
|
||
| public long getStatisticesOpenTime() { | ||
| return statisticesOpenTime; | ||
| } | ||
|
|
||
| public void setStatisticesOpenTime(long statisticesOpenTime) { | ||
| this.statisticesOpenTime = statisticesOpenTime; | ||
| } | ||
|
|
||
| public long getStatisticesCloseTime() { | ||
| return statisticesCloseTime; | ||
| } | ||
|
|
||
| public void setStatisticesCloseTime(long statisticesCloseTime) { | ||
| this.statisticesCloseTime = statisticesCloseTime; | ||
| } | ||
|
|
||
| public long getFirstTradeId() { | ||
| return firstTradeId; | ||
| } | ||
|
|
||
| public void setFirstTradeId(long firstTradeId) { | ||
| this.firstTradeId = firstTradeId; | ||
| } | ||
|
|
||
| public long getLastTradeId() { | ||
| return lastTradeId; | ||
| } | ||
|
|
||
| public void setLastTradeId(long lastTradeId) { | ||
| this.lastTradeId = lastTradeId; | ||
| } | ||
|
|
||
| public long getTotalNumberOfTrades() { | ||
| return totalNumberOfTrades; | ||
| } | ||
|
|
||
| public void setTotalNumberOfTrades(long totalNumberOfTrades) { | ||
| this.totalNumberOfTrades = totalNumberOfTrades; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
| .append("eventType", eventType) | ||
| .append("eventTime", eventTime) | ||
| .append("symbol", symbol) | ||
| .append("priceChange", priceChange) | ||
| .append("priceChangePercent", priceChangePercent) | ||
| .append("weightedAveragePrice", weightedAveragePrice) | ||
| .append("previousDaysClosePrice", previousDaysClosePrice) | ||
| .append("currentDaysClosePrice", currentDaysClosePrice) | ||
| .append("closeTradesQuantity", closeTradesQuantity) | ||
| .append("bestAskPrice", bestAskPrice) | ||
| .append("bestAskQuantity", bestAskQuantity) | ||
| .append("openPrice", openPrice) | ||
| .append("highPrice", highPrice) | ||
| .append("lowPrice", lowPrice) | ||
| .append("totalTradedBaseAssetVolume", totalTradedBaseAssetVolume) | ||
| .append("totalTradedQuoteAssetVolume", totalTradedQuoteAssetVolume) | ||
| .append("statisticesOpenTime", statisticesOpenTime) | ||
| .append("statisticesCloseTime", statisticesCloseTime) | ||
| .append("firstTradeId", firstTradeId) | ||
| .append("lastTradeId", lastTradeId) | ||
| .append("totalNumberOfTrades", totalNumberOfTrades) | ||
| .toString(); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please replace this to use the
ToStringBuilderthat is used in other transfer objects? Thanks.