Bitcoin Forum
September 16, 2019, 11:50:26 AM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Best way to synchronize a price?  (Read 165 times)
UniBanker
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
November 23, 2017, 06:49:53 AM
 #1

I'm working on grabbing prices from multiple exchanges, and I know with things like EtherDelta it's far too easy to place an out-of-order trade way beyond the reasonable bid/ask range. So for an application to represent the accurate price, we can't go with the *last* price. Should we just present the latest bid? The average between bid and ask? The last closing trade that also is still within 10% of the bid/ask?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568634626
Hero Member
*
Offline Offline

Posts: 1568634626

View Profile Personal Message (Offline)

Ignore
1568634626
Reply with quote  #2

1568634626
Report to moderator
BrewMaster
Hero Member
*****
Offline Offline

Activity: 1302
Merit: 789


There is trouble abrewing


View Profile
November 23, 2017, 03:43:17 PM
 #2

*last* price is the most accurate price because it is the price that a trade has actually happened. the market price like bids and asks may be anything at anytime but as long as nobody is willing to fill these orders the "real price" is the last one.

besides, in a liquid market there is not much difference between last price and bid and ask prices. they are all within a very small space probably less than 0.5% apart.
give it a try yourself. for example take bitcoin price, Last, Bid, Ask. and see how different these are from each other. usually the APIs have one call called Ticker which gives you all 3 and some more in one place.

evgen_povt
Member
**
Offline Offline

Activity: 123
Merit: 10


View Profile
November 23, 2017, 07:45:52 PM
 #3

I'm working on grabbing prices from multiple exchanges, and I know with things like EtherDelta it's far too easy to place an out-of-order trade way beyond the reasonable bid/ask range. So for an application to represent the accurate price, we can't go with the *last* price. Should we just present the latest bid? The average between bid and ask? The last closing trade that also is still within 10% of the bid/ask?

It depends on your purposes.
I believe the prices should be weighted based on volume, especially for low liquid coins.
CryptoMonitorBot
Member
**
Offline Offline

Activity: 103
Merit: 10

Crypto Monitoring Bot is life =)


View Profile WWW
November 23, 2017, 07:56:39 PM
 #4

*last* price is the most accurate

Nop, nop nop nop.

Imagine if the price increase from 600 sats to 800 sats because someone spent 50k USD
Do you want to buy at 800 sats ? No.

You need to check if the bid is up the last, or if the ask is down the last and check the % difference.
In certain situations there's something wrong and you don't want to buy high or sell low.

I would clearly create multiple scenarios based on the situation and adapt the price according to that  Cool

CryptoMonitor.tech 🔹 Telegram Bot 🔹 Alerts 🔹 MultiConverter 🔹 BittrexTicker 🔹 Wallet checker
BrewMaster
Hero Member
*****
Offline Offline

Activity: 1302
Merit: 789


There is trouble abrewing


View Profile
November 24, 2017, 05:03:54 PM
 #5

*last* price is the most accurate
In certain situations there's something wrong and you don't want to buy high or sell low.

well OP didn't say anything about buying or selling.
my understanding was that he wanted to just "display" the price possibly for analysis purposes.

of course if you want to make a trade you have to check the orderbook itself (bids/asks). that much is obvious.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!