Code Monkey home page Code Monkey logo

coincap.io's Introduction

CoinCap.io

This API will continue to operate as it has, but will be shut down on March 1, 2019. Our new API is: https://docs.coincap.io/


REST URLs

/coins

  • Description: Array of all supported coins
  • URL: http://coincap.io/coins
  • Response:
    ["300", "611", "808", "888", "INPAY", "XNG", "ARGUS", "DBIX", "DAR", "HMQ"]

/map

  • Description: JSON object of Coin symbols/names and known aliases
  • URL: http://coincap.io/map
  • Response:
    [
        {
            "aliases": [],
            "name": "300 Token",
            "symbol": "300"
        },
        {
            "aliases": [],
            "name": "SixEleven",
            "symbol": "611"
        },
        {
            "aliases": [],
            "name": "808Coin",
            "symbol": "808"
        }
    ]

/front

  • Description: Front Page Data of current coin stats
  • URL: http://coincap.io/front
  • Response:
    [
        {
            "cap24hrChange": -6.05,
            "long": "Bitcoin",
            "mktcap": 65173805891.25,
            "perc": -6.05,
            "price": 3934.85,
            "shapeshift": true,
            "short": "BTC",
            "supply": 16563225,
            "usdVolume": 2337600000,
            "volume": 2337600000,
            "vwapData": 3997.5639538606733,
            "vwapDataBTC": 3997.5639538606733
        },
        {
            "cap24hrChange": -6.59,
            "long": "Ethereum",
            "mktcap": 26016428866.32,
            "perc": -6.59,
            "price": 275.02,
            "shapeshift": true,
            "short": "ETH",
            "supply": 94598316,
            "usdVolume": 945732000,
            "volume": 945732000,
            "vwapData": 278.03921067242516,
            "vwapDataBTC": 278.03921067242516
        }
    ]

/global

  • Description: Global data
  • URL: http://coincap.io/global
  • Response:
    {
        "altCap": 70056946653.0021,
        "bitnodesCount": 9350,
        "btcCap": 65003614189.66167,
        "btcPrice": 3924.57472440673,
        "dom": 69.48,
        "totalCap": 135060560842.66382,
        "volumeAlt": 578834063.4608318,
        "volumeBtc": 1317521389.0430577,
        "volumeTotal": 1896355452.5038888
    }

/page/:coin

  • Description: must search by symbol ex BTC returns all data on a specific coin
  • URL: http://coincap.io/page/ETC
    {
        "altCap": 70977893975.02808,
        "bitnodesCount": 9350,
        "btcCap": 65149292318.25,
        "btcPrice": 3933.37,
        "dom": 69.49,
        "totalCap": 136127186293.27805,
        "volumeAlt": 579507047.7508223,
        "volumeBtc": 1319701715.2883158,
        "volumeTotal": 1899208763.0391374,
        "id": "ETC",
        "_id": "c2f0fa55-495c-41e2-ad77-c66545b6d584",
        "cap24hrChange": -2.45,
        "display_name": "Ethereum Classic",
        "status": "available",
        "supply": 95478079,
        "volume": 106044000,
        "vwap_h24": 14.584250499041465,
        "price_btc": 0.003659301940567121,
        "price_eth": 0.052350773626971485,
        "price_eur": 12.076,
        "price_usd": 14.334776791590517,
        "price_ltc": 0.2325328883760402,
        "price_zec": 0.06845529547566803,
        "market_cap": 1368656950.954846,
        "type": "cmc",
        "price": 14.1888
    }

/history/:coin

  • Description: Returns all history on a coin
  • URL: http://coincap.io/history/BTC
  • Response:
    {
        "market_cap": [
            [
                1504664370000,  // unix time (milliseconds)
                74300994770     // market cap
            ],
            [
                1504750775000,
                74594182198
            ]
        ],
        "price" : [
            [
                1504750775000,
                4507.45 
            ],
            [
                1504839280000,
                4599.26
            ]
        ],
        "volume": [
            [
                1504750775000,  
                2095800000   
            ],
            [
                1504839280000,
                1752760000
            ]
        ]
    }

/history/1day/:coin

/history/7day/:coin

/history/30day/:coin

/history/90day/:coin

/history/180day/:coin

/history/365day/:coin

Socket API

https://coincap.io

To connect to CoinCap WebSockets you must use socket.io-client 1.4.6 or another websocket client compatiable with that version of Socket.io

Sample code attached

Socket Response

{
	"coin": "XMR",
	"exchange_id": "bittrex",
	"market_id": "ETH_XMR",
	"message": {
		"coin": "XMR",
		"msg": {
			"cap24hrChange": -6.96,
			"long": "Monero",
			"mktcap": 1581966162.9998832,
			"perc": -6.96,
			"price": 113.18142493836066,
			"shapeshift": true,
			"short": "XMR",
			"supply": 15074975,
			"usdVolume": 46837300,
			"volume": 46837300,
			"vwapData": 109.52716734604815,
			"vwapDataBTC": 109.52716734604815
		}
	},
	"msg": {
		"cap24hrChange": -6.96,
		"long": "Monero",
		"mktcap": 1581966162.9998832,
		"perc": -6.96,
		"price": 113.18142493836066,
		"shapeshift": true,
		"short": "XMR",
		"supply": 15074975,
		"usdVolume": 46837300,
		"volume": 46837300,
		"vwapData": 109.52716734604815,
		"vwapDataBTC": 109.52716734604815
	}
}

coincap.io's People

Contributors

apense avatar coincapdev avatar erf avatar iamskippy0 avatar iratesiddhartha avatar jeremyburr avatar realrasengan avatar rohitjha avatar sebs avatar shapeshiftmatt avatar sochinecc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coincap.io's Issues

Improve initial history performance

First time doing a history request is slow.

time curl http://coincap.io/history/180day/BTC

First try responded in 4.341 seconds.. Additional tries are usually very fast.

Would be awesome if you could improve on this. Thanks for a great API !

Open source

Have you considered open sourcing the API ?

Maybe more people could help out.

The DASH funds not are yet

Hi, dears I sent 0.04403492 BTC to 1A1kEfY1dnfTF9x3oNQZVAVnJHd8kRwBGs for buy DASH, but the funds not are into my DASH Wallet yet

Transport unknown in response

I have copied this exactly in my index.html file with correct path to socket.io.js


<script src="yourlibpath/socket.io.js"></script>

<script type="text/javascript">
    var socket = io.connect('http://socket.coincap.io');

    socket.on('trades', function (tradeMsg) {
        console.log(tradeMsg);
    })

    socket.on('global', function (globalMsg) {
        console.log(globalMsg);
    })
</script>

The problem I have is the response

{code: 0, message: "Transport unknown"}
code: 0
message: "Transport unknown"

How is this fixed?

Returning tokens

Currently it's impossible to know whether the cryptocurrency is a token or not, is it planned to have a param for returning only tokens from the API?

Some coins return empty history arrays when a period is specified

For some coins the coincap.io/history/:coin works fine but the coincap.io/history/:period/:coin API returns empty arrays.

Affected coins:

  • Basic Attention Token (BAT)
  • Bytecoin (BCN)
  • Golem (GNT)
  • Gnosis (GNO)
  • possibly others

coincap.io/history/1day/BAT example response:

{
  market_cap: [ ],
  price: [ ],
  volume: [ ]
}

MOD, XRP and other coins missing in socket stream?

Hi,

I was listening to socket stream for a while but didn't receive any Modum (MOD), Red Pulse (RPX) changes. Can I somehow get these coins from stream or is it only possible to get them from API calls since they are not in Bittrex/etc exchanges yet?

History lagging behind for XLM ( and others )

If you request http://coincap.io/history/1day/XLM, you'll see that the the time point before the last one for prices is 1476416950000, which is 14 October 2016. The points before that is also delayed. The last point is 1510755221928, which is up to date.

This delay, as mentioned #48, also occurs for other coins.

Https?

Does the api have an https option? Or do you only have http?

/front endpoint not updating?

I have a bot that pings /front and displays some data.
The problem is the data is stale and has been for days.

I have tested with postman on different devices/IPs and the same stale data is displayed.

I had an assue with a Coincap.io transfer

I had an issue with a Coincap.io transfer. I tried to transfer https://blockchain.info/tx/8c49208c2c3866384da6be5c7779905508f29050b4eabcc114a808e6dd5395fa money through Coincap.io to get peercoin and it never came through. I would like the bitcoin in this transfer sent back to me. The PPC receiving address isn't even in the PPC blockchain yet so CoinCap has made attempt to complete the transfer PTnobWa3RBUrZwdWJwk1Ba5tKr6Si8CrYt. Because it too a long time and nothing happened I would just like my Bitcoin back.
coincap io
coincap io 1

vwapData?

When calling: http://coincap.io/front

Something like this is returned...

[
  {
    "shapeshift": true,
    "position24": "1",
    "position": "1",
    "short": "BTC",
    "long": "Bitcoin",
    "time": 1445264668141,
    "price": "264.416",
    "perc": "0.46",
    "volume": "25405800",
    "usdVolume": "25405800",
    "cap24hrChange": "0.46",
    "mktcap": "3897624048",
    "supply": "14740500",
    "published": false,
    "vwapData": 266.3100005172462
  },

  ...
]

What's the difference between vwapData and price? They look very similar across all of the coins respectively.

Please its not working??

Hi there,

Thank you very much for this project! I embedded the script to a html page,

<script src="yourlibpath/socket.io.js"></script> <script type="text/javascript"> var socket = io.connect('http://socket.coincap.io'); socket.on('trades', function (tradeMsg) { console.log(tradeMsg); }) socket.on('global', function (globalMsg) { console.log(globalMsg); }) </script>

It's not showing. What did I missed please? Any help will be appreciated! Thank you so much!

Best Regards,
Mark

Make Assets filterable by meta-protocol

We're using the API in https://github.com/loon3/LTB-Companion-Wallet which is a Bitcoin + Counterparty Assets wallet. Currently assets are not filterable so we also get Omni, NXT assets and other prices that are irrelevent to our application.

Request: Please make assets filterable by the meta-protocol they are built on to allow efficient requests without the unnecessary information.

Few questions

  1. is there a way to get all coins and which exchanges they are listed on?

  2. I could not find which exchange's data is included in the api, i listened to the socket.io api for about an hour and could only see bittrexx and kraken trades.

  3. is there a way to get icons for all the coins?

  4. when is v2.0 of the api suppose to release?

  5. what are the limitations of using this api, are we expected to have a rate limit when calling the apis?

  6. Is t here a better place/platform to ask questions in the future than having to fill out issues on github?

Thank you for providing a very valuable service

form

as my form to add new coins in the coincap ??

Did you switch the Socket.io host?

The documentation suggests connecting to http://socket.coincap.io, which used to work, but now that address doesn't seem to respond, and instead connecting to http://coincap.io works.

Is that change permanent? Worth updating the docs if it is.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.