Blockchain api status indicator
Using non-TLS requests can leak your authentication credentials. Blockchain api status indicator sure that your client validates the server's SSL certificate. 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 blockchain api status indicator since the UTC Epoch a Unix timestamp. Prices and volumes are always represented as a decimal strings e. We use strings instead of floats to preserve the precision. All other API calls are rate limited to blockchain api status indicator call per second.
API call rate limits allow bursts of up to five consecutive calls. Exceeding the limit causes HTTP error code 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 for them 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. Returns a list of bids and asks in the order book. Ask orders are sorted by price ascending. Bid orders are sorted by price descending. Note that multiple orders at the same price are not necessarily conflated.
Some API calls require your application to authenticate itself. This is done using an API key associated with your account. An API key consists of an id and a 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 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. A set of permissions is represented as the bitwise OR of each permission in the set. 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. 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. You must be verified to trade currency in order to be able to create an account. A user has a limit of 4 accounts per currency. Transaction entry rows are numbered sequentially starting from 1, where 1 is the oldest entry.
At most rows can be requested per call. Unlike account entries, pending transactions are not numbered, and may be reordered, deleted or updated at any time. Trading on the market is done by submitting trade 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 a list of the most recently placed orders. You can also specify the market by using the optional pair parameter. The list blockchain api status indicator truncated after items. The base and counter amounts are the principal amounts blockchain api status indicator were traded, ignoring fees. Orders cannot be reversed once they have executed.
Please ensure your program has been thoroughly tested before submitting orders. A market order executes immediately, and either buys as much bitcoin that can be bought for a set amount of fiat currency, or sells a set amount of bitcoin for as much fiat as possible.
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. 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. Only 1 Ethereum receive address can be created.
Cancel a withdrawal request. Send Bitcoin from your account to a Bitcoin address or email address. Send Ethereum from your account to an Ethereum address. If the email address is not associated with an existing Luno account, an invitation to create an account and claim the funds will be sent.
Digital currency transactions are irreversible. Please blockchain api status indicator your program has been thoroughly tested before using this blockchain api status indicator.
Quotes allow you to lock in an exchange rate for a short time with the option of either accepting or rejecting the quote. Quotes can be useful for various customer-facing applications where price fluctuations would be confusing.
The API is used as follows: First create a quote for blockchain api status indicator transaction that you want to perform. If you decide to accept the quote before it expires, you will exercise the quote. If you decide not blockchain api status indicator accept it, you will discard the quote. You can also retrieve the status of a quote at any time.
You can specify either the exact amount that you want to pay or the exact amount that you want too receive. Blockchain api status indicator example, to buy exactly 0. The returned quote includes the appropriate ZAR amount. The returned quote specifies the Bitcoin as the counter amount that blockchain api status indicator be returned.
An error is returned if your account is not verified for the currency pair, or if your account would have insufficient balance to ever exercise the quote. 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.
Once a quote has been discarded, it cannot be exercised even if it has not expired yet. This API is still in beta phase. This means that it may still undergo incompatible changes. The websocket API provides streaming access to market data.
It is more efficient and provides lower blockchain api status indicator information than repeatedly polling the orderbook and recent blockchain api status indicator but is more complicated to implement.
The streaming protocol works by requiring the client to keep an in-memory record of the order book. Update messages are then sent from the server and the client uses these to update its copy of the order book. If they are applied correctly and fully, the client's view blockchain api status indicator the order book will be identical to the server's view.
Each update message transmitted from the server has a unique increasing sequence number. The message with sequence number n can be applied to state sequence n-1 to produce state sequence n. In this case, an update message would be sent containing multiple trade updates.
There will blockchain api status indicator no create update since the new order never enters the order book. In this case, the update message contains multiple trade updates and a create update. The volume in the create update is the blockchain api status indicator volume for the order.
The streaming updates protocol described above can be accessed using websockets. Blockchain api status indicator server first sends the current order book state and thereafter sends update messages as quickly as possible. Both the client and server must send regular keep alive messages to avoid disconnection during periods of low update message activity.
If there is any error while processing an update e. It is critical blockchain api status indicator clients implement exponential backoff for all reconnections to avoid overloading the server in case of errors.
If you are interested in integrating Bitcoin payments as a merchant, please contact Luno Support. Buy, store and learn about Bitcoin and Ethereum now. We are using cookies to provide statistics that help us give you the best experience of our site. You can find out more by visiting our privacy policy. By continuing to use the site, you are agreeing to our use of cookies.
BitX is now Luno.
You may notice that all blockchain. Have questions about this move and how it affects you? You provide an extended public key xPub and we generate a unique, unused corresponding address for your customers to send payment to.
We notify you of payments to that address instantly using a callback URL of your choosing. One of the difficulties involved with receiving bitcoin payments is the need to generate a unique blockchain api status indicator for each new user or invoice.
These addresses need to monitored and stored securely. The blockchain receive payments API takes care of blockchain api status indicator generation and monitoring of addresses. We will notify your server using a simple callback whenever a payment is received.
The easiest way to start receiving payments is to open a Blockchain Wallet at https: You should create a new account inside your wallet exclusively for transactions facilitated by this API.
This method creates a unique address which should be presented to the customer. For any payments sent to this address, you will be sent an HTTP notification. This is done so you do not show the same address to two different customers. However, all funds will still show within the same account.
As defined in BIP 44, wallet software will not scan past 20 unused addresses. Given enough requests from this API that don't have a matching payment, you could generate addresses past this horizon, which would make spending funds paid to those addresses quite difficult. For this reason, this API will return an error and refuse to generate blockchain api status indicator addresses if it detects it would create a gap of over 20 unused addresses.
If you encounter this error, you will either need to switch to a new xPub within the same wallet is fineor receive a payment to one of the previous 20 created addresses. Blockchain api status indicator note, this will not increase the number of addresses that will be monitored by our servers.
Using this feature will require you understand the gap limitation and how to handle it for advanced users only:. You will be sent an HTTP notification immediately when a transaction is made, blockchain api status indicator subsequently when it reaches the number of confirmations specified in the request.
You are required to specify the request's notification behaviour. Blockchain api status indicator the behaviour to 'DELETE' will delete the request after the first relelvant notification is sent to your callback address. Setting the behaviour to 'KEEP' will send additional notifications every time blockchain api status indicator transaction with the specified confirmations and operation type is sent to or from the address in the request.
Operation type is an optional parameter indicating whether the address will be monitored for received or spent transactions, or both.
By default both operation types are monitored. You may also optionally specify the number of confirmations a transaction reaches before being sent a notification. Note that you will receive a notification at 0 confirmations i.
This method allows you to request callbacks when a new block of a specified height and confirmation number blockchain api status indicator added to the blockchain. Height is an optional parameter indicating at which height you would like to receive a block notification - if unspecified, this will be the height of the next block to arrive. Confs blockchain api status indicator another optional parameter indicating how many confirmations a block should have when a notification is sent.
When a payment is received by a generated address, or by an address monitored by a blockchain api status indicator update request, blockchain. For balance update callbacks and additional notification will be sent once the transaction reaches the specified number of confirmations.
A block notification is sent every time a new block is added to the blockchain, and matches the height and number of confirmations blockchain api status indicator in the notification request. If the server responds with anything else, or nothing, the callback will be resent again for every new block approximately every 10 minutes up to times 1 week.
Check the index gap between last address paid to and the last address generated using the using the checkgap endpoint. Use the xpub you want to check and your API key like so:.
Use the exact callback in question and your API key like so:. A custom secret parameter should be included in the callback URL. The secret will be passed back to the callback script when the callback is fired, and should be checked by your code for validity. This prevents someone from trying to call your servers and falsely mark an invoice as 'paid'. The Demo Apps below include examples of how to do this.
If you would like convert payments received in Bitcoin to fiat currency quickly use a bitcoin address from an exchange wallet. A double spend occurs when a malicious user spends the same BTC twice. A payment that initial appears successful could be reversed at a later date. This is counteracted by waiting for the transaction to be included in the blockchain and reaching a number of confirmations.
It is recommended you acknowledge the transaction at zero confirmations but only trust the transaction after one confirmation. See the PHP demo callback. There is no limit to the number of receiving address which can be generated as long as the 20 address gap blockchain api status indicator is metthe service is designed to monitor millions of addresses.