Skip to content

Instantly share code, notes, and snippets.

@T-Spoon
Last active December 14, 2017 06:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save T-Spoon/11346255 to your computer and use it in GitHub Desktop.
Save T-Spoon/11346255 to your computer and use it in GitHub Desktop.
CoinMarketCap Historical Data
Some notes about how to get historical data from CoinMarketCap
1) Each coin has the data included on the CoinMarketCap/all page. The format is like this:
`$.plot($("#Bitcoin"), [{data:[[1398001262000.0, 6344198380.791152], [1398012063000.0, 6237711427.541809], [1398022862000.0, 6309412922.992338], [1398033663000.0, 6297734397.940344], [1398044462000.0, 6442102403.521351], [1398055263000.0, 6427057678.10135], [1398066362000.0, 6413917378.654722], [1398077162000.0, 6306678698.03327], [1398087962000.0, 6305619311.974236], [1398098762000.0, 6282518185.488187], [1398109562000.0, 6288232781.98613], [1398120362000.0, 6276542233.044095], [1398131162000.0, 6314550944.57087], [1398141962000.0, 6353838870.621136], [1398152762000.0, 6278126508.149567], [1398163562000.0, 6262108922.32085], [1398174362000.0, 6227783573.404398], [1398185163000.0, 6248901780.768519], [1398195962000.0, 6245269899.731453], [1398206763000.0, 6182582307.456224], [1398217563000.0, 6254759691.792059], [1398228362000.0, 6222483274.859675], [1398241263000.0, 6227533087.831254], [1398252062000.0, 6222867074.983421], [1398262862000.0, 6187092438.484849], [1398273662000.0, 6184558159.385716], [1398284462000.0, 6215059095.749224], [1398295263000.0, 6217527457.8206415], [1398306062000.0, 6235776809.649189], [1398316862000.0, 6210678826.248882], [1398329162000.0, 6155846701.495372], [1398339962000.0, 6205453934.740746], [1398350762000.0, 6243608560.971371], [1398361562000.0, 6228389563.823179], [1398372363000.0, 6278280972.050922], [1398383162000.0, 6339243789.564511], [1398393962000.0, 6296793087.3019905], [1398404762000.0, 5899154800.647279], [1398417062000.0, 5835409337.5692425], [1398427863000.0, 5657347829.390018], [1398438662000.0, 5744354219.696717], [1398449462000.0, 5771718441.247117], [1398460262000.0, 5838788208.541095], [1398471062000.0, 5879381902.400166], [1398481862000.0, 5717502458.260149], [1398493564000.0, 5754544307.078601], [1398504362000.0, 5733221816.379138], [1398515162000.0, 5744092059.042671], [1398525962000.0, 5894785999.432838], [1398536762000.0, 5856118629.144597], [1398547562000.0, 5846335561.422789], [1398558362000.0, 5811968924.276528], [1398569162000.0, 5763113900.530572], [1398581462000.0, 5799271691.477266], [1398592262000.0, 5775326192.418458], [1398603062000.0, 5780034835.811112]]}], { xaxis: { mode: "time", ticks: false}, yaxis : {tickDecimals: 0, ticks: false}});`
More concisely: `$.plot($("#<COIN_NAME>"), [{data:[[<TIMESTAMP>, <MARKET_CAP>],...]}]`
2) This only includes MarketCap data - not the price data. For price data, each coin page must be visited individually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment