Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get Price change percent from ticker

See original GitHub issue

There is problem to get Price Change Percent from ticker because the limited variable set in ExchangeSharp.ExchangeTicker class. So how we get Price Change Percent from ticker

public sealed class ExchangeTicker
        public ExchangeTicker();
        public string Id { get; set; }
        public string MarketSymbol { get; set; }
        public decimal Bid { get; set; }
        public decimal Ask { get; set; }
        public decimal Last { get; set; }
        public ExchangeVolume Volume { get; set; }

        public void FromBinary(BinaryReader reader);
        public void ToBinary(BinaryWriter writer);
        public override string ToString();

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

GonzoKKcommented, Feb 12, 2020

What I like about the GetCandlesAsync approach, you basically can get any time frame you want. Here’s BSVUSD at one hour intervals. I have it on a timer that refreshes every minute or every hour depending on the candle.

image Edit: Percent calc fix

GonzoKKcommented, Feb 12, 2020

Alternatively, use GetCandlesAsync to get any price history using candle data.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calculating Investment Percentage Gains or Losses
Take the selling price and subtract the initial purchase price. · Take the gain or loss from the investment and divide it by...
Read more >
What Is Percentage Change?
The formula for percentage change is: (New Price - Old Price) / Old Price x 100. The percentage change will be positive if...
Read more >
How is Percent Change Calculated? [StockCharts Support]
Percent Change, meanwhile, is calculated by dividing the Chg value by the previous period's close and multiplying the result by 100.
Read more >
How to calculate percentage price changes correctly with ...
... logarithm when calculating percentage price increases and decreases. ... course, Stock prices,Mercursim; percentage change ; delta, ...
Read more >
How to Calculate Market Price Change of Common Stock
Divide the change in dollars by the original price and multiply by 100 to figure the percentage change. In this example, divide $2...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found