We’ve detected that you’re using a small display. Want to switch to the mobile version of the site? Sign bitcoin documentation format or Create an Account to start trading.
Ticker In order to receive ticker updates, subscribe to “ticker”. The value of ‘amount’ indicates the new total amount on the books at the given rate — in other words, it replaces any previous value, rather than indicates an adjustment to a previous value. In order to keep your order book consistent, you will need to ensure that messages are applied in the order of their sequence numbers, even if they arrive out of order. In some markets, if there is no update for more than 1 second, a heartbeat message consisting of an empty argument list and the latest sequence number will be sent. Several order book and trade history updates will often arrive in a single message. Be sure to loop through the entire array, otherwise you will miss some updates. Trollbox Messages In order to receive new Trollbox messages, subscribe to “trollbox”.
Public API Methods Please note that making more than 6 calls per second to the public API, or repeatedly and needlessly fetching excessive amounts of data, can result in your IP being banned. Ticker Returns the ticker for all markets. 24Volume Returns the 24-hour volume for all markets, plus totals for primary currencies. Start” and “end” are given in UNIX timestamp format and used to specify the date range for the data returned.
Trading API Methods To use the trading API, you will need to create an API key. Please note that there is a default limit of 6 calls per second. If this is still insufficient, please contact support to discuss a limit raise. Sign – The query’s POST data signed by your key’s “secret” according to the HMAC-SHA512 method.
Additionally, all queries must include a “nonce” POST parameter. The nonce parameter is an integer which must always be greater than the previous nonce used. All responses from the trading API are in JSON format. Balances Returns all of your available balances.
POST parameter to “all” to include your margin and lending accounts. Only one address per currency per day may be generated, and a new address may not be generated before the previously-generated one has been used. Places a limit buy order in a given market. If successful, the method will return the order number.
A fill-or-kill order will either fill in its entirety or be completely aborted. An immediate-or-cancel order can be partially or completely filled, but any portion of the order that cannot be filled immediately will be canceled rather than left on the order book. Places a sell order in a given market. Parameters and output are the same as for the buy method.
Order Cancels an order you have placed in a given market. Order Cancels an order and places a new one of the same type in a single atomic transaction, meaning either both operations will succeed or both will fail. Immediately places a withdrawal for a given currency, with no email confirmation. In order to use this method, the withdrawal privilege must be enabled for your API key. Required POST parameters are “currency”, “amount”, and “address”. This information is updated once every 24 hours. You may optionally specify the “account” POST parameter if you wish to fetch only the balances of one account.
Please note that balances in your margin account may not be accessible if you have any open margin positions or orders. Please note that these balances may vary continually with market conditions. 1,”message”:”Transferred 2 BTC from exchange to margin account. This is the same information you will find in the Margin Account section of the Margin Trading page, under the Markets list. Buy Places a margin buy order in a given market.