coingecko / cryptoexchange

[UNMAINTAINED] Ruby library to query market data from cryptocurrency exchanges (https://www.coingecko.com)
https://www.coingecko.com
MIT License
298 stars 239 forks source link

Implement Stellar Decentralized Exchange Ticker #294

Open bobbyong opened 6 years ago

bobbyong commented 6 years ago

https://stellarterm.com/#markets

Swingcloud commented 6 years ago

let me do this

Swingcloud commented 6 years ago

https://api.stellarterm.com/v1/ticker.json

Swingcloud commented 6 years ago

@tmlee According to this respond, seems the same BTC will separate to different issuer, so I need to separate them? ( show base XLM-native and target BTC-xxx )


"XLM-native/BTC-apay.io": {
"baseBuying": {
"code": "XLM",
"issuer": null
},
"counterSelling": {
"code": "BTC",
"issuer": "GAUTUYY2THLF7SGITDFMXJVYH3LHDSMGEAKSBU267M2K7A3W543CKUEF"
},
"bid": 0.0000328,
"ask": 0.0000329,
"spread": 0.003,
"price": 0.0000329,
"depth10Amount": 1,
"volume24h_XLM": 3306.24,
"numTrades24h": 28
},
"XLM-native/BTC-vcbear.net": {
"baseBuying": {
"code": "XLM",
"issuer": null
},
"counterSelling": {
"code": "BTC",
"issuer": "GDXTJEK4JZNSTNQAWA53RZNS2GIKTDRPEUWDXELFMKU52XNECNVDVXDI"
},
"bid": 0.0000029,
"ask": 0.000033,
"spread": 0.9121,
"price": 0.000018,
"depth10Amount": 0,
"volume24h_XLM": 0,
"numTrades24h": 0
}
tmlee commented 6 years ago

@Swingcloud

I think you can assume everything trades against XLM

For example

{
      "id": "RMT-GCVWTTPADC5YB5AYDKJCTUYSCJ7RKPGE4HT75NIZOUM4L7VRTS5EKLFN",
      "code": "RMT",
      "issuer": "GCVWTTPADC5YB5AYDKJCTUYSCJ7RKPGE4HT75NIZOUM4L7VRTS5EKLFN",
      "domain": "sureremit.co",
      "slug": "RMT-sureremit.co",
      "website": "https://sureremit.co",
      "topTradePairSlug": "RMT-sureremit.co/XLM-native",
      "change24h_XLM": 43.95,
      "change24h_USD": 44.25,
      "price_XLM": 0.10651,
      "price_USD": 0.023138,
      "numTrades24h": 323,
      "_numTradeRecords24h": 56,
      "volume24h_XLM": 291208.48,
      "volume24h_USD": 63263.3,
      "spread": 0.0635,
      "numBids": 20,
      "numAsks": 20,
      "depth10_XLM": 11968,
      "depth10_USD": 2599.98,
      "activityScore": 25.53
    },

Base: RMT Target: XLM last: volume: volume24h_XLM no high no low ...

wongy91 commented 6 years ago

i'll takeover.