cryptoqween / cryptoqween.github.io

CryptoCompare API tutorials
194 stars 114 forks source link

Trade flags are different than cryptocompare api #19

Closed plondon closed 6 years ago

plondon commented 6 years ago

https://github.com/cryptoqween/cryptoqween.github.io/blob/master/streamer/ccc-streamer-utilities.js#L191-L193

CCC.TRADE.FLAGS = {
   'SELL'       : 0x1 // hex for binary 1
 , 'BUY'        : 0x2 // hex for binary 10
 , 'UNKNOWN'    : 0x4 // hex for binary 100
}

But crypto compare shows:

Flag    Description
1    Buy
2    Sell
4    Unknown

Any idea which is correct?

cryptoqween commented 6 years ago

Hi, it's a typo on the API docs, thanks for noticing. It's the code that's correct.