{"id":21031486,"url":"https://github.com/slaveofcode/btcid","last_synced_at":"2025-12-30T05:42:07.104Z","repository":{"id":57160850,"uuid":"117401376","full_name":"slaveofcode/btcid","owner":"slaveofcode","description":"Simple Node.js wrapper library for bitcoin.co.id API","archived":false,"fork":false,"pushed_at":"2018-01-22T03:50:48.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-19T23:49:23.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slaveofcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-14T04:25:38.000Z","updated_at":"2018-01-22T03:28:43.000Z","dependencies_parsed_at":"2022-08-24T08:11:29.068Z","dependency_job_id":null,"html_url":"https://github.com/slaveofcode/btcid","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fbtcid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fbtcid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fbtcid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fbtcid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slaveofcode","download_url":"https://codeload.github.com/slaveofcode/btcid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243471926,"owners_count":20296227,"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":[],"created_at":"2024-11-19T12:28:41.636Z","updated_at":"2025-12-30T05:42:07.074Z","avatar_url":"https://github.com/slaveofcode.png","language":"JavaScript","readme":"# BTCId\n\nThis is a simple implementation on Node.js library to request data from [bitcoin.co.id](http://bitcoin.co.id). You are required to register as a member on bitcoin.co.id and get the **API Key** and **Secret Key** in order to use this library, especially the private API.\n\n## REQUIREMENTS\n\n* NodeJs ver. 8 or later\n\n## INSTALLATION\n\n    npm i @slaveofcode/btcid --save\n\n## HOW TO USE\n\n    const btcid = require('btcid)\n\n    const btcInst = btcid('myApiKey', 'mySecretKey')\n\n    // public api section\n    btcInst.bitCoin.trades().then(res =\u003e console.log(res))\n    btcInst.stellarLumen.trades().then(res =\u003e console.log(res))\n\n    // private api section\n    btcInst.showInfo().then(res =\u003e console.log(res))\n\n## FUNCTION DOCS\n\nThis library follows API pattern and description on here [https://vip.bitcoin.co.id/downloads/BITCOINCOID-API-DOCUMENTATION.pdf](https://vip.bitcoin.co.id/downloads/BITCOINCOID-API-DOCUMENTATION.pdf) so if anything on documentation is updated, this library may obsolete and need upgrade to sync with the new version.\n\nThe documentation of available function divided into 2 section, **Public** and **Private** section. The public section is not required to supply **Api Key** and **Secret Key** because they just available to you without any restriction. On private section, **Api Key** and **Secret Key** is required because some of actions and response data are related with your account.\n\nPlease check your **Trade API permission** on bitcoin.co.id, if some of permission was not enabled, this library may not works because un-granted permission prevent some actions such as withdrawing your coin.\n\n### public function\n\n`trade`, `depth` and `ticker` functions are available on all public exchanges api such as `bitcoin` and `stellarLumen`, the code below is the example of how you fetch it.\n\n    // BTC/IDR\n\n    const btcid = require('btcid)\n    const btcInst = btcid('myApiKey', 'mySecretKey')\n\n    // Get trades\n    btcInst.bitcoin\n      .trades()\n      .then(res =\u003e {\n        console.log(res)\n        // [{ date: '1515931908',\n        // price: '184499000',\n        // amount: '0.00124928',\n        // tid: '5580857',\n        // type: 'buy' }, ... ]\n      })\n\n    // Get depth\n    btcInst.bitcoin\n      .depth()\n      .then(res =\u003e {\n        console.log(res)\n        // {\n        //  \"buy\": [\n        //    [\n        //      1381900,\n        //      \"0.38504088\"\n        //    ],\n        //    [\n        //      1380200,\n        //      \"128.30297275\"\n        //    ], ...\n      })\n\n    // Get ticker\n    btcInst.bitcoin\n      .ticker()\n      .then(res =\u003e {\n        console.log(res)\n        // ticker:\n        // { high: '213900000',\n        // low: '180018000',\n        // vol_btc: '905.70906859',\n        // vol_idr: '179723835524',\n        // last: '181598000',\n        // buy: '181598000',\n        // sell: '181599000',\n        // server_time: 1515934133 }, ... ]\n      })\n\n| Market          | Function Name      | Function Child              |\n| --------------- | ------------------ | --------------------------- |\n| (IDR) BTC/IDR   | bitcoinIdr         | `ticker`, `trades`, `depth` |\n| (IDR) BCH/IDR   | bitCoinCashIdr     | `ticker`, `trades`, `depth` |\n| (IDR) BTG/IDR   | bitCoinGoldIdr     | `ticker`, `trades`, `depth` |\n| (IDR) ETH/IDR   | ethereumIdr        | `ticker`, `trades`, `depth` |\n| (IDR) ETC/IDR   | ethereumClassicIdr | `ticker`, `trades`, `depth` |\n| (IDR) IGNIS/IDR | ignisIdr           | `ticker`, `trades`, `depth` |\n| (IDR) LTC/IDR   | liteCoinIdr        | `ticker`, `trades`, `depth` |\n| (IDR) NXT/IDR   | nxtIdr             | `ticker`, `trades`, `depth` |\n| (IDR) WAVES/IDR | wavesIdr           | `ticker`, `trades`, `depth` |\n| (IDR) XRP/IDR   | rippleIdr          | `ticker`, `trades`, `depth` |\n| (IDR) XZC/IDR   | zCoinIdr           | `ticker`, `trades`, `depth` |\n| (IDR) XLM/IDR   | stellarLumenIdr    | `ticker`, `trades`, `depth` |\n| (BTC) BTS/BTC   | bitSharesBtc       | `ticker`, `trades`, `depth` |\n| (BTC) XLM/BTC   | stellarLumenBtc    | `ticker`, `trades`, `depth` |\n| (BTC) DASH/BTC  | dashBtc            | `ticker`, `trades`, `depth` |\n| (BTC) DOGE/BTC  | dogeBtc            | `ticker`, `trades`, `depth` |\n| (BTC) ETH/BTC   | ethereumBtc        | `ticker`, `trades`, `depth` |\n| (BTC) LTC/BTC   | liteCoinBtc        | `ticker`, `trades`, `depth` |\n| (BTC) NXT/BTC   | nxtBtc             | `ticker`, `trades`, `depth` |\n| (BTC) NEM/BTC   | nemBtc             | `ticker`, `trades`, `depth` |\n| (BTC) XRP/BTC   | rippleBtc          | `ticker`, `trades`, `depth` |\n\n### private function\n\n| Function Name      | API Methods (API Docs) | Parameter                                         | Example                                                                                                                         |\n| ------------------ | ---------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |\n| showInfo           | getInfo                | None                                              | `btcInst.showInfo().then(res =\u003e console.log(res.data))`                                                                         |\n| transactionHistory | transHistory           | None                                              | `btcInst.transactionHistory().then(res =\u003e console.log(res.data))`                                                               |\n| tradeHistory       | tradeHistory           | `pair name`, `start date`, `end date`, `config`   | `btcInst.tradeHistory('str_btc', '2017-12-12', '2018-01-01', {count: 1000}).then(res =\u003e console.log(JSON.stringify(res.data)))` |\n| showOpenOrders     | openOrders             | `pair name` or None (all pairs)                   | `btcInst.showOpenOrders().then(res =\u003e console.log(JSON.stringify(res.data)))`                                                   |\n| showOrderHistory   | orderHistory           | `pair name` or None (all pairs)                   | `btcInst.showOrderHistory().then(res =\u003e console.log(JSON.stringify(res.data)))`                                                 |\n| getOrder           | getOrder               | `pair name`, `order id`                           | `btcInst.getOrder('str_idr', 4630225).then(res =\u003e console.log(JSON.stringify(res.data)))`                                       |\n| cancelOrder        | cancelOrder            | `pair name`, `order id`, `type` (`buy` or `sell`) | `btcInst.cancelOrder('str_idr', 18, 'buy').then(res =\u003e console.log(JSON.stringify(res.data)))`                                  |\n| trade              | trade                  | `pair name`, `type` (`buy` or `sell`), `price`    | `btcInst.trade('str_idr', 'buy', 7200).then(res =\u003e console.log(JSON.stringify(res.data)))`                                      |\n\nMoreover you could see the source of these function at `src/private_fn/index.js`. Go ahead and open an issue if you found a bug.\n\n## LICENSE\n\nMIT (yes you're free to use this)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslaveofcode%2Fbtcid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslaveofcode%2Fbtcid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslaveofcode%2Fbtcid/lists"}