
Security News
AI Agent Submits PR to Matplotlib, Publishes Angry Blog Post After Rejection
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.
Promise based wrapper around the Luno API.
$ npm install luno-api
# OR
$ yarn add luno-api
Wrapper requires a key and secret that can be found in your settings
const Luno = require('luno-api')
const client = new Luno({
key: 'YOUR_KEY',
secret: 'YOUR_SECRET',
defaultPair: 'XBTZAR' // Default pair that is used for requests. if not provided, it will be set to XBTZAR
})
client.getTicker().then(console.log).catch(console.log)
See API section for all possible methods.
Returns the latest ticker indicators.
pair String? Currency pair e.g. XBTZAR (optional, default '')client.getTicker().then(console.log).catch(console.log)
Returns the latest ticker indicators from all active Luno exchanges.
client.getAllTickers().then(console.log).catch(console.log)
Returns a list of bids and asks in the order book
pair String? Currency pair e.g. XBTZAR (optional, default '')client.getOrderBook().then(console.log).catch(console.log)
Returns a list of the most recent trades. At most 100 results are returned per call.
since (Number | String | Date)? Fetch trades executed after this timepair String? Currency pair e.g. XBTZAR (optional, default '')client.getTrades(new Date('7/7/7')).then(console.log).catch(console.log)
Create an additional account for the specified currency.
name String The label to use for this account e.g. "Trading ACC" (optional, default '')currency String The currency code for the account you want to create e.g. XBT, IDR, MYR, ZAR (optional, default '')Return the list of all accounts and their respective balances.
client.getBalances().then(console.log).catch(console.log)
Return a list of transaction entries from an account. By default fetches the 100 most recent rows.
id (String | Number) Account ID (optional, default '')minRow (String | Number)? Minimum of the row range to return (inclusive) (optional, default -100)maxRow (String | Number)? Maximum of the row range to return (exclusive) (optional, default 0)Return a list of all pending transactions related to the account.
Returns a list of the most recently placed orders
state String? Filter to only orders of this state e.g. PENDINGpair String? Filter to only orders of this currency pair e.g. XBTZARCreate a new trade order.
type String "BID" for a bid (buy) limit order or "ASK" for an ask (sell) limit order (optional, default '')volume (String | Number) Amount of Bitcoin to buy or sell as a decimal string in units of BTC e.g. "1.423" (optional, default '')price (String | Number) Limit price as a decimal string in units of ZAR/BTC e.g. "1200". (optional, default '')pair String? The currency pair to trade e.g. XBTZAR (optional, default '')Create a new market order.
type String "BUY" to buy bitcoin, or "SELL" to sell bitcoin (optional, default '')volume String For a "BUY" order: amount of local currency (e.g. ZAR, MYR) to spend as a decimal string in units of the local currency e.g. "100.50".
For a "SELL" order: amount of Bitcoin to sell as a decimal string in units of BTC e.g. "1.423". (optional, default '')pair String The currency pair to trade e.g. XBTZARRequest to stop an order.
id String The order reference as a string e.g. BXMC2CJ7HNB88U4 (optional, default '')Get an order by its id.
id String The order ID (optional, default '')client.getOrder(1234).then(console.log).catch(console.log)
Returns a list of your recent trades for a given pair, sorted by oldest first.
since Number? Filter to trades on or after this timestamp, e.g. 1470810728478limit Number? Limit to this number of trades (min 1, max 100, default 100)pair String? Filter to trades of this currency pair e.g. XBTZARclient.getTradesList(new Date('7/7/7'), 50).then(console.log).catch(console.log)
Returns the default receive address associated with your account and the amount received via the address. You can specify an optional address parameter to return information for a non-default receive address. In the response, total_received is the total confirmed Bitcoin amount received excluding unconfirmed transactions. total_unconfirmed is the total sum of unconfirmed receive transactions.
asset String Currency code of the asset e.g. XBT (optional, default '')address String? Specific Bitcoin address to retrieve. If not provided, the default address will be usedclient.getReceiveAddress('XBT').then(console.log).catch(console.log)
Allocates a new receive address to your account. There is a rate limit of 1 address per hour, but bursts of up to 10 addresses are allowed.
asset String Currency code of the asset e.g. XBT (optional, default '')client.createReceiveAddress('XBT').then(console.log).catch(console.log)
Returns your fees and 30 day trading volume (as of midnight) for a given pair.
pair String? Filter to trades of this currency pair e.g. XBTZAR (optional, default '')client.getFeeInfo('XBTZAR').then(console.log).catch(console.log)
Returns a list of withdrawal requests.
client.getWithdrawalRequests().then(console.log).catch(console.log)
Creates a new withdrawal request.
type String Withdrawal types e.g. ZAR_EFT, NAD_EFT, KES_MPESA, MYR_IBG, IDR_LLG (optional, default '')amount (String | Number) Amount to withdraw. The currency depends on the typebeneficiaryId String? The beneficiary ID of the bank account the withdrawal will be paid out to.
This parameter is required if you have multiple bank accounts.client.requestWithdrawal('ZAR_EFT', 1000)
Returns the status of a particular withdrawal request.
client.getWithdrawalStatus(1234).then(console.log).catch(console.log)
Cancel a withdrawal request. This can only be done if the request is still in state PENDING.
client.cancelWithdrawalRequest(1234).then(console.log).catch(console.log)
Send Bitcoin from your account to a Bitcoin address or email address.
amount (String | Number) Amount to send as a decimal string (optional, default '')currency String Currency to send e.g. XBT (optional, default '')address String Destination Bitcoin address or email address to send to (optional, default '')description String? Description for the transaction to record on the account statementmessage String? Message to send to the recipient. This is only relevant when sending to an email addressclient.send(1000, 'XBT', 'foo@bar.com')
Creates a new quote to buy or sell a particular amount.
type String Possible types: BUY, SELL (optional, default '')amount (String | Number) Amount to buy or sell in the pair base currency (optional, default '')pair String? Currency pair to trade e.g. XBTZAR, XBTMYR. The pair can also be flipped if you want to buy or sell the counter currency (e.g. ZARXBT) (optional, default '')client.createQuote('BUY', 1000).then(console.log).catch(console.log)
Get the latest status of a quote.
id String ID of the quote to retrieve (optional, default '')client.getQuote(1234).then(console.log).catch(console.log)
Exercise a quote to perform the trade. If there is sufficient balance available in your account, it will be debited and the counter amount credited. An error is returned if the quote has expired or if you have insufficient available balance.
id String ID of the quote to exercise (optional, default '')client.exerciseQuote(1234).then(console.log).catch(console.log)
Discard a quote. Once a quote has been discarded, it cannot be exercised even if it has not expired yet.
id String ID of the quote to discard (optional, default '')client.discardQuote(1234).then(console.log).catch(console.log)
Contributions are welcome!
git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureOr open up a issue.
Licensed under the MIT License.
FAQs
Luno API wrapper
The npm package luno-api receives a total of 6 weekly downloads. As such, luno-api popularity was classified as not popular.
We found that luno-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.

Security News
HashiCorp disclosed a high-severity RCE in next-mdx-remote affecting versions 4.3.0 to 5.x when compiling untrusted MDX on the server.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.