{"id":22636731,"url":"https://github.com/daroczig/binancer","last_synced_at":"2025-03-17T14:15:26.238Z","repository":{"id":29066520,"uuid":"117139846","full_name":"daroczig/binancer","owner":"daroczig","description":"An R client to the Public Rest API for Binance.","archived":false,"fork":false,"pushed_at":"2024-02-29T13:14:41.000Z","size":181,"stargazers_count":53,"open_issues_count":15,"forks_count":57,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-14T20:42:28.971Z","etag":null,"topics":["api","binance","binance-api","bitcoin","blockchain","cryptocurrency","r","rstats"],"latest_commit_sha":null,"homepage":"https://daroczig.github.io/binancer","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daroczig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-11T18:52:09.000Z","updated_at":"2025-01-12T02:40:46.000Z","dependencies_parsed_at":"2024-02-29T13:45:32.478Z","dependency_job_id":"8b393271-f8b2-4715-a154-0fa9d1613768","html_url":"https://github.com/daroczig/binancer","commit_stats":{"total_commits":152,"total_committers":3,"mean_commits":"50.666666666666664","dds":0.368421052631579,"last_synced_commit":"8cfdfe369980357c49deaf235419ae426af11717"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daroczig%2Fbinancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daroczig%2Fbinancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daroczig%2Fbinancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daroczig%2Fbinancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daroczig","download_url":"https://codeload.github.com/daroczig/binancer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244047646,"owners_count":20389206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","binance","binance-api","bitcoin","blockchain","cryptocurrency","r","rstats"],"created_at":"2024-12-09T03:30:01.027Z","updated_at":"2025-03-17T14:15:26.205Z","avatar_url":"https://github.com/daroczig.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# binancer\n\nAn R client to the Public Rest API for Binance.\n\nAPI docs: https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md\n\nQuick intro to using `binancer` by getting the most recent ~USD price of the cryptocurrencies supported on Binance:\n\n```r\nlibrary(binancer)\nbinance_coins_prices()\n```\n\nGetting data on a specific symbol pair, e.g. the most recent Bitcoin/USDT changes:\n\n```r\n(klines \u003c- binance_klines('BTCUSDT', interval = '1m'))\n```\n\nVisualize this data, e.g. on a simple line chart:\n\n```r\nlibrary(ggplot2)\nggplot(klines, aes(close_time, close)) + geom_line()\n```\n\nPoor man's candle chart with some `ggplot2` tweaks:\n\n```r\nlibrary(scales)\nggplot(klines, aes(open_time)) +\n  geom_linerange(aes(ymin = open, ymax = close, color = close \u003c open), size = 2) +\n  geom_errorbar(aes(ymin = low, ymax = high), size = 0.25) +\n  theme_bw() + theme('legend.position' = 'none') + xlab('') +\n  ggtitle(paste('Last Updated:', Sys.time())) +\n  scale_y_continuous(labels = dollar) +\n  scale_color_manual(values = c('#1a9850', '#d73027')) # RdYlGn\n```\n\nExtend this to multiple pairs in the past 24 hours using 15 mins intervals:\n\n```r\nlibrary(data.table)\nklines \u003c- rbindlist(lapply(\n  c('ETHBTC', 'ARKBTC', 'NEOBTC', 'IOTABTC'),\n  binance_klines,\n  interval = '15m',\n  limit = 4*24))\nggplot(klines, aes(open_time)) +\n  geom_linerange(aes(ymin = open, ymax = close, color = close \u003c open), size = 2) +\n  geom_errorbar(aes(ymin = low, ymax = high), size = 0.25) +\n  theme_bw() + theme('legend.position' = 'none') + xlab('') +\n  ggtitle(paste('Last Updated:', Sys.time())) +\n  scale_color_manual(values = c('#1a9850', '#d73027')) +\n  facet_wrap(~symbol, scales = 'free', nrow = 2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaroczig%2Fbinancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaroczig%2Fbinancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaroczig%2Fbinancer/lists"}