{"id":22018211,"url":"https://github.com/sahlhoff/node-coinbase-api","last_synced_at":"2026-04-16T08:34:40.909Z","repository":{"id":14583051,"uuid":"17299513","full_name":"sahlhoff/node-coinbase-api","owner":"sahlhoff","description":"Nodejs coinbase api wrapper","archived":false,"fork":false,"pushed_at":"2014-03-03T21:40:36.000Z","size":204,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T16:16:45.931Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sahlhoff.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}},"created_at":"2014-02-28T20:56:12.000Z","updated_at":"2017-05-17T20:34:57.000Z","dependencies_parsed_at":"2022-09-12T11:01:59.685Z","dependency_job_id":null,"html_url":"https://github.com/sahlhoff/node-coinbase-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahlhoff%2Fnode-coinbase-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahlhoff%2Fnode-coinbase-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahlhoff%2Fnode-coinbase-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahlhoff%2Fnode-coinbase-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahlhoff","download_url":"https://codeload.github.com/sahlhoff/node-coinbase-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245081642,"owners_count":20557821,"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-30T05:10:57.586Z","updated_at":"2026-04-16T08:34:35.889Z","avatar_url":"https://github.com/sahlhoff.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"##Coinbase\n\nCoinbase's api [details here](https://coinbase.com/api/doc)\n\n## Installation\n\n```bash\n$ npm install ballin-coinbase-api\n```\n\nRequire coinbase\n\n```\nvar Coinbase = require('ballin-coinbase-api');\n\ncoinbase = new Coinbase();\n```\n\n## Usage\n\n### Account\n\n##### GET /api/v1/account/balance\nGet the user's account balance in BTC.\n\n```\ncoinbase.account.balance(accessToken, function(err, balance){\n    console.log(balance);\n});\n```\n\n##### GET /api/v1/account/receive_address\nGet the user's current bitcoin receive address.\n\n```\ncoinbase.account.receiveAddress(accessToken, function(err, address){\n    console.log(address); \n});\n```\n\n##### GET /api/v1/account/generate_receive_address\nGenerates a new bitcoin receive address for the user.\n\n```\ncoinbase.account.generateReceiveAddress(accessToken, function(err, address){\n    console.log(address);\n});\n```\n\n### Buttons\n\n##### POST /api/v1/buttons\nCreate a new payment button, page, or iFrame.\n\n```\nvar param = {\n    \"button\": {\n        \"name\": \"test\",\n        \"type\": \"buy_now\",\n        \"price_string\": \"1.23\",\n        \"price_currency_iso\": \"USD\",\n        \"custom\": \"Order123\",\n        \"callback_url\": \"http://www.example.com/my_custom_button_callback\",\n        \"description\": \"Sample description\",\n        \"type\": \"buy_now\",\n        \"style\": \"custom_large\",\n        \"include_email\": true\n    }\n}\n\ncoinbase.buttons.create(accessToken, param, function(err, button){\n   console.log(button); \n});\n```\n\n### Buys\n\n##### POST /api/v1/buys\nPurchase bitcoin by debiting your U.S. bank account.\n\n```\nvar param = {\n    {\n        \"qty\": 1\n    }\n}\n\ncoinbase.buy(accessToken, param, function(err, buy){\n    console.log(buy);\n});\n```\n\n### Contacts\n\n##### GET /api/v1/contacts\nList emails the user has previously used for autocompletion.\n\n```\ncoinbase.contacts(accessToken, function(err, contacts){\n    console.log(contacts);\n});\n```\n\n### Currencies\n\n##### GET /api/v1/currencies\nShow currencies supported by Coinbase.\n\n```\ncoinbase.currencies.list(accessToken, function(err, currencies){\n    console.log(currencies);\n});\n```\n\n##### GET /api/v1/currencies/exchange_rates\nShow exchange rates between BTC and other currencies.\n```\ncoinbase.currencies.exchangeRates(function(err, rates){\n    console.log(rates);\n});\n```\n\n### Orders\n\n##### GET /api/v1/orders\nList merchant orders received.\n```\ncoinbase.orders.list(accessToken, function(err, orders){\n    console.log(orders);\n});\n```\n\n##### GET /api/v1/orders/:id\nShow an individual merchant order.\n```\ncoinbase.orders.get(accessToken, id, function(err, order){\n    console.log(order);\n});\n```\n\n### Prices\n\n##### GET /api/v1/prices/spot_rate\nGet the spot price of bitcoin.\n```\ncoinbase.spotRate(function(err, spotRate){\n    console.log(spotRate);\n});\n```\n\n### Transactions\n\n##### GET /api/v1/transactions\nList a user's recent transactions.\n```\ncoinbase.transactions.list(accessToken, param, function(err, transactions){\n    console.log(transactions);\n});\n```\n\n##### GET /api/v1/transactions/:id\nShow details for an individual transaction.\n```\ncoinbase.transactions.get(accessToken, id, function(err, transaction){\n    console.log(transaction);\n});\n```\n\n##### POST /api/v1/transactions/send_money\nSend bitcoins to an email address or bitcoin address.\n```\nvar transaction = {\n    \"transaction\": {\n        \"to\": \"chad@sahlhoff.com\",\n        \"amount\": \"1.234\",\n        \"notes\": \"Sample transaction for you\"\n    }\n}\ncoinbase.transactions.sendMoney(accessToken, transaction, function(err, data){\n    console.log(data);\n});\n```\n\n##### POST /api/v1/transactions/request_money\nSend an invoice/money request to an email address.\n```\nvar transaction = {\n        \"transaction\": {\n        \"from\": \"user1@example.com\",\n        \"amount\": \"1.234\",\n        \"notes\": \"Sample transaction for you\"\n    }\n}\ncoinbase.transactions.requestMoney(accessToken, transaction, function(err, data){\n    console.log(data);\n});\n```\n\n##### PUT /api/v1/transactions/:id/resend_request\nResend emails for a money request.\n```\ncoinbase.transactions.resendRequest(accessToken, id, function(err, data){\n    console.log(data);\n});\n```\n\n##### DELETE /api/v1/transactions/:id/cancel_request\nCancel a money request.\n```\ncoinbase.transactions.cancelRequest(accessToken, id, function(err, data){\n    console.log(data);\n});\n```\n\n### Transfers\n\n##### GET /api/v1/transfers\nList a user's recent buys and sells.\n```\ncoinbase.transfers.list(accessToken, function(err, transfers){\n    console.log(transfers);\n});\n```\n\n### Users\n\n##### GET /api/v1/users\nShow current user with account settings.\n```\ncoinbase.users.account(accessToken, function(err, account){\n    console.log(account);\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahlhoff%2Fnode-coinbase-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahlhoff%2Fnode-coinbase-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahlhoff%2Fnode-coinbase-api/lists"}