{"id":24290536,"url":"https://github.com/dutu/luno-api-node","last_synced_at":"2026-05-21T16:04:24.901Z","repository":{"id":74504632,"uuid":"232273349","full_name":"dutu/luno-api-node","owner":"dutu","description":"A simple Node.js wrapper for the Luno API.","archived":false,"fork":false,"pushed_at":"2022-12-21T10:25:23.000Z","size":358,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T11:59:38.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/dutu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-01-07T07:57:49.000Z","updated_at":"2022-07-14T06:44:38.000Z","dependencies_parsed_at":"2023-03-15T18:16:05.386Z","dependency_job_id":null,"html_url":"https://github.com/dutu/luno-api-node","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fluno-api-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fluno-api-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fluno-api-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutu%2Fluno-api-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dutu","download_url":"https://codeload.github.com/dutu/luno-api-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242135136,"owners_count":20077397,"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":"2025-01-16T11:53:12.000Z","updated_at":"2026-05-21T16:04:24.805Z","avatar_url":"https://github.com/dutu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# luno-api-node\n\nA simple wrapper for the Luno API. The module supports promise and callbacks.\n\n\u003e This module is forked from https://github.com/bausmeier/node-bitx. \n\u003e Since the original repository is not maintained anymore, starting with version v2.0.0 this fork has been detached from original repository. It is now stand alone. Contributions are not pull-requested to original repository.\n\n## Usage\nAdd luno as a dependency:\n\n```bash\n$ npm install --save luno-api-node\n```\n\n\n### Luno([keyId, keySecret][, options])\nTo access the private Luno API methods you must supply your key id and key secret as the first two arguments. If you are only accessing the public API endpoints you can leave these two arguments out.\n\nThe optional `options` argument can be used to override the default options. The default options are equivalent to:\n\n```js\n{\n  hostname: 'api.luno.com',\n  port: 443,\n  ca: undefined,\n  pair: 'XBTZAR'\n}\n```\n\n## Properties\n\n### apiCallRate\n\nGives the current rate per minute of API calls. The property is read only.\nIt can be used by applications to limit the API call rate to prevent HTTP error code `429` (too many requests) responses from Luno server.\nSee Luno API documentation for applicable rate limitations: https://www.luno.com/en/developers/api#tag/Rate-Limiting\n\n\u003e API calls which result in error code `429` or `ErrTooManyRequests` are considered failed/unprocessed server request and are not added to the `apiCallRate` counter\n\nExample:\n\n```javascript\nconsole.log(luno.apiCallRate)\n```\n\n\n## Methods\nFor details about the API endpoints see https://www.luno.com/en/developers/api.\n\n### Callbacks\nThe arguments passed to the callback function for each method are:\n\n1. An error or `null` if no error occurred.\n2. An object containing the data returned by the Luno API.\n\nThe `callback` function is optional. If the `callback` is not provided, the methods return a promise. \n\n### createAccount(currency, name[, callback])\nPOST https://api.luno.com/api/1/accounts\n\nExample:\n\n```javascript\nluno.createAccount('XBT', 'Trading ACC', function (err, response) {})\n```\n\n\n### updateAccountName(currency, name[, callback])\nPUT https://api.luno.com/api/1/accounts/{id}/name\n\nExample:\n\n```javascript\nluno.updateAccountName(12345, 'Trading ACC', function (err, response) {})\n```\n\n\n### listAccountPendingTransactions(id[, callback])\nGET https://api.luno.com/api/1/accounts/{id}/pending\n\nExample:\n\n```javascript\nluno.listAccountPendingTransactions(12345, function (err, response) {})\n```\n\n\n### listAccountTransactions(id, min_row, max_row[, callback])\nGET https://api.luno.com/api/1/accounts/{id}/transactions\n\nExample:\n\n```javascript\nluno.listAccountTransactions(12345, 1, 1000, function (err, response) {})\n```\n\n\n### listAccountBalances([assets][, callback])\nGET https://api.luno.com/api/1/balance\n\nExample:\n\n```javascript\nluno.listAccountBalances(['XBT', 'ETH'], function (err, response) {})\n```\n\n### getMove(options[, callback])\nGET https://api.luno.com/api/exchange/1/move\n\nExample:\n\n```javascript\nluno.getMove({ id: 18563829047 }, function (err, response) {})\n```\n\n### move(amount, debit_account_id, credit_account_id [,options] [, callback])\nPOST https://api.luno.com/api/exchange/1/move\n\nExample:\n\n```javascript\nluno.move('10000', 12345, 12346, { client_move_id: 'mv-53960812' }, function (err, response) {})\n```\n\n### listMoves([options][, callback])\nGET https://api.luno.com/api/exchange/1/move/list_moves\n\nExample:\n\n```javascript\nluno.listMoves({ before: 1530865703508, limit: 986 }, function (err, response) {})\n```\n\n\n### getTicker([options][, callback])\nGET https://api.luno.com/api/1/ticker/XBTZAR\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair\n}\n```\n\nExample:\n\n```javascript\nluno.getTicker(function (err, ticker) {})\n```\n\n### getAllTickers([callback])\nGET https://api.luno.com/api/1/tickers\n\nExample:\n\n```javascript\nluno.getAllTickers(function (err, tickers) {})\n```\n\n### getOrderBook([options][, callback])\nGET https://api.luno.com/api/1/orderbook\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair\n}\n```\n\nExample:\n\n```javascript\nluno.getOrderBook(function (err, orderBook) {})\n```\n\n### getTrades([options][, callback])\nGET https://api.luno.com/api/1/trades\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair\n}\n```\n\nExample:\n\n```javascript\nluno.getTrades(function (err, trades) {})\n```\n\n### getTradeList([options][, callback])\nGET https://api.luno.com/api/1/listtrades\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair\n}\n```\n\nExample:\n\n```javascript\nluno.getTradeList({ sort_desc: true, limit: 10 }, function (err, tradeList) {})\n```\n\n### getOrderList([options][, callback])\nGET https://api.luno.com/api/1/listorders\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair,\n  state: undefined\n}\n```\n\nExample:\n\n```javascript\nluno.getOrderList({ state: 'PENDING' }, function (err, orderList) {})\n```\n\n### getOrderListV2([options][, callback])\nGET https://api.luno.com/api/exchange/2/listorders\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair,\n  state: undefined\n}\n```\n\nExample:\n\n```javascript\nluno.getOrderListV2({ closed: true }, function (err, orderList) {})\n```\n\n### getOrderListV3(options[, callback])\nGET https://api.luno.com/api/exchange/3/order\n\nExample:\n\n```javascript\nluno.getOrderListV3({ id: 'BXMC2CJ7HNB88U4' }, function (err, orderList) {})\n```\n\n### getBalance([asset][, callback])\nGET https://api.luno.com/api/1/balance\n\nExample:\n\n```javascript\nluno.getBalance('ZAR', function (err, balance) {})\n```\n\n### getFundingAddress(asset[, options][, callback])\nGET https://api.luno.com/api/1/funding_address\n\nDefault options:\n\n```javascript\n{\n  address: undefined\n}\n```\n\nExample:\n\n```javascript\nluno.getFundingAddress('XBT', { address: 'B1tC0InExAMPL3fundIN6AdDreS5t0Use' }, function (err, fundingAddress) {})\n```\n\n### createFundingAddress(asset[, callback])\nPOST https://api.luno.com/api/1/funding_address\n\nExample:\n\n```javascript\nluno.createFundingAddress('XBT', function (err, fundingAddress) {})\n```\n\n### getFeeInfo([options][, callback])\nGET https://api.luno.com/api/1/fee_info\n\nDefault options:\n\n```javascript\n{\n  pair: luno.pair\n}\n```\n\nExample:\n\n```javascript\nluno.getFeeInfo({ pair: 'XBTZAR' }, function (err, feeInfo) {})\n```\n\n### postBuyOrder(volume, price[, options][, callback])\nPOST https://api.luno.com/api/1/postorder\n\nExample:\n\n```javascript\nluno.postBuyOrder(9999.99, 0.01, function (err, order) {})\n```\n\n### postSellOrder(volume, price[, options][, callback])\nPOST https://api.luno.com/api/1/postorder\n\nExample:\n\n```javascript\nluno.postSellOrder(0.01, 9999.99, function (err, order) {})\n```\n\n### postMarketBuyOrder(volume[, options][, callback])\nPOST https://api.luno.com/api/1/marketorder\n\nExample:\n\n```javascript\nluno.postMarketBuyOrder(0.01, function (err, order) {})\n```\n\n### postMarketSellOrder(volume[, options][, callback])\nPOST https://api.luno.com/api/1/marketorder\n\nExample:\n\n```javascript\nluno.postMarketSellOrder(0.01, function (err, order) {})\n```\n\n### stopOrder(orderId[, callback])\nPOST https://api.luno.com/api/1/stoporder\n\nExample:\n\n```javascript\nluno.stopOrder('BXMC2CJ7HNB88U4', function (err, result) {})\n```\n\n### getOrder(orderId[, callback])\nGET https://api.luno.com/api/1/orders/{orderId}\n\nExample:\n\n```javascript\nluno.getOrder('BXHW6PFRRXKFSB4', function (err, result) {})\n```\n\n### getOrderV2(orderId[, callback])\nGET https://api.luno.com/api/exchange/2/orders/{orderId}\n\nExample:\n\n```javascript\nluno.getOrderV2('BXHW6PFRRXKFSB4', function (err, result) {})\n```\n\n### getOrderV3(options[, callback])\nGET https://api.luno.com/api/exchange/3/orders/{orderId}\n\nExample:\n\n```javascript\nluno.getOrderV3({ id: 'BXMC2CJ7HNB88U4' }, function (err, result) {})\nluno.getOrderV3({ client_order_id: 'lmt-53960812' }, function (err, result) {})\n```\n\n### getTransactions(asset[, options][, callback])\nGET https://api.luno.com/api/1/transactions\n\nDefault options:\n```javascript\n{\n  offset: 0,\n  limit: 10\n}\n```\n\nExample:\n\n```javascript\nluno.getTransactions('XBT', { offset: 5, limit: 20 }, function (err, transactions) {})\n```\n\n### getWithdrawals([callback])\nGET https://api.luno.com/api/1/withdrawals\n\nExample:\n\n```javascript\nluno.getWithdrawals(function (err, withdrawals) {})\n```\n\n### getWithdrawal(withdrawalId[, callback])\nGET https://api.luno.com/api/1/withdrawals/{withdrawalId}\n\nExample:\n\n```javascript\nluno.getWithdrawal('1212', function (err, withdrawal) {})\n```\n\n### requestWithdrawal(type, amount[, callback])\nPOST https://api.luno.com/api/1/withdrawals\n\nExample:\n\n```javascript\nluno.requestWithdrawal('ZAR_EFT', 1000, function (err, withdrawal) {})\n```\n\n### cancelWithdrawal(withdrawalId[, callback])\nDELETE https://api.luno.com/api/1/withdrawals/{withdrawalId}\n\nExample:\n\n```javascript\nluno.cancelWithdrawal('1212', function (err, withdrawal) {})\n```\n\n### listTransfers(id[, options][, callback])\nGET https://api.luno.com/api/exchange/1/transfers\n\nExample:\n\n```javascript\nluno.listTransfers(1212, { limit: 986 }, function (err, data) {})\n```\n\n## Contributing\n\nOpen a pull request or create an issue and help me improve it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdutu%2Fluno-api-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdutu%2Fluno-api-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdutu%2Fluno-api-node/lists"}