Download OpenAPI specification:Download
The Luno API provides developers with a wealth of financial information and trading capacity in the cryptocurrency market. Through this secure system, developers can work with the cryptocurrencies Bitcoin and Ethereum to perform tasks such as:
The Luno API brings the world of Bitcoin and Ethereum to everyone.
Always use HTTPS when calling the API. Non-TLS HTTP requests cause error 403 to be returned. Using non-TLS requests can leak your authentication credentials.
Verify that your client validates the server's SSL certificate. Many libraries (e.g.
urllib2 in Python2) do not validate server certificates by default. Failing to verify the server certificate makes your application vulnerable to man-in-the-middle attack.
Timestamps are always represented as an integer number of milliseconds since the
UTC Epoch (a Unix timestamp).
Prices and volumes are always represented as a decimal strings e.g. "123.3432". Strings are used rather than floats to preserve the precision.
Parameters for POST calls are sent as URL-encoded forms (
Calls to the Market Data APIs are rate limited to 1 call per second per IP address, with a burst of 5 calls. All other API calls are rate limited to 5 calls per second per customer, with a burst of 25 calls. Exceeding the limit causes HTTP error
Code 429 to be returned.
The Go library is the recommended way to access the API.
The following libraries were implemented by third parties or are no longer under active development and are listed here for convenience. No support is provided by Luno and they may be out of date. A thorough review of the code is recommended before including them in any project.
Some API calls require your application to authenticate itself. This is done using an API key associated with your account. You can create an API key by visiting the API Keys section on the settings page.
An API key consists of a
key id and a
key secret. For example,
cnz2yjswbv3jd (key id) and
0hydMZDb9HRR3Qq-iqALwZtXLkbLR4fWxtDZvkB9h4I (key secret).
API requests are authenticated using HTTP basic authentication with the key id as the username and the key secret as the password. A missing, incorrect or revoked key causes error 401 to be returned.
Each API key is granted a set of permissions when it is created. The key can only be used to call the permitted API functions.
The following is a list of the possible permissions.
Perm_R_Balance = 1(View balance)
Perm_R_Transactions = 2(View transactions)
Perm_W_Send = 4(Send to any address)
Perm_R_Addresses = 8(View addresses)
Perm_W_Addresses = 16(Create addresses)
Perm_R_Orders = 32(View orders)
Perm_W_Orders = 64(Create orders)
Perm_R_Withdrawals = 128(View withdrawals)
Perm_W_Withdrawals = 256(Create withdrawals)
Perm_R_Merchant = 512(View merchant invoices)
Perm_W_Merchant = 1024(Create merchant invoices)
Perm_W_ClientDebit = 8192(Debit accounts)
Perm_W_ClientCredit = 16384(Credit accounts)
Perm_R_Beneficiaries = 32768(View beneficiaries)
Perm_W_Beneficiaries = 65536(Create and delete beneficiaries)
A set of permissions is represented as the bitwise OR of each permission in the set. For example the set of permissions required to view balances and orders is
Perm_R_Balance | Perm_R_Orders = 33.
When API keys are created, users can select permission sets that automatically include various permissions for their key. These are listed below.
|Permission Set||Included Permissions|
Send to any address
Send to any address
The following currencies are supported through the Luno market platform. For complete details, please see Fees & features:
The following are examples of currency pairs that are supported through the Luno market platform. For complete details, please see Fees & Features:
The following methods are available for Funds Withdrawal based on the type of currency or currency pair being withdrawn.
Market data API calls can be accessed by anyone without authentication. The data returned may be cached for up to 1 second. The Streaming API (see below) can be used if lower latency market data is needed.
Returns a list of all bids and asks in the order book. Ask orders are sorted by price ascending. Bid orders are sorted by price descending. Multiple orders at the same price are not aggregated.
Warning: This may return a large amount of data. Generally you should rather use GetOrderBook or the Streaming API.
Returns a list of the top 100 bids and asks in the order book. Ask orders are sorted by price ascending. Bid orders are sorted by price descending. Orders of the same price are aggregated.
Returns the latest ticker indicators.
Returns a list of the most recent trades that happened in the last 24h. At most 100 results are returned per call.
Fetch trades executed after this time, specified as a Unix timestamp in milliseconds.
All transactions on the Luno platform operate on Accounts. Each Account is denominated in a single currency and contains an ordered list of entries that track its running balance.
Each Account has a separate balance and available balance. The available balance may be lower than the balance if some funds have been reserved (e.g. for an open limit order). Account entries affect the balance and available balance independently.
Account entries are numbered sequentially. It is guaranteed that entries are never reordered or deleted. It is also guaranteed that the core attributes of the entry (the running balances and index) are never modified. Therefore, an Account acts as an append-only log of transactions.
This request creates an Account for the specified currency. Please note that the balances for the Account will be displayed based on the
asset value, which is the currency the Account is based on.
The currency code for the Account you want to create. Please see the Currency section for a detailed list of currencies supported by the Luno platform.
Users must be verified to trade currency in order to be able to create an Account. For more information on the verification process, please see How do I verify my identity?.
Users have a limit of 4 accounts per currency.
The label to use for this account
Return a list of all transactions that have not completed for the Account.
Pending transactions are not numbered, and may be reordered, deleted or updated at any time.
Return a list of transaction entries from an account.
Transaction entry rows are numbered sequentially starting from 1, where 1 is
the oldest entry. The range of rows to return are specified with the
min_row (inclusive) and
parameters. At most 1000 rows can be requested per call.
max_row is non-positive, the range
wraps around the most recent row. For example, to fetch the 100 most recent
Account ID - the unique identifier for the specific Account.
Minimum of the row range to return (inclusive)
Maximum of the row range to return (exclusive)
The list of all Accounts and their respective balances for the requesting user.
Array of strings
Only return balances for wallets with these currencies (if not provided, all balances will be returned)
Trading on the market is done by submitting Orders. After a new Order has been created, it is submitted for processing by the order matching engine. The Order then either matches against an existing order in the order book and is filled or it rests in the order book until it is stopped.
Returns the fees and 30 day trading volume (as of midnight) for a given currency pair. For complete details, please see Fees & Features.
Get fee information about this pair.
Returns a list of the most recently placed orders. You can specify an
state=PENDING parameter to restrict the results to only
open orders. You can also specify the market by using the optional pair
parameter. The list is truncated after 100 items.
Enum: "PENDING" "COMPLETE"
Filter to only orders of this state
Filter to only orders of this currency pair
Filter to orders created before this timestamp (Unix milliseconds)
Limit to this many orders