Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Added ability to query 24hr ticker price change statistics for all sy… #60

Merged
merged 3 commits into from
Feb 6, 2018

Conversation

nomailforme
Copy link

@nomailforme nomailforme commented Jan 28, 2018

Added ability to query 24hr ticker price change statistics for all symbols and to query latest price for single symbol

Signed-off-by: Sai Chaitanya Chitneedi

…mbols and to query latest price for single symbol

Signed-off-by: Sai Chaitanya Chitneedi <nomail_forme@yahoo.in>
Copy link
Member

@joaopsilva joaopsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nomailforme thank you for this, it looks good, could you please just apply the changes I mentioned in the code review before I merge it into master?

* @param symbol ticker symbol (e.g. ETHBTC)
* @param callback the callback that handles the response
*/
void getSymbolPrice(String symbol , BinanceApiCallback<TickerPrice> callback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be called getPrice?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


@Override
public void getAll24HrPriceStatistics(BinanceApiCallback<List<TickerStatistics>> callback) {
binanceApiService.getAll24HrPriceStatistics().enqueue(new BinanceApiCallbackAdapter<>(callback));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use 2 whitespaces for indentation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, But I would have much preferred tab for indentation. Its more standard In my opinion :)


@GET("/api/v1/ticker/allPrices")
Call<List<TickerPrice>> getLatestPrices();

@GET("/api/v3/ticker/price")
Call<TickerPrice> getSymbolPrice(@Query("symbol") String symbol);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, can you please call this getLatestPrice?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nomailforme
Copy link
Author

Made changes. Feel free to merge :)

@joaopsilva joaopsilva merged commit 31fd444 into binance-exchange:master Feb 6, 2018
@joaopsilva
Copy link
Member

Thank you @nomailforme .

nilswx pushed a commit to nilswx/binance-java-api that referenced this pull request Dec 14, 2018
Added ability to query 24hr ticker price change statistics for all symbols.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants