Bittrex API API Reference
Bittrex provides a simple and powerful API consisting of REST endpoints for transactional operations and a complementary Websocket service providing streaming market and user data updates.
Access to and use of the API is governed by our Terms of Service. If you are a user of Bittrex.com, the applicable Terms of Service are available here. If you are a user of Bittrex Global, the applicable Terms of Service are available here.
If you have any API questions, feedback, or recommendations please post a question via our Github page.
API Endpoint
https://api.bittrex.com/v3
Schemes: https
Version: v3
Change Log
02/18/2020
- The marketSybol included in the execution socket updates was changed to Base-Quote format to match the rest of the API.
02/16/2020
- Updated known issues and upcoming breaking changes to reflect executions socket stream marketSymbol issue
- Added more codes to the error code documentation
12/02/2020
- There is now a socket stream for executions! As well as a corresponding set of REST endpoints for retrieving historical executions and synchronizing.
- You can now place or cancel multiple orders with a single request using the /batch endpoint
- Determining which markets and currencies you have access to can now be done more easily and explicitly via the market permissions and currency permissions endpoints
- It is now possible to retrieve market candles based on the midpoint between best bid ad ask in addition to candles based on trade prices (note that midpoint candles from prior to 12/2 are not available)
- The /withdrawals/whitelistAddresses endpoint has been renamed to /withdrawals/allowed-addresses for clarity. The old name will continue to work.
To see older changes, please visit the history page.
Upcoming Breaking Changes
No further breaking changes are planned
Known Issues
-
The trigger price shown on the website for trailing stop orders does not update automatically. The see the updated trigger price, refresh the page or query the api.
-
A conditional order cancelled via OCO will not automatically be removed from the list of open conditional orders on the website despite being cancelled. Refreshing the page will correct the issue.
REST API Overview
This section provides an overview of key concepts to understand when working with the Bittrex v3 REST API. Keep in mind the following:
- Enable 2FA on your account. API Keys cannot be generated unless 2FA is enabled and extended verification is done on the account.
- All REST requests must be sent to
https://api.bittrex.com/v3using theapplication/jsoncontent type. Non-HTTPS requests will be redirected to HTTPS, possibly causing functional or performance issues with your application.
Best Practices
Call Limits
The Bittrex API employs call limits on all REST endpoints to ensure the efficiency and availability of the platform for all customers. Limits are set such that they should not interfere with legitimate usage patterns. Frequent polling for updates on market data, order status, history, etc. is discouraged and will likely result in your requests failing with a 429 status code. If you need frequent updates, subscribe to the websocket instead of polling. Frivolous order placement and cancellation in a tight loop with low fill rates is also discouraged.
Throttling is tracked on a minute by minute basis with the limit resetting at the start of the next minute. In general, making a maximum of 60 API calls per minute should be safe, but higher request rates are allowed depending on the usage pattern. If you receive a throttling error, back off for the remainder of the minute and reduce the rate of subsequent requests.
Additional information and help on this topic are available for corporate and high-volume customers via their account managers.
Authentication
Overview
In order to properly sign an authenticated request for the Bittrex v3 API, the following headers must be included:
-
Api-Key -
Api-Timestamp -
Api-Content-Hash -
Api-Signature -
Api-Subaccount-Id (optional)
The following sections are instructions for properly populating these headers.
Api-Key
Populate this header with your API key.
Example Value:
4894xxxxxxxx407e827d05xxxxxxxxxx
Api-Timestamp
Populate this header with the current time as a UNIX timestamp, in epoch-millisecond format.
Sample JS Code Snippet:
var timestamp = new Date().getTime();
Example Value:
1542323450016
Api-Content-Hash
Populate this header with a SHA512 hash of the request body, Hex-encoded. If there is no request body, populate this header with a SHA512 hash of an empty string.
Sample JS Code Snippet:
var contentHash = CryptoJS.SHA512(content).toString(CryptoJS.enc.Hex);
Example Value:
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
Api-Subaccount-Id (Only for subaccount feature)
(NOTE: This functionality is limited to partners and unavailable to general traders.)
If you wish to make a request on behalf of a subaccount, you will need to:
- Authenticate using all 4 of the headers above referring to your master account.
- Populate the Api-Subaccount-Id header with the UUID of the subaccount you wish to impersonate for this request. The specified subaccount must be a subaccount of the master account used to authenticate the request.
- Include the Api-Subaccount-Id header at the end of the pre-signed signature, as indicated in the next section.
Example Value:
x111x11x-8968-48ac-b956-x1x11x111111
Api-Signature
Create a pre-sign string formed from the following items and concatenating them together:
- Contents of your
Api-Timestampheader - The full URI you are using to make the request (including query string)
- The HTTP method of the request, in all caps (GET, POST, DELETE, etc.)
- Contents of your
Api-Content-Hashheader - Content of your
Api-Subaccount-Idheader (or an empty string if not present)
Once you have created this pre-sign string, sign it via HmacSHA512, using your API secret as the signing secret. Hex-encode the result of this operation and populate the Api-Signature header with it.
Sample JS Code Snippet:
var uri = 'https://api.bittrex.com/v3/balances';
var preSign = [timestamp, uri, method, contentHash, subaccountId].join('');
var signature = CryptoJS.HmacSHA512(preSign, apiSecret).toString(CryptoJS.enc.Hex);
Example Pre-Signed Value (no subaccount)
1542323450016https://api.bittrex.com/v3/balancesGETcf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
Example Pre-Signed Value (with subaccount)
1542323450016https://api.bittrex.com/v3/balancesGETcf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3ex111x11x-8968-48ac-b956-x1x11x111111
Example Post-Signed Value:
939047623f0efbe10bfbb32f18e5d8885b2a91be3c3cea82adf0dd2d20892b20bcb6a10a91fec3afcedcc009f2b2a86c5366974cfadcf671fe0490582568f51f
Pagination
Overview
Several Bittrex API resources support bulk fetches via 'list' API methods. For example, you can list deposits, list closed orders, and list withdrawals. These list API methods share a common structure, using at least these three parameters: pageSize, nextPageToken and previousPageToken. These parameters, if necessary are specified as query parameters on the HTTP request.
Arguments:
-
pageSize(optional): A limit on the number of objects to be returned between 1 and 200, defaults to 100
-
nextPageToken(optional): The id of the last item on the current page. This is used for defining the starting point of the next page. For instance, if you make a list request and receive 100 objects ending with objFoo, your subsequent call can include
nextPageToken=objFoo's idin order to fetch the next page of the list starting after objFoo. -
previousPageToken(optional): The id of the first item on the current page. This is used for defining the ending point of the previous page. For instance, if you make a list request and receive 100 objects starting with objBar, your subsequent call can include
previousPageToken=objBar's idin order to fetch the previous page of the list.
Examples:
List withdrawals, in reverse chronological order, up to maximum of 20 withdrawals, starting at the most recent withdrawal created:
https://api.bittrex.com/v3/withdrawals?pageSize=20
List withdrawals, in reverse chronological order, up to maximum of 10 withdrawals, starting after the withdrawal with ID of 940af3c3-665d-4432-a12e-cdf8fd99ab3b
https://api.bittrex.com/v3/withdrawals?pageSize=10&nextPageToken=940af3c3-665d-4432-a12e-cdf8fd99ab3b
List withdrawals, in reverse chronological order, up to a maximum of 10 withdrawals, ending before the withdrawal with ID of 0d990dd2-4103-4d57-8e80-047e886537db:
https://api.bittrex.com/v3/withdrawals?pageSize=10&previousPageToken=0d990dd2-4103-4d57-8e80-047e886537db
Placing Orders
Orders are placed using the POST /orders operation. You can find sample request bodies for different types of orders in the examples in this section.
Order Types
-
Market Order : An order to buy or sell a specified quantity of an asset immediately at the best available price. The market order will consume available orders on the book as it executes. Consequently, especially for large orders, the average price at which the order is filled will deviate from the last-traded price or current quote.
-
Limit Order : An order to trade a specified quantity of an asset at a specified price. A buy order will only be filled at or below the limit price and a sell order will only be filled at or above the limit price.
-
Ceiling Order : A market or limit order that allows you to specify the amount of quote currency you want to spend (or receive, if selling) instead of the quantity of the market currency (e.g. buy $100 USD of BTC at the current market BTC price)
-
Good-Til-Cancelled Order : The order remains in force until it is explicitly cancelled either by the user or by Bittrex
-
Immediate-Or-Cancel Order : The order will be filled immediately as much as possible and then cancelled.
-
Fill-or-Kill : The order will be filled immediately and completely, or it is cancelled without being filled at all.
-
Post Only : This option allows market makers to ensure that their orders are making it to the order book instead of matching with a pre-existing order. Note: If the order is not a maker order, you will return an error and the order will be cancelled
-
Conditional Order : A directive for the system to place an order on your behalf when the price on the market moves past a given threshold. These are treated separately from orders. Refer to the Placing Conditional Orders section for more information.
Order types and time in force
The following table shows which time in force options apply to which order types.
| timeInForce | LIMIT | MARKET | CEILING_LIMIT | CEILING_MARKET |
|---|---|---|---|---|
| GOOD_TIL_CANCELLED | BUY OR SELL | NOT ALLOWED | NOT ALLOWED | NOT ALLOWED |
| IMMEDIATE_OR_CANCEL | BUY OR SELL | BUY OR SELL | BUY OR SELL | BUY OR SELL |
| FILL_OR_KILL | BUY OR SELL | BUY OR SELL | BUY OR SELL | BUY OR SELL |
| POST_ONLY_GOOD_TIL_CANCELLED | BUY OR SELL | NOT ALLOWED | NOT ALLOWED | NOT ALLOWED |
clientOrderId
An optional UUID which is generated by the user to to keep a track of the order. If the outcome of placing an order is not known (for example due to a client-side crash that occurred while placing the order), the same order can be safely placed again using the same UUID as the clientOrderId. If the order was received and processed the first time, the API will return an error that includes the existing order's id instead of creating a second order. This protection is in place for 24 hours after an order is placed. Although clientOrderIds which are more than 24 hours old are no longer checked against new orders, they remain associated with their orders as metadata and may be retrieved by clients.
Request Body Example For Limit Order
{
"marketSymbol": "string",
"direction": "string",
"type": "LIMIT",
"quantity": "number (double)",
"limit": "number (double)",
"timeInForce": "GOOD_TIL_CANCELLED || IMMEDIATE_OR_CANCEL || FILL_OR_KILL || POST_ONLY_GOOD_TIL_CANCELLED",
"clientOrderId": "string (uuid)"
}
Request Body Example For Market Order
{
"marketSymbol": "string",
"direction": "string",
"type": "MARKET",
"quantity": "number (double)",
"timeInForce": "IMMEDIATE_OR_CANCEL || FILL_OR_KILL",
"clientOrderId": "string (uuid)"
}
Request Body Example For Ceiling limit Order
{
"marketSymbol": "string",
"direction": "string",
"type": "CEILING_LIMIT",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "IMMEDIATE_OR_CANCEL || FILL_OR_KILL",
"clientOrderId": "string (uuid)"
}
Request Body Example For Ceiling Market Order
{
"marketSymbol": "string",
"direction": "string",
"type": "CEILING_MARKET",
"ceiling": "number (double)",
"timeInForce": "IMMEDIATE_OR_CANCEL||FILL_OR_KILL",
"clientOrderId": "string (uuid)"
}
Placing Conditional Orders
Placing Conditional Orders
Conditional orders are placed using this API by specifying the market price trigger conditions and what action to take when the trigger is reached. When a trade occurs on the market that matches the trigger conditions, the actions are triggered such as placing an order. Conditional orders are not the same as orders. They are stored separately from normal orders and do not appear on the order book. As such, there is a small delay between trading occurring on the market and corresponding conditional orders being triggered.
Care must also be taken when working with conditional orders because balance is not reserved. If you create a conditional order costing an amount in excess of your account balance for a currency or if your account balance drops due to other trades subsequent to you placing a conditional order there is a risk that you will not have enough balance available to place the order when the conditional order’s condition is met. If this occurs, placement of the order will fail.
Trigger conditions
The trigger for a conditional order is made up of two parts: the operand and the trigger price or percentage. Operand may be either less than or equal to (LTE) or greater than or equal to (GTE). triggerPrice will be compared to the price of the last trade on the market to determine if the action(s) specified in the conditional order should be executed. Alternately, a trailingStopPercent may be specified. This will cause the triggerPrice to float a fixed percent off from the smallest or largest price seen since the conditional order was placed. The below table summarizes these options:
| Parameter provided | Operand | Trigger Price | Triggers when |
|---|---|---|---|
| triggerPrice | LTE | Constant | A trade occurs at a price LTE the provided trigger price |
| triggerPrice | GTE | Constant | A trade occurs at a price GTE the provided trigger price |
| trailingStopPercent | LTE | Calculated to be trailingStopPercent less than the maximum trade price on the market since the conditional order was placed | A trade occurs at a price LTE the calculated trigger price |
| trailingStopPercent | GTE | Calculated to be trailingStopPercent more than the minimum trade price on the market since the conditional order was placed | A trade occurs at a price GTE the calculated trigger price |
Actions
When the trigger condition is met, this will result in a new order being placed and, optionally, another order or conditional order being cancelled. The order to place is configured by populating orderToCreate with the same object you would post to create an order. There are some limitations: post only orders, awards, and clientOrderId are not supported. For idempotency, instead specify a clientConditionalOrderId as a peer of orderToCreate in the request body.
If canceling an order is desired, provide the id of the order to cancel and the type of order (ORDER for an order on the book or CONDITIONAL_ORDER) in the orderToCancel object. This will pair the newly placed or with its target. If either conditional order triggers, the other will be cancelled. If both are trigger simultaneously, only the first conditional order place will trigger and the other will be cancelled. Note that there is not currently a way to break up two conditional orders paired in the fashion. To change the cancellation relationship, both conditional orders must be cancelled and placed again. You cannot link more than two orders in the fashion. Also note that if the orderToCancel is an order on the book and the conditional order triggers, the order on the book will be cancelled to free up funds prior to attempting to place the ordered triggered by the condition.
Common Use Cases
This section describes some common use cases and provides instruction for how to meet them using the API:
-
Stop Order: A market order triggered by price moving past a given threshold. Specify operand and triggerPrice as desired and define a market buy or sell order in orderToCreate.
-
Stop Limit Order: A limit order triggered by price moving past a given threshold. Specify operand and triggerPrice as desired and define a limit buy or sell order in orderToCreate.
-
Stop Loss Order: A market sell order triggered by price falling to a given threshold. Specify LTE as the operand and triggerPrice as desired and define a market sell order in orderToCreate.
-
Take Profit Order: A limit sell order triggered by price rising to a given threshold. Specify GTE as the operand and triggerPrice as desired and define a limit sell order in orderToCreate.
-
Trailing Stop Loss Order: A market sell order triggered when price falls more than a given amount below the highest price seen since the order was created. Specify LTE as the operand, set trailingStopPercent as desired, and define a market sell order in orderToCreate.
-
One Cancels the Other Order (OCO): A pair of orders where if one is triggered (for a conditional order) or executed (for an order on book) the other is automatically cancelled. When creating the second order in the pair, specify the id of the first order in orderToCancel. Note that currently one member of the OCO pair must be a conditional order.
Note that more combinations are possible. These examples are intended as a guide to some common use cases, not an exhaustive list of supported scenarios.
Error Codes
Overview:
If an error occurs during the processing of an API request, the Bittrex API will return an error to the caller. The general flow of information to check is:
-
status code of the response.
-
error code and other information in the response body (JSON)
HTTP Status Codes
| Status Code | Description |
|---|---|
| 400 - Bad Request | The request was malformed, often due to a missing or invalid parameter. See the error code and response data for more details. |
| 401 - Unauthorized | The request failed to authenticate (example: a valid api key was not included in your request header) |
| 403 - Forbidden | The provided api key is not authorized to perform the requested operation (example: attempting to trade with an api key not authorized to make trades) |
| 404 - Not Found | The requested resource does not exist. |
| 409 - Conflict | The request parameters were valid but the request failed due to an operational error. (example: INSUFFICIENT_FUNDS) |
| 429 - Too Many Requests | Too many requests hit the API too quickly. Please make sure to implement exponential backoff with your requests. |
| 501 - Not Implemented | The service requested has not yet been implemented. |
| 503 - Service Unavailable | The request parameters were valid but the request failed because the resource is temporarily unavailable (example: CURRENCY_OFFLINE) |
Error Codes
This section lists some common error codes that are returned by the API, but is not an exhaustive list. If you have questions about an error code you are receiving, feel free to post an issue on GitHub.
| Error Code | Description |
|---|---|
| ACCOUNT_DISABLED | This account is disabled |
| APIKEY_INVALID | The Api-Key request header is missing or invalid |
| CLIENTORDERID_ALREADY_EXISTS | The value specified for clientOrderId has already been used. The corresponding Bittrex id for the order will be included in the response. |
| CLIENTWITHDRAWALID_ALREADY_EXISTS | The value specified for clientWithdrawalId has already been used. The corresponding Bittrex id for the withdrawal will be included in the response. |
| CRYPTO_ADDRESS_ALREADY_EXISTS | A deposit address already exists for the currency which the user is attempting to create an address |
| CURRENCY_DOES_NOT_EXIST | The currency symbol provided does not correspond to a currency |
| CURRENCY_OFFLINE | The currency is offline |
| DUST_TRADE_DISALLOWED_MIN_VALUE | The amount of quote currency involved in a transaction would be less than 50k satoshis |
| FILL_OR_KILL | The order was submitted with the fill_or_kill time in force and could not be filled completely so it was cancelled |
| INSUFFICIENT_AWARDS | The order was placed with useAwards: true but the user did not have sufficient balance of BTXCRD to cover commission |
| INSUFFICIENT_FUNDS | The user is trying to buy or sell more currency than they can afford or currently hold, respectively |
| INVALID_MARKET_ORDER | A market order was requested in the order type, but other options selected which conflict with that (e.g. GOOD_TIL_CANCELLED time in force) |
| INVALID_NEXT_PAGE_TOKEN | The specified value for nextPageToken doesn't correspond to an item in the list |
| INVALID_ORDER_TYPE | The selected order type conflicts with other options specified on the order (e.g. setting a limit price for a market order) |
| INVALID_PREVIOUS_PAGE_TOKEN | The specified value for previousPageToken doesn't correspond to an item in the list |
| INVALID_RESTRICTED_ACCOUNT | The user is a Bittrex US user attempting an action on a Bittrex Global only currency or market |
| INVALID_SIGNATURE | The Api-Signature request header is missing or invalid |
| MARKET_DOES_NOT_EXIST | The market symbol provided does not correspond to a market |
| MARKET_NAME_REVERSED | Market symbols in v3 are in base-quote order whereas in v1 it was the reverse. This error occures when we think a market symbol was sent to v3 in quote-base order. |
| MARKET_OFFLINE | Te market is offline |
| MAX_ORDERS_ALLOWED | The user already has the maximum allowed open orders and cannot open another until one is closed |
| MIN_TRADE_REQUIREMENT_NOT_MET | The trade was smaller than the min trade size quantity for the market |
| NOT_ALLOWED | This account is not allowed to perform this action |
| ORDER_ERROR_CONTACT_SUPPORT | Operation could not be completed due to an internal error |
| ORDER_NOT_OPEN | Tried to cancel an order that was not open |
| ORDER_TYPE_INVALID | The order creation request is malformed in some way |
| ORDERBOOK_DEPTH | If allowed to execute, the order would have been executed at least in part at a price in excess of what is allowed by the price slippage limit on the market |
| POST_ONLY | The order was submitted as 'post only' but matched with an order already on the book and thus was cancelled |
| RATE_PRECISION_NOT_ALLOWED | The limit price specified includes more precision than is allowed on this market |
| REQUESTID_ALREADY_EXISTS | The value specified for requestId has already been used. The corresponding Bittrx id for the request will be included in the response. |
| SELF_TRADE | The order matched with an order on the book placed by the same user |
| SUBACCOUNT_OF_SUBACCOUNT_NOT_ALLOWED | Attempted to create a subaccout of a subaccount |
| THROTTLED | Too many requests have been made |
| WHITELIST_VIOLATION_WITHDRAWAL_ADDRESS | Attempting to withdrawal to an address that is either not on the users list of allowed withdrawal address or which is still within the wait period |
Websocket Overview
The v3 websocket is intended to allow a client to subscribe to a live stream of updates about things that are changing in the system instead of needing to poll the REST API looking for updates. It is designed to complement and be used in conjunction with the v3 REST API. As such the messages sent from the socket include payloads that are formatted to match the corresponding data models from the v3 REST API.
Like the existing v1 socket, the v3 socket is based on Microsoft ASP.net’s SignalR. We are not using ASP.net Core’s SignalR implementation at this time. As such, any existing SignalR client implementation working with the v1 socket should be able to be modified to work with the new v3 socket. If working in the .Net environment, the Microsoft.AspNet.SignalR.Client NuGet package is the recommended basis for a client implementation. The code snippets in the remainder of this section assume you are working in C# using that library. Refer to the Example Socket Clients section for examples in other languages.
Example Socket Clients
This section includes simple examples of how to subscribe and receive messages in a few popular languages. All of these examples follow the same basic pattern. They will connect to the socket server, authenticate if an API key and secret are provided, attempt to subscribe to a few streams, and finally print messages received on those streams to console.
- C#: V3WebsocketExample.cs
- Java: V3WebsocketExample.java
- Node.js: V3WebsocketExample.js
- Python: V3WebsocketExample.py
Connecting
To connect to the v3 socket, create a HubConnection to the socket URL ( https://socket-v3.bittrex.com/signalr) and create a hub proxy. The hub name to use when creating the proxy is "c3". Once these objects are created, you can start the HubConnection to connect to the socket. There are no streams of data sent automatically based solely on being connected. To get data, you must subscribe to one or more streams. The available streams are discussed in the Websocket Streams section of this site.
public class SocketClient
{
private string _url;
private HubConnection _hubConnection;
private IHubProxy _hubProxy;
public SocketClient(string url)
{
_url = url;
_hubConnection = new HubConnection(_url);
_hubProxy = _hubConnection.CreateHubProxy("c3");
}
public async Task<bool> Connect() {
await _hubConnection.Start();
return _hubConnection.State == ConnectionState.Connected;
}
}
Authenticating
Some streams contain private data and require that you be authenticated prior to subscribing. In order to authenticate, invoke the Authenticate method on the hub as shown in the example. The authentication will need to be renewed periodically. Currently authentication lasts for 10 minutes. When authentication expires subscriptions to any private streams will be cancelled. One minute prior to authentication expiring, a reminder message will be sent notifying the client that it is time to reauthenticate.
public async Task<SocketResponse> Authenticate(string apiKey, string apiKeySecret)
{
var timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
var randomContent = $"{ Guid.NewGuid() }";
var content = string.Join("", timestamp, randomContent);
var signedContent = CreateSignature(apiKeySecret, content);
var result = await _hubProxy.Invoke<SocketResponse>(
"Authenticate",
apiKey,
timestamp,
randomContent,
signedContent);
return result;
}
public void SetAuthExpiringHandler(string apiKey, string apiKeySecret)
{
_hubProxy.On("authenticationExpiring", async () =>
{
await Authenticate(apiKey, apiKeySecret);
});
}
private static string CreateSignature(string apiSecret, string data)
{
var hmacSha512 = new HMACSHA512(Encoding.ASCII.GetBytes(apiSecret));
var hash = hmacSha512.ComputeHash(Encoding.ASCII.GetBytes(data));
return BitConverter.ToString(hash).Replace("-", string.Empty);
}
Subscribing
To subscribe to one or more streams, simply invoke the Subscribe method with an array of streams to which you wish to subscribe. For a list of stream names, refer to the Websocket Streams section. The Subscribe method may be invoked as many times as desired if not all desired streams are known initially.
The result of invoking the Subscribe method is a list of SocketResponse objects containing a Boolean value indicating if the subscription was successful and, in the case of failure, an error code.
public async Task<List<SocketResponse>> Subscribe(string[] channels)
{
return await _hubProxy.Invoke<List<SocketResponse>>("Subscribe", (object)channels);
}
Handling Messages
Once you have subscribed to a stream, you will begin receiving messages as relevant activity occures in the system. The incoming messages must be decoded to do something with them. A basic example of this is shown below. The "balance" specified as a parameter is the name of the message to handle. This corresponds to the name of the stream. For a list of possible values and how they map to streams, refer to the Websocket Streams section. Messages sent on the v3 socket are gzipped and must be decompressed prior to being used. The DataConverter.Decode method shown in the example is doing this decompression and then parsing the resulting json into an object.
_hubProxy.On("balance", message =>
{
var decoded = DataConverter.Decode<BalanceDelta>(message);
// Do stuff with the decoded BalanceDelta object
});
The schema for the BalanceDelta type can be found in the documentation for the Balance stream. It consists of an accountId field for identifying the account (or subaccount) the message relates to, the sequence number of the message used for synchronization, and the actualy delta which is an updated Balance object. The schema of the object deltas sent by the websock are the same as those retrived from the equivalent REST API. For details about individual streams, refer to the Websocket Streams section of this page.
public static class DataConverter
{
private static JsonSerializerSettings _jsonSerializerSettings = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
DateFormatHandling = DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
FloatParseHandling = FloatParseHandling.Decimal,
MissingMemberHandling = MissingMemberHandling.Ignore,
NullValueHandling = NullValueHandling.Ignore,
Converters = new List<JsonConverter>
{
new StringEnumConverter(),
}
};
public static T Decode<T>(string wireData)
{
// Step 1: Base64 decode the wire data into a gzip blob
byte[] gzipData = Convert.FromBase64String(wireData);
// Step 2: Decompress gzip blob into JSON
string json = null;
using (var decompressedStream = new MemoryStream())
using (var compressedStream = new MemoryStream(gzipData))
using (var deflateStream = new DeflateStream(compressedStream, CompressionMode.Decompress))
{
deflateStream.CopyTo(decompressedStream);
decompressedStream.Position = 0;
using (var streamReader = new StreamReader(decompressedStream))
{
json = streamReader.ReadToEnd();
}
}
// Step 3: Deserialize the JSON string into a strongly-typed object
return JsonConvert.DeserializeObject<T>(json, _jsonSerializerSettings);
}
}
Synchronizing
To ensure you have the most recent data, and have not missed anything, the recommended sequence of steps is to:
- Subscribe to the relevant socket streams
- Begin to queue up messages without processing them
- Call the equivalent v3 REST API and record both the results and the value of the returned
Sequenceheader. Refer to the descriptions of individual streams to find the corresponding REST API. Note that you must call the REST API with the same parameters as you used to subscribed to the stream to get the right snapshot. For example, orderbook snapshots of different depths will have different sequence numbers. - If the
Sequenceheader is less than the sequence number of the first queued socket message received (unlikely), discard the results of step 3 and then repeat step 3 until this check passes. - Discard all socket messages where the sequence number is less than or equal to the
Sequenceheader retrieved from the REST call - Apply the remaining socket messages in order on top of the results of the REST call. The objects received in the socket deltas have the same schemas as the objects returned by the REST API. Each socket delta is a snapshot of an object. The identity of the object is defined by a unique key made up of one or more fields in the message (see documentation of individual streams for details). To apply socket deltas to a local cache of data, simply replace the objects in the cache with those coming from the socket where the keys match.
- Continue to apply messages as they are received from the socket as long as sequence number on the stream is always increasing by 1 each message (Note: for private streams, the sequence number is scoped to a single account or subaccount).
- If a message is received that is not the next in order, return to step 2 in this process
For applications that depend on keeping the stream of data as reliable as possible, creating multiple socket connections for redundancy is recommended. The sequence numbers published across all of the connections will be consistent with each other and can be used to determine which messages have been received.
Unsubscribing
Unsubscribing from streams follows the same pattern as subscribing to streams. Simply invoke the Unsubscribe method on the hub and provide the list of streams you wish to unsubscribe from.
public async Task<List<SocketResponse>> Unsubscribe(string[] channels)
{
return await _hubProxy.Invoke<List<SocketResponse>>("Unsubscribe", (object)channels);
}
Subaccounts
(NOTE: This functionality is limited to partners and unavailable to general traders.)
Subaccounts provide a way for partners to model their users without needing to create individual user accounts. Each subaccount has its own deposit addresses, balances, desposits and withdrawals, orders, etc. Partners control all actions of their subaccounts via the v3 REST API and may use the v3 websocket to be notified of any updates to their balances, deposits, and orders.
In order to work with subaccounts, you must be using an API key that has subaccount permissions. Partners who are part of this program can work with their Bittrex representative to get their API key enabled.
To create a subaccount, POST to the
subaccounts endpoint. This will create a new subaccount and return its id. Once you have a subaccount id, you can transfer funds between it and your main (master) account using the
transfers endpoint. In order to place orders, view history, or take other actions in the context of a subaccount using the REST API, add the Api-subaccount-ID header to the request and adjust your
request signature as needed.
To be notified of updates to subaccount data, use a websocket connection authenticated with a subaccount enabled API key and subscribe to the subaccount streams for the types of data you care about. A single subscription will receive data from all subaccounts the API key is authorized to manage. Messaages will include an accountId field which can be used to associate them with the correct subaccount. For subaccount streams that include a sequence number for synchronizing with the server, the sequence number is independent for each subaccount.
Account
GET /account
Retrieve information for the account associated with the request. For now, it only echoes the subaccount if one was specified in the header, which can be used to verify that one is operating on the intended account. More fields will be added later.
Request Url Example
https://api.bittrex.com/v3/account OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"subaccountId": "string (uuid)",
"accountId": "string (uuid)"
}
GET /account/volume
Get 30 day volume for account
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"updated": "string (date-time)",
"volume30days": "number (double)"
}
GET /account/permissions/markets
Get trading permissions
OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"symbol": "string",
"view": "boolean",
"buy": "boolean",
"sell": "boolean"
}
]
GET /account/permissions/markets/{marketSymbol}
Get trading permissions for a single market
(no description)
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"symbol": "string",
"view": "boolean",
"buy": "boolean",
"sell": "boolean"
}
GET /account/permissions/currencies
Get currency permissions
OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"symbol": "string",
"view": "boolean",
"deposit": {
"blockchain": "boolean",
"creditCard": "boolean",
"wireTransfer": "boolean"
},
"withdraw": {
"blockchain": "boolean",
"wireTransfer": "boolean"
}
}
]
GET /account/permissions/currencies/{currencySymbol}
Get currency permissions for a single currency
(no description)
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"symbol": "string",
"view": "boolean",
"deposit": {
"blockchain": "boolean",
"creditCard": "boolean",
"wireTransfer": "boolean"
},
"withdraw": {
"blockchain": "boolean",
"wireTransfer": "boolean"
}
}
Addresses
GET /addresses
List deposit addresses that have been requested or provisioned.
Request Url Example
https://api.bittrex.com/v3/addresses POST /addresses
Request provisioning of a deposit address for a currency for which no address has been requested or provisioned.
information including ID of the currency to provision a deposit address for
Request Url Example
https://api.bittrex.com/v3/addresses
Request Content-Types: application/json
Request Body Schema
{
"currencySymbol": "string"
}
Created
Response Content-Types: application/json
Response Schema (201 Created)
{
"status": "string",
"currencySymbol": "string",
"cryptoAddress": "string",
"cryptoAddressTag": "string"
}
GET /addresses/{currencySymbol}
Retrieve the status of the deposit address for a particular currency for which one has been requested or provisioned.
symbol of the currency to retrieve the deposit address for
Request Url Example
https://api.bittrex.com/v3/addresses/{currencySymbol} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"status": "string",
"currencySymbol": "string",
"cryptoAddress": "string",
"cryptoAddressTag": "string"
}
Balances
GET /balances
List account balances across available currencies. Returns a Balance entry for each currency for which there is either a balance or an address.
Request Url Example
https://api.bittrex.com/v3/balances HEAD /balances
Get sequence of balances snapshot.
OK
Response Content-Types: application/json
GET /balances/{currencySymbol}
Retrieve account balance for a specific currency. Request will always succeed when the currency exists, regardless of whether there is a balance or address.
unique symbol of the currency to retrieve the account balance for
Request Url Example
https://api.bittrex.com/v3/balances/{currencySymbol} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"currencySymbol": "string",
"total": "number (double)",
"available": "number (double)",
"updatedAt": "string (date-time)"
}
Batch
POST /batch
Create a new batch request. Currently batch requests are limited to placing and cancelling orders. The request model corresponds to the equivalent individual operations. Batch operations are executed sequentially in the order they are listed in the request. The response will return one result for each operation in the request in the same order. The status and response payload are the same as the responses would be if individual API requests were made for each operation.
List of operations in the batch
Request Content-Types: application/json
Request Body Schema
[
{
"resource": "string",
"operation": "string",
"payload": "object"
}
]
Request Body Example
[
{
"resource": "order",
"operation": "post",
"payload": {
"marketSymbol": "BTC-USD",
"direction": "BUY",
"type": "LIMIT",
"quantity": 1,
"limit": 20000,
"timeInForce": "GOOD_TIL_CANCELLED"
}
},
{
"resource": "order",
"operation": "post",
"payload": {
"marketSymbol": "BTC-USD",
"direction": "BUY",
"type": "LIMIT",
"quantity": 1,
"limit": 20050,
"timeInForce": "GOOD_TIL_CANCELLED"
}
},
{
"resource": "order",
"operation": "delete",
"payload": {
"id": "83d4dd58-cba5-4fb4-881c-f77fc43009d9"
}
}
] OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"status": "integer (int32)",
"payload": "object"
}
]
Response Example (200 OK)
[
{
"status": 200,
"payload": {
"id": "21b580eb-8d5d-4855-aa11-2013e3884dce",
"marketSymbol": "BTC-USD",
"direction": "BUY",
"type": "LIMIT",
"quantity": "1",
"limit": "20000",
"timeInForce": "GOOD_TIL_CANCELLED",
"fillQuantity": "0.00000000",
"commission": "0.00000000",
"proceeds": "0.00000000",
"status": "OPEN",
"createdAt": "2020-12-02T07:19:48.75Z",
"updatedAt": "2020-12-02T07:19:48.75Z"
}
},
{
"status": 409,
"payload": {
"code": "INSUFFICIENT_FUNDS"
}
},
{
"status": 200,
"payload": {
"id": "83d4dd58-cba5-4fb4-881c-f77fc43009d9",
"marketSymbol": "BTC-USD",
"direction": "BUY",
"type": "LIMIT",
"quantity": "1.00000000",
"limit": "19950.00000000",
"timeInForce": "GOOD_TIL_CANCELLED",
"fillQuantity": "0.00000000",
"commission": "0.00000000",
"proceeds": "0.00000000",
"status": "CLOSED",
"createdAt": "2020-12-02T07:19:34.27Z",
"updatedAt": "2020-12-02T07:19:48.85Z",
"closedAt": "2020-12-02T07:19:48.85Z"
}
}
]
ConditionalOrders
GET /conditional-orders/{conditionalOrderId}
Retrieve information on a specific conditional order.
(uuid-formatted string) - ID of conditional order to retrieve
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
DELETE /conditional-orders/{conditionalOrderId}
Cancel a conditional order.
(uuid-formatted string) - ID of order to cancel
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
GET /conditional-orders/closed
List closed conditional orders. StartDate and EndDate filters apply to the ClosedAt field. Pagination and the sort order of the results are in inverse order of the ClosedAt field.
filter by market (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
]
GET /conditional-orders/open
List open conditional orders.
filter by market (optional)
OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
]
HEAD /conditional-orders/open
Get sequence of open conditional orders snapshot.
OK
Response Content-Types: application/json
POST /conditional-orders
Create a new conditional order.
information specifying the conditional order to create
Request Content-Types: application/json
Request Body Schema
{
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)"
}
Created
Response Content-Types: application/json
Response Schema (201 Created)
{
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
Currencies
GET /currencies
List currencies.
Request Url Example
https://api.bittrex.com/v3/currencies Response Content-Types: application/json
Response Schema (200 OK)
[
{
"symbol": "string",
"name": "string",
"coinType": "string",
"status": "string",
"minConfirmations": "integer (int32)",
"notice": "string",
"txFee": "number (double)",
"logoUrl": "string",
"prohibitedIn": [
"string"
],
"baseAddress": "string",
"associatedTermsOfService": [
"string"
],
"tags": [
"string"
]
}
]
GET /currencies/{symbol}
Retrieve info on a specified currency.
symbol of the currency to retrieve
Request Url Example
https://api.bittrex.com/v3/currencies/{symbol} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"symbol": "string",
"name": "string",
"coinType": "string",
"status": "string",
"minConfirmations": "integer (int32)",
"notice": "string",
"txFee": "number (double)",
"logoUrl": "string",
"prohibitedIn": [
"string"
],
"baseAddress": "string",
"associatedTermsOfService": [
"string"
],
"tags": [
"string"
]
}
Deposits
GET /deposits/open
List open deposits. Results are sorted in inverse order of UpdatedAt, and are limited to the first 1000.
filter by an open deposit status (optional)
filter by currency (optional)
Request Url Example
https://api.bittrex.com/v3/deposits/open Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txId": "string",
"confirmations": "integer (int32)",
"updatedAt": "string (date-time)",
"completedAt": "string (date-time)",
"status": "string",
"source": "string"
}
]
HEAD /deposits/open
Get open deposits sequence.
OK
Response Content-Types: application/json
GET /deposits/closed
List closed deposits. StartDate and EndDate filters apply to the CompletedAt field. Pagination and the sort order of the results are in inverse order of the CompletedAt field.
filter by deposit status (optional)
filter by currency (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Request Url Example
https://api.bittrex.com/v3/deposits/closed Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txId": "string",
"confirmations": "integer (int32)",
"updatedAt": "string (date-time)",
"completedAt": "string (date-time)",
"status": "string",
"source": "string"
}
]
GET /deposits/ByTxId/{txId}
Retrieves all deposits for this account with the given TxId
the transaction id to lookup
Request Url Example
https://api.bittrex.com/v3/deposits/ByTxId/{txId} Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txId": "string",
"confirmations": "integer (int32)",
"updatedAt": "string (date-time)",
"completedAt": "string (date-time)",
"status": "string",
"source": "string"
}
]
GET /deposits/{depositId}
Retrieve information for a specific deposit.
(uuid-formatted string) - ID of the deposit to retrieve
Request Url Example
https://api.bittrex.com/v3/deposits/{depositId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txId": "string",
"confirmations": "integer (int32)",
"updatedAt": "string (date-time)",
"completedAt": "string (date-time)",
"status": "string",
"source": "string"
}
Executions
GET /executions
List historical executions for account.
Pagination and the sort order of the results are in inverse order of the Executed field.
filter by market (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"marketSymbol": "string",
"executedAt": "string (date-time)",
"quantity": "number (double)",
"rate": "number (double)",
"orderId": "string (uuid)",
"commission": "number (double)",
"isTaker": "boolean"
}
]
GET /executions/last-id
Gets sequence number and last execution id
(no description)
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"lastId": "string (uuid)"
}
HEAD /executions/last-id
Get sequence number for executions.
OK
Response Content-Types: application/json
Markets
GET /markets
List markets.
Request Url Example
https://api.bittrex.com/v3/markets Response Content-Types: application/json
Response Schema (200 OK)
[
{
"symbol": "string",
"baseCurrencySymbol": "string",
"quoteCurrencySymbol": "string",
"minTradeSize": "number (double)",
"precision": "integer (int32)",
"status": "string",
"createdAt": "string (date-time)",
"notice": "string",
"prohibitedIn": [
"string"
],
"associatedTermsOfService": [
"string"
],
"tags": [
"string"
]
}
]
GET /markets/summaries
List summaries of the last 24 hours of activity for all markets.
Request Url Example
https://api.bittrex.com/v3/markets/summaries OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"symbol": "string",
"high": "number (double)",
"low": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)",
"percentChange": "number (double)",
"updatedAt": "string (date-time)"
}
]
HEAD /markets/summaries
Retrieve the current sequence number for the market summaries snapshot.
OK
Response Content-Types: application/json
GET /markets/tickers
List tickers for all markets.
Request Url Example
https://api.bittrex.com/v3/markets/tickers HEAD /markets/tickers
Retrieve the current sequence number for the tickers snapshot.
GET /markets/{marketSymbol}/ticker
Retrieve the ticker for a specific market.
symbol of market to retrieve ticker for
Request Url Example
https://api.bittrex.com/v3/markets/{marketSymbol}/ticker OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"symbol": "string",
"lastTradeRate": "number (double)",
"bidRate": "number (double)",
"askRate": "number (double)"
}
GET /markets/{marketSymbol}
Retrieve information for a specific market.
symbol of market to retrieve
Request Url Example
https://api.bittrex.com/v3/markets/{marketSymbol} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"symbol": "string",
"baseCurrencySymbol": "string",
"quoteCurrencySymbol": "string",
"minTradeSize": "number (double)",
"precision": "integer (int32)",
"status": "string",
"createdAt": "string (date-time)",
"notice": "string",
"prohibitedIn": [
"string"
],
"associatedTermsOfService": [
"string"
],
"tags": [
"string"
]
}
GET /markets/{marketSymbol}/summary
Retrieve summary of the last 24 hours of activity for a specific market.
symbol of market to retrieve summary for
Request Url Example
https://api.bittrex.com/v3/markets/{marketSymbol}/summary OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"symbol": "string",
"high": "number (double)",
"low": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)",
"percentChange": "number (double)",
"updatedAt": "string (date-time)"
}
GET /markets/{marketSymbol}/orderbook
Retrieve the order book for a specific market.
symbol of market to retrieve order book for
maximum depth of order book to return (optional, allowed values are [1, 25, 500], default is 25)
Request Url Example
https://api.bittrex.com/v3/markets/{marketSymbol}/orderbook OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"bid": [
{
"quantity": "number (double)",
"rate": "number (double)"
}
],
"ask": [
{
"quantity": "number (double)",
"rate": "number (double)"
}
]
}
HEAD /markets/{marketSymbol}/orderbook
Retrieve the current sequence number for the specified market's order book snapshot.
symbol of market to retrieve order book for
maximum depth of order book to return (optional, allowed values are [1, 25, 500], default is 25)
OK
Response Content-Types: application/json
GET /markets/{marketSymbol}/trades
Retrieve the recent trades for a specific market.
symbol of market to retrieve recent trades for
Request Url Example
https://api.bittrex.com/v3/markets/{marketSymbol}/trades HEAD /markets/{marketSymbol}/trade
Retrieve the current sequence number for the specified market's recent trades snapshot.
symbol of market to retrieve order book for
OK
Response Content-Types: application/json
GET /markets/{marketSymbol}/candles/{candleType}/{candleInterval}/recent
Retrieve recent candles for a specific market and candle interval. The maximum age of the returned candles depends on the interval as follows: (MINUTE_1: 1 day, MINUTE_5: 1 day, HOUR_1: 31 days, DAY_1: 366 days). Candles for intervals without any trading activity are omitted.
symbol of market to retrieve candles for
desired time interval between candles
type of candles (trades or midpoint). This portion of the url may be omitted if trade based candles are desired (e.g. /candles/{candleInterval}/recent will return trade based candles)
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"startsAt": "string (date-time)",
"open": "number (double)",
"high": "number (double)",
"low": "number (double)",
"close": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)"
}
]
HEAD /markets/{marketSymbol}/candles/{candleType}/{candleInterval}/recent
Retrieve the current sequence number for the specified market's candles snapshot.
symbol of market to retrieve candles for
desired time interval between candles
type of candles (trades or midpoint). This portion of the url may be omitted if trade based candles are desired (e.g. /candles/{candleInterval}/recent will return trade based candles)
OK
Response Content-Types: application/json
GET /markets/{marketSymbol}/candles/{candleType}/{candleInterval}/historical/{year}/{month}/{day}
Retrieve recent candles for a specific market and candle interval. The date range of returned candles depends on the interval as follows: (MINUTE_1: 1 day, MINUTE_5: 1 day, HOUR_1: 31 days, DAY_1: 366 days). Candles for intervals without any trading activity are omitted.
symbol of market to retrieve candles for
desired time interval between candles
desired year to start from
desired month to start from (if applicable)
desired day to start from (if applicable)
type of candles (trades or midpoint). This portion of the url may be omitted if trade based candles are desired (e.g. /candles/{candleInterval}/historical/{year} will return trade based candles)
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"startsAt": "string (date-time)",
"open": "number (double)",
"high": "number (double)",
"low": "number (double)",
"close": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)"
}
]
Orders
GET /orders/closed
List closed orders.
StartDate and EndDate filters apply to the ClosedAt field. Pagination and the sort order of the results are in inverse order of the ClosedAt field.
filter by market (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Request Url Example
https://api.bittrex.com/v3/orders/closed Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
]
GET /orders/open
List open orders.
filter by market (optional)
Request Url Example
https://api.bittrex.com/v3/orders/open Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
]
DELETE /orders/open
Bulk cancel all open orders (can be limited to a specified market)
(no description)
OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"statusCode": "string",
"result": {
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
}
]
HEAD /orders/open
Get sequence of open orders snapshot.
OK
Response Content-Types: application/json
GET /orders/{orderId}
Retrieve information on a specific order.
(uuid-formatted string) - ID of order to retrieve
Request Url Example
https://api.bittrex.com/v3/orders/{orderId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
DELETE /orders/{orderId}
Cancel an order.
(uuid-formatted string) - ID of order to cancel
Request Url Example
https://api.bittrex.com/v3/orders/{orderId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
GET /orders/{orderId}/executions
Retrieve executions for a specific order. Results are sorted in inverse order of execution time, and are limited to the first 1000. NOTE: Executions from before 5/27/2019 are not available. Also, there may be a delay before an executed trade is visible in this endpoint.
(uuid-formatted string) - ID of order to retrieve executions for
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"marketSymbol": "string",
"executedAt": "string (date-time)",
"quantity": "number (double)",
"rate": "number (double)",
"orderId": "string (uuid)",
"commission": "number (double)",
"isTaker": "boolean"
}
]
POST /orders
Create a new order.
information specifying the order to create
Request Url Example
https://api.bittrex.com/v3/orders
Request Content-Types: application/json
Request Body Schema
{
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
}
Created
Response Content-Types: application/json
Response Schema (201 Created)
{
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
Ping
GET /ping
Pings the service
Request Url Example
https://api.bittrex.com/v3/ping OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"serverTime": "integer (int64)"
}
Subaccounts
GET /subaccounts
List subaccounts. (NOTE: This API is limited to partners and not available for traders.) Pagination and the sort order of the results are in inverse order of the CreatedAt field.
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
Request Url Example
https://api.bittrex.com/v3/subaccounts OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"createdAt": "string (date-time)"
}
]
POST /subaccounts
Create a new subaccount. (NOTE: This API is limited to partners and not available for traders.)
information specifying the subaccount to create
Request Url Example
https://api.bittrex.com/v3/subaccounts
Request Content-Types: application/json
Request Body Schema
{}
Created
Response Content-Types: application/json
Response Schema (201 Created)
{
"id": "string (uuid)",
"createdAt": "string (date-time)"
}
GET /subaccounts/{subaccountId}
Retrieve details for a specified subaccount. (NOTE: This API is limited to partners and not available for traders.)
(uuid-formatted string) - ID of the subaccount to retrieve details for
Request Url Example
https://api.bittrex.com/v3/subaccounts/{subaccountId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"createdAt": "string (date-time)"
}
Transfers
GET /transfers/sent
List sent transfers.(NOTE: This API is limited to partners and not available for traders.) Pagination and the sort order of the results are in inverse order of the Executed field.
(uuid-formatted string) - filter transfers to a sub account id (optional)
filter transfers to master account (optional)
filter by currency (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Request Url Example
https://api.bittrex.com/v3/transfers/sent OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"toSubaccountId": "string (uuid)",
"toMasterAccount": "boolean",
"id": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"executedAt": "string (date-time)"
}
]
GET /transfers/received
List received transfers.(NOTE: This API is limited to partners and not available for traders.) Pagination and the sort order of the results are in inverse order of the Executed field.
(uuid-formatted string) - filter transfers from a sub account id (optional)
filter transfers from master account (optional)
filter by currency (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Request Url Example
https://api.bittrex.com/v3/transfers/received OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"fromSubaccountId": "string (uuid)",
"fromMasterAccount": "boolean",
"id": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"executedAt": "string (date-time)"
}
]
GET /transfers/{transferId}
Retrieve information on the specified transfer.(NOTE: This API is limited to partners and not available for traders.)
(uuid-formatted string) - ID of the transfer to retrieve
Request Url Example
https://api.bittrex.com/v3/transfers/{transferId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"fromSubaccountId": "string (uuid)",
"fromMasterAccount": "boolean",
"id": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"executedAt": "string (date-time)"
}
POST /transfers
Executes a new transfer.(NOTE: This API is limited to partners and not available for traders.)
information specifying the transfer to execute
Request Url Example
https://api.bittrex.com/v3/transfers
Request Content-Types: application/json
Request Body Schema
{
"toSubaccountId": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"toMasterAccount": "boolean"
}
Created
Response Content-Types: application/json
Response Schema (201 Created)
{
"toSubaccountId": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"toMasterAccount": "boolean"
}
Withdrawals
GET /withdrawals/open
List open withdrawals. Results are sorted in inverse order of the CreatedAt field, and are limited to the first 1000.
filter by an open withdrawal status (optional)
filter by currency (optional)
Request Url Example
https://api.bittrex.com/v3/withdrawals/open OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
]
GET /withdrawals/closed
List closed withdrawals. StartDate and EndDate filters apply to the CompletedAt field. Pagination and the sort order of the results are in inverse order of the CompletedAt field.
filter by withdrawal status (optional)
filter by currency (optional)
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Request Url Example
https://api.bittrex.com/v3/withdrawals/closed OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
]
GET /withdrawals/ByTxId/{txId}
Retrieves all withdrawals for this account with the given TxId
the transaction id to lookup
Request Url Example
https://api.bittrex.com/v3/withdrawals/ByTxId/{txId} OK
Response Content-Types: application/json
Response Schema (200 OK)
[
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
]
GET /withdrawals/{withdrawalId}
Retrieve information on a specified withdrawal.
(uuid-formatted string) - ID of withdrawal to retrieve
Request Url Example
https://api.bittrex.com/v3/withdrawals/{withdrawalId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
DELETE /withdrawals/{withdrawalId}
Cancel a withdrawal. (Withdrawals can only be cancelled if status is REQUESTED, AUTHORIZED, or ERROR_INVALID_ADDRESS.)
(uuid-formatted string) - ID of withdrawal to cancel
Request Url Example
https://api.bittrex.com/v3/withdrawals/{withdrawalId} OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
POST /withdrawals
Create a new withdrawal.
information specifying the withdrawal to create
Request Url Example
https://api.bittrex.com/v3/withdrawals
Request Content-Types: application/json
Request Body Schema
{
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"clientWithdrawalId": "string (uuid)"
}
Created
Response Content-Types: application/json
Response Schema (201 Created)
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
GET /withdrawals/allowed-addresses
Returns a list of allowed addresses.
OK
Response Content-Types: application/json
Response Schema (200 OK)
{
"currencySymbol": "string",
"createdAt": "string (date-time)",
"status": "string",
"activeAt": "string (date-time)",
"cryptoAddress": "string",
"cryptoAddressTag": "string"
}
Websocket API
Authenticate
Authenticates the current connection using an API key. Note that after authenticating, the client must periodically renew its authentication. Refer to the websocket authentication topic for additional information. In the example, the API key used was "your_api_key_goes_here" and the secret was "secret". The example response shows this request failing because "your_api_key_goes_here" is not a valid value for an API key.
a valid API key for your account
the current UNIX-style time in epoch millisecond format
a random uuid
randomContent and timestamp signed by the apiKey's secret. Refer to the websocket authentication topic for an example.
Request Payload Example
{"H":"c3","M":"Authenticate","A":["your_api_key_goes_here",1592524115500,"e758c9d0-7603-4c8d-9ad3-3ce0141c576b","BFBD98224D5720C4F51DC30BF6B5035800A92B3B5E3124D8E2A69F6299A49D3C6AA428947693B470851AB736996A57C6A11FB60517AB24B5E3379C386688C973"],"I":1} Response Payload Example
{"R":{"Success":false,"ErrorCode":"INVALID_APIKEY"},"I":1} IsAuthenticated
Determines if the current connection is authenticated. In the example, the client is not currently authenticated.
Request Payload Example
{"H":"c3","M":"IsAuthenticated","A":[],"I":1} True if the connection is authenticated, false otherwise
Response Payload Example
{"R":false,"I":1} Subscribe
Subscribes to one or more data streams. In the example, the client successfully subscribes from the heartbeat stream and the ticker stream for BTC/USD.
list of streams to subscribe to
Request Payload Example
{"H":"c3","M":"Subscribe","A":[["heartbeat","ticker_BTC-USD"]],"I":1} Array< SocketResponse>
Response Payload Example
{"R":[{"Success":true,"ErrorCode":null},{"Success":true,"ErrorCode":null}],"I":1} Unsubscribe
Unsubscribes from one or more data streams. In the example, the client successfully unsubscribes from the ticker stream for BTC/USD.
list of streams to unsubscribe from
Request Payload Example
{"H":"c3","M":"Unsubscribe","A":[["ticker_BTC-USD"]],"I":1} Array< SocketResponse>
Response Payload Example
{"R":[{"Success":true,"ErrorCode":null}],"I":1} Websocket Streams
Balance
Sends a message when the authenticated user’s total or available balance of a currency changes.
| Subscription name |
balance |
| Message name |
balance |
| Unique key |
accountId, currencySymbol |
| Snapshot from | |
| Subaccount stream |
subaccounts_balance |
Message schema
{
"accountId": "string (uuid)",
"sequence": "int",
"delta": {
"currencySymbol": "string",
"total": "number (double)",
"available": "number (double)",
"updatedAt": "string (date-time)"
}
}
Candle
Sends a message at the start of each candle (based on the subscribed interval) and when trades have occurred on the market.
| Subscription name |
candle_{marketSymbol}_{candleInterval} |
| Message name |
candle |
| Unique key |
marketSymbol, interval, startsAt |
| Snapshot from |
GET /markets/{marketSymbol}/candles /{candleInterval}/recent |
Message schema
{
"sequence": "int",
"marketSymbol": "string",
"interval": "string",
"delta": {
"startsAt": "string (date-time)",
"open": "number (double)",
"high": "number (double)",
"low": "number (double)",
"close": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)"
}
}
symbol of market to retrieve candles for
desired time interval between candles
Conditional Order
Sends a message when one of your conditional orders is created, modified, or triggered
| Subscription name |
conditional_order |
| Message name |
conditionalOrder |
| Unique key |
id |
| Snapshot from | |
| Subaccount stream |
subaccounts_conditional_order |
Message schema
{
"accountId": "string (uuid)",
"sequence": "int",
"delta": {
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
}
Deposit
Sends a message when a new deposit is detected or its status changes.
| Subscription name |
deposit |
| Message name |
deposit |
| Unique key |
id |
| Snapshot from | |
| Subaccount stream |
subaccounts_deposit |
Message schema
{
"accountId": "string (uuid)",
"sequence": "int",
"delta": {
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txId": "string",
"confirmations": "integer (int32)",
"updatedAt": "string (date-time)",
"completedAt": "string (date-time)",
"status": "string",
"source": "string"
}
}
Execution
Sends a message when one of the user's orders is completely or partially filled by a trade
| Subscription name |
execution |
| Message name |
execution |
| Unique key |
id |
| Snapshot from | |
| Subaccount stream |
subaccounts_execution |
The GET /executions/last-id request returns the current sequence number and the id of the most recent execution. If that id is not in your local cache, then use GET /executions to fill in any executions that you missed. Executions are immutable so any information received about a given execution from REST or the socket will be its final state.
Message schema
{
"accountId": "string (uuid)",
"sequence": "int",
"deltas": [
{
"id": "string (uuid)",
"marketSymbol": "string",
"executedAt": "string (date-time)",
"quantity": "number (double)",
"rate": "number (double)",
"orderId": "string (uuid)",
"commission": "number (double)",
"isTaker": "boolean"
}
]
}
Heartbeat
Sends an empty message on an interval (currently 5 seconds). If you stop getting a heartbeat that means your connection is dead. If you are still getting a heartbeat but are not getting updates on active markets then that means your connection is alive but something else is wrong.
| Subscription name |
heartbeat |
| Message name |
heartbeat |
| Unique key |
n/a |
| Snapshot from |
n/a |
Message schema
"Heartbeat messages contain no payload"
Market Summaries
Provides regular updates of the current market summary data for all markets. Market summary data is different from candles in that it is a rolling 24-hour number as opposed to data for a fixed interval like candles.
| Subscription name |
market_summaries |
| Message name |
marketSummaries |
| Unique key |
symbol |
| Snapshot from |
Message schema
{
"sequence": "int",
"deltas": [
{
"symbol": "string",
"high": "number (double)",
"low": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)",
"percentChange": "number (double)",
"updatedAt": "string (date-time)"
}
]
}
Market Summary
Provides regular updates of the current market summary data for a given market. Market summary data is different from candles in that it is a rolling 24-hour number as opposed to data for a fixed interval like candles.
| Subscription name |
market_summary_{marketSymbol} |
| Message name |
marketSummary |
| Unique key |
symbol |
| Snapshot from |
This stream does not include a sequence number because each message received is a full snapshot of the current state.
Message schema
{
"symbol": "string",
"high": "number (double)",
"low": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)",
"percentChange": "number (double)",
"updatedAt": "string (date-time)"
}
symbol of market to retrieve the summary for
Order
Sends messages when there are changes to the user’s open orders.
| Subscription name |
order |
| Message name |
order |
| Unique key |
id |
| Snapshot from | |
| Subaccount stream |
subaccounts_order |
Message schema
{
"accountId": "string (uuid)",
"sequence": "int",
"delta": {
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
}
Orderbook
Sends a message when there are changes to the order book within the subscribed depth.
| Subscription name |
orderbook_{marketSymbol}_{depth} |
| Message name |
orderBook |
| Unique key |
marketSymbol, depth, "bid" | "ask", rate |
| Snapshot from |
An update with quantity 0 means that there is no longer any liquidity available at that rate or that this rate is no longer within the subscribed depth. For example, if subscribed to a depth of 25, if an order is placed at a new rate somewhere in the middle of the top 25, the entry that was formerly the 25th, and is now 26th, will get an update with quantity 0.
For this reason, depth is included as part of the key defined above. The first 25 levels of the depth 25 and depth 500 orderbooks will be identical, but updates for level 26 of the depth 25 order book (always 0) must be kept separate from updates for the depth 500 orderbook if you are subscribed to both.
Note: You must get the orderbook snapshot from the same depth as you are subscribed to on the websocket. Sequence numbers are not the same for different depths.
Message schema
{
"marketSymbol": "string",
"depth": "int",
"sequence": "int",
"bidDeltas": [
{
"quantity": "number (double)",
"rate": "number (double)"
}
],
"askDeltas": [
{
"quantity": "number (double)",
"rate": "number (double)"
}
]
}
symbol of market to monitor order book for
depth of order book to monitor
Tickers
Sends a message with the best bid price, best ask price, and last trade price for all markets as there are changes to the order book or trades.
| Subscription name |
tickers |
| Message name |
tickers |
| Unique key |
symbol |
| Snapshot from |
Message schema
{
"sequence": "int",
"deltas": [
{
"symbol": "string",
"lastTradeRate": "number (double)",
"bidRate": "number (double)",
"askRate": "number (double)"
}
]
}
Ticker
Sends a message with the best bid and ask price for the given market as well as the last trade price whenever there is a relevant change to the order book or a trade.
| Subscription name |
ticker_{marketSymbol} |
| Message name |
ticker |
| Unique key |
symbol |
| Snapshot from |
This stream does not include a sequence number because each message received is a full snapshot of the current state.
Message schema
{
"symbol": "string",
"lastTradeRate": "number (double)",
"bidRate": "number (double)",
"askRate": "number (double)"
}
symbol of market to monitor for ticker updates
Trade
Sends a message with the quantity and rate of trades on a market as they occur.
| Subscription name |
trade_{marketSymbol} |
| Message name |
trade |
| Unique key |
id |
| Snapshot from |
Message schema
{
"sequence": "int",
"marketSymbol": "string",
"deltas": [
{
"id": "string (uuid)",
"executedAt": "string (date-time)",
"quantity": "number (double)",
"rate": "number (double)",
"takerSide": "string"
}
]
}
symbol of market to monitor for trades
Schema Definitions
Account
- subaccountId: string (uuid)
-
the subaccount ID associated with this request if one was specified in the header (optional)
- accountId: string (uuid)
-
The account ID associated with this request only for master accounts
Example
{
"subaccountId": "string (uuid)",
"accountId": "string (uuid)"
}
AccountVolume
- updated: string (date-time)
-
Date and time indicating as when volume was updated
- volume30days: number (double)
-
30 day volume information.
Example
{
"updated": "string (date-time)",
"volume30days": "number (double)"
}
MarketPolicy
- symbol: string
-
unique ID for the market this policy is associated with
- view: boolean
-
true if the current user should be shown information about this market
- buy: boolean
-
true if the current user can place buy orders on this market
- sell: boolean
-
true if the current user can place sell orders on this market
Example
{
"symbol": "string",
"view": "boolean",
"buy": "boolean",
"sell": "boolean"
}
CurrencyPolicy
- symbol: string
-
unique ID for the currency this policy is associated with
- view: boolean
-
true if the current user should be shown information about this currency
- deposit: DepositMethods
-
methods for depositing this currency
- withdraw: WithdrawMethods
-
methods for withdrawing this currency
Example
{
"symbol": "string",
"view": "boolean",
"deposit": {
"blockchain": "boolean",
"creditCard": "boolean",
"wireTransfer": "boolean"
},
"withdraw": {
"blockchain": "boolean",
"wireTransfer": "boolean"
}
}
DepositMethods
- blockchain: boolean
-
true if the current user can deposit this currency via blockchain transaction
- creditCard: boolean
-
true if the current user can deposit this currency via credit card
- wireTransfer: boolean
-
true if the current user can deposit this currency via wire transfer
Example
{
"blockchain": "boolean",
"creditCard": "boolean",
"wireTransfer": "boolean"
}
WithdrawMethods
- blockchain: boolean
-
true if the current user can withdraw this currency via blockchain transaction
- wireTransfer: boolean
-
true if the current user can withdraw this currency via wire transfer
Example
{
"blockchain": "boolean",
"wireTransfer": "boolean"
}
Address
- status: string REQUESTED, PROVISIONED
-
the status of this deposit address
- currencySymbol: string
-
the unique ID of the currency this deposit address is for
- cryptoAddress: string
-
the cryptographic deposit address (optional, only set if Status is PROVISIONED)
- cryptoAddressTag: string
-
the cryptographic deposit address tag (optional, only set if Status is PROVISIONED) NOTE: This only applies for currencies whose coinType requires it.
Example
{
"status": "string",
"currencySymbol": "string",
"cryptoAddress": "string",
"cryptoAddressTag": "string"
}
NewAddress
- currencySymbol: string
-
the currency ID to provision a new address for
Example
{
"currencySymbol": "string"
}
Balance
- currencySymbol: string
-
unique ID for the currency this balance is associated with
- total: number (double)
-
total amount
- available: number (double)
-
available amount
- updatedAt: string (date-time)
-
time stamp when this balance was last updated
Example
{
"currencySymbol": "string",
"total": "number (double)",
"available": "number (double)",
"updatedAt": "string (date-time)"
}
BatchOperation
Base class for Batch operation request
- resource: string ORDER
-
resource type for batch operation
- operation: string DELETE, POST
-
batch operation type
- payload: object
-
Details for this operation. Type varies depending on the resource and operation. For POST order see NewOrder. For DELETE order see DeleteOrder
Example
{
"resource": "string",
"operation": "string",
"payload": "object"
}
BatchResponse
Base class for batch response
- status: integer (int32)
-
status code of this batch operation
- payload: object
-
Detailed results for this operation. Type varies depending on the resource, operation, and whether it was successful. Currently this will be either an Order or an Error
Example
{
"status": "integer (int32)",
"payload": "object"
}
ConditionalOrder
- id: string (uuid)
-
unique ID of this order, assigned by the service Note that this ID is completely unrelated to the optional clientConditionalOrderId.
- marketSymbol: string
-
unique symbol of the market this conditional order will be tracking
- operand: string LTE, GTE
-
price above (GTE) or below (LTE) which the conditional order will trigger This value will be set automatically if trailingStopPercent is specified. (either this or trailingStopPercent must be specified)
- triggerPrice: number (double)
-
percent above the minimum price (GTE) or below the maximum price (LTE) at which to trigger (either this or triggerPrice must be specified)
- trailingStopPercent: number (double)
-
The stop price will automatically adjust relative to the most extreme trade value seen. (either this or trigger price must be specified)
- createdOrderId: string (uuid)
-
unique ID of the order that was created by this conditional, if there is one
- orderToCreate: NewOrder
-
order to create if this conditional order is triggered
- orderToCancel: NewCancelConditionalOrder
-
order or conditional order to cancel if this conditional order triggers Note that this relationship is reciprocal.
- clientConditionalOrderId: string (uuid)
-
client-provided identifier for idempotency (optional)
- status: string OPEN, COMPLETED, CANCELLED, FAILED
-
conditional order status
- orderCreationErrorCode: string
-
if a conditional order fails to create an order when triggered, the failure reason will appear here
- createdAt: string (date-time)
-
timestamp (UTC) of order creation (always present)
- updatedAt: string (date-time)
-
timestamp (UTC) of last order update (optional)
- closedAt: string (date-time)
-
timestamp (UTC) when this order was closed (optional)
Example
{
"id": "string (uuid)",
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"createdOrderId": "string (uuid)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)",
"status": "string",
"orderCreationErrorCode": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)"
}
NewOrder
- marketSymbol: string
-
unique symbol of the market this order is being placed on
- direction: string BUY, SELL
-
order direction
- type: string LIMIT, MARKET, CEILING_LIMIT, CEILING_MARKET
-
order type
- quantity: number (double)
-
quantity (optional, must be included for non-ceiling orders and excluded for ceiling orders)
- ceiling: number (double)
-
ceiling (optional, must be included for ceiling orders and excluded for non-ceiling orders)
- limit: number (double)
-
limit (optional, must be included for LIMIT orders and excluded for MARKET orders)
- timeInForce: string GOOD_TIL_CANCELLED, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, POST_ONLY_GOOD_TIL_CANCELLED, BUY_NOW, INSTANT
-
time in force
- clientOrderId: string (uuid)
-
client-provided identifier for advanced order tracking (optional)
- useAwards: boolean
-
option to use Bittrex credits for the order (optional)
Example
{
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
}
NewCancelConditionalOrder
- type: string ORDER, CONDITIONAL_ORDER
-
type of order to cancel
- id: string (uuid)
-
uuid of the order or conditional order to cancel
Example
{
"type": "string",
"id": "string (uuid)"
}
PaginationParameters
- nextPageToken: string
-
The unique identifier of the item that the resulting query result should start after, in the sort order of the given endpoint. Used for traversing a paginated set in the forward direction. (Optional. May only be specified if PreviousPageToken is not specified.)
- previousPageToken: string
-
The unique identifier of the item that the resulting query result should end before, in the sort order of the given endpoint. Used for traversing a paginated set in the reverse direction. (Optional. May only be specified if NextPageToken is not specified.)
- pageSize: integer (int32)
-
maximum number of items to retrieve -- default 100, minimum 1, maximum 200 (optional)
Example
{
"nextPageToken": "string",
"previousPageToken": "string",
"pageSize": "integer (int32)"
}
DateFilter
- startDate: string (date-time)
-
(optional) Filters out results before this timestamp. In ISO 8601 format (e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use pagination parameters for more precise filtering.
- endDate: string (date-time)
-
(optional) Filters out result after this timestamp. Uses the same format as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
Example
{
"startDate": "string (date-time)",
"endDate": "string (date-time)"
}
NewConditionalOrder
- marketSymbol: string
-
unique symbol of the market this conditional order will be tracking
- operand: string LTE, GTE
-
price above (GTE) or below (LTE) which the conditional order will trigger This value will be set automatically if trailingStopPercent is specified. (either this or trailingStopPercent must be specified)
- triggerPrice: number (double)
-
percent above the minimum price (GTE) or below the maximum price (LTE) at which to trigger (either this or triggerPrice must be specified)
- trailingStopPercent: number (double)
-
The stop price will automatically adjust relative to the most extreme trade value seen. (either this or trigger price must be specified)
- orderToCreate: NewOrder
-
order to create if this conditional order is triggered
- orderToCancel: NewCancelConditionalOrder
-
order or conditional order to cancel if this conditional order triggers Note that this relationship is reciprocal.
- clientConditionalOrderId: string (uuid)
-
client-provided identifier for idempotency (optional)
Example
{
"marketSymbol": "string",
"operand": "string",
"triggerPrice": "number (double)",
"trailingStopPercent": "number (double)",
"orderToCreate": {
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"useAwards": "boolean"
},
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
},
"clientConditionalOrderId": "string (uuid)"
}
Currency
- symbol: string
-
unique symbol for this currency
- name: string
-
long name of this currency
- coinType: string
-
coin type of this currency
- status: string ONLINE, OFFLINE
-
currency status (online, offline, etc.)
- minConfirmations: integer (int32)
-
minimum number of confirmations
- notice: string
-
news or alerts regarding this currency
- txFee: number (double)
-
transaction fee for this currency
- logoUrl: string
-
url to the logo image for this currency, if available
- prohibitedIn: string[]
-
list of prohibited regions. empty if its not restricted. NOTE: Currently this field only indicates if the currency is prohibited in the US. We recommend using the account/permissions/currencies endpoint instead.
-
string US - baseAddress: string
-
base address for the currency.
- associatedTermsOfService: string[]
-
list of associated terms of service.
-
string - tags: string[]
-
metadata tags for this currency
-
string
Example
{
"symbol": "string",
"name": "string",
"coinType": "string",
"status": "string",
"minConfirmations": "integer (int32)",
"notice": "string",
"txFee": "number (double)",
"logoUrl": "string",
"prohibitedIn": [
"string"
],
"baseAddress": "string",
"associatedTermsOfService": [
"string"
],
"tags": [
"string"
]
}
Deposit
- id: string (uuid)
-
unique ID for this deposit, assigned by the service
- currencySymbol: string
-
unique symbol of the currency being deposited to
- quantity: number (double)
-
quantity to deposit
- cryptoAddress: string
-
crypto address for this deposit
- cryptoAddressTag: string
-
crypto address tag for this deposit (optional, depends on the coin type of currency being deposited)
- txId: string
-
TxID for the deposit (optional)
- confirmations: integer (int32)
-
current count of confirmations
- updatedAt: string (date-time)
-
time stamp when this deposit was last updated
- completedAt: string (date-time)
-
time stamp when this deposit was completed (optional, only set when status is COMPLETED)
- status: string PENDING, COMPLETED, ORPHANED, INVALIDATED
-
current status of this deposit
- source: string BLOCKCHAIN, WIRE_TRANSFER, CREDIT_CARD
-
source of the deposit
Example
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txId": "string",
"confirmations": "integer (int32)",
"updatedAt": "string (date-time)",
"completedAt": "string (date-time)",
"status": "string",
"source": "string"
}
Execution
- id: string (uuid)
-
unique ID of this execution, assigned by the service
- marketSymbol: string
-
market symbol where this execution took place
- executedAt: string (date-time)
-
time when the execution was processed
- quantity: number (double)
-
quantity traded during this execution
- rate: number (double)
-
rate at which this trade was executed
- orderId: string (uuid)
-
order ID associated with this execution
- commission: number (double)
-
commission charged for this execution
- isTaker: boolean
-
true if the order ID specified was the taker for this execution, otherwise false
Example
{
"id": "string (uuid)",
"marketSymbol": "string",
"executedAt": "string (date-time)",
"quantity": "number (double)",
"rate": "number (double)",
"orderId": "string (uuid)",
"commission": "number (double)",
"isTaker": "boolean"
}
ExecutionLastId
- lastId: string (uuid)
-
last lot id for the user
Example
{
"lastId": "string (uuid)"
}
Market
- symbol: string
-
unique symbol for this market
- baseCurrencySymbol: string
-
unique symbol for base currency
- quoteCurrencySymbol: string
-
unique symbol for quote currency
- minTradeSize: number (double)
-
minimum trade size
- precision: integer (int32)
-
maximum allowed precision for the limit price on an order
- status: string ONLINE, OFFLINE
-
true if this market is currently active
- createdAt: string (date-time)
-
timestamp in UTC when this market was created
- notice: string
-
notice or alert info
- prohibitedIn: string[]
-
list of prohibited regions. empty if its not restricted. NOTE: Currently this field only indicates if the market is prohibited in the US. We recommend using the account/permissions/markets endpoint instead.
-
string US - associatedTermsOfService: string[]
-
list of associated terms of service.
-
string - tags: string[]
-
metadata tags for this market
-
string
Example
{
"symbol": "string",
"baseCurrencySymbol": "string",
"quoteCurrencySymbol": "string",
"minTradeSize": "number (double)",
"precision": "integer (int32)",
"status": "string",
"createdAt": "string (date-time)",
"notice": "string",
"prohibitedIn": [
"string"
],
"associatedTermsOfService": [
"string"
],
"tags": [
"string"
]
}
MarketSummary
- symbol: string
-
unique symbol for this market
- high: number (double)
-
highest price of a trade that occurred within the last 24 hours (or zero if there were no trades)
- low: number (double)
-
lowest price of a trade that occurred within the last 24 hours (or zero if there were no trades)
- volume: number (double)
-
volume within the last 24 hours
- quoteVolume: number (double)
-
quote volume within the last 24 hours
- percentChange: number (double)
-
percentage change of the exchange rate over the last 24 hours (positive or negative)
- updatedAt: string (date-time)
-
timestamp in UTC when market summary was last updated
Example
{
"symbol": "string",
"high": "number (double)",
"low": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)",
"percentChange": "number (double)",
"updatedAt": "string (date-time)"
}
Ticker
- symbol: string
-
unique symbol for this market
- lastTradeRate: number (double)
-
price of the last trade (or zero if there were no trades)
- bidRate: number (double)
-
rate of the current best bid (or zero if there are no bids)
- askRate: number (double)
-
rate of the current best ask (or zero if there are no asks)
Example
{
"symbol": "string",
"lastTradeRate": "number (double)",
"bidRate": "number (double)",
"askRate": "number (double)"
}
OrderBook
- bid: OrderBookEntry
-
buy entries
-
OrderBookEntry - ask: OrderBookEntry
-
sell entries
-
OrderBookEntry
Example
{
"bid": [
{
"quantity": "number (double)",
"rate": "number (double)"
}
],
"ask": [
{
"quantity": "number (double)",
"rate": "number (double)"
}
]
}
OrderBookEntry
- quantity: number (double)
-
quantity
- rate: number (double)
-
rate
Example
{
"quantity": "number (double)",
"rate": "number (double)"
}
Trade
- id: string (uuid)
-
unique ID of this trade, assigned by the service (always present)
- executedAt: string (date-time)
-
timestamp in UTC when order was filled
- quantity: number (double)
-
quantity
- rate: number (double)
-
rate
- takerSide: string BUY, SELL
-
taker side (specifies whether the taker was the buy or sellside)
Example
{
"id": "string (uuid)",
"executedAt": "string (date-time)",
"quantity": "number (double)",
"rate": "number (double)",
"takerSide": "string"
}
Candle
- startsAt: string (date-time)
-
time stamp in UTC for when this candle's time interval starts
- open: number (double)
-
open
- high: number (double)
-
high
- low: number (double)
-
low
- close: number (double)
-
close
- volume: number (double)
-
volume
- quoteVolume: number (double)
-
quoute volume
Example
{
"startsAt": "string (date-time)",
"open": "number (double)",
"high": "number (double)",
"low": "number (double)",
"close": "number (double)",
"volume": "number (double)",
"quoteVolume": "number (double)"
}
Order
- id: string (uuid)
-
unique ID of this order, assigned by the service (always present) Note that this ID is completely unrelated to the optional ClientOrderId.
- marketSymbol: string
-
unique symbol of the market this order is being placed on (always present, matches the field in NewOrder)
- direction: string BUY, SELL
-
order direction (always present, matches the field in NewOrder)
- type: string LIMIT, MARKET, CEILING_LIMIT, CEILING_MARKET
-
order type (always present, matches the field in NewOrder)
- quantity: number (double)
-
quantity (optional, matches the field in NewOrder)
- limit: number (double)
-
limit price (optional, matches the field in NewOrder)
- ceiling: number (double)
-
ceiling (optional, matches the field in NewOrder)
- timeInForce: string GOOD_TIL_CANCELLED, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, POST_ONLY_GOOD_TIL_CANCELLED, BUY_NOW, INSTANT
-
time in force (always present, matches the field in NewOrder)
- clientOrderId: string (uuid)
-
client-provided identifier for advanced order tracking (optional, matches the field in NewOrder)
- fillQuantity: number (double)
-
Quantity filled in base currency (e.g. BTC on the BTC/USD market)
- commission: number (double)
-
Commission paid on the order in quote currency (e.g. USD on the BTC/USD market)
- proceeds: number (double)
-
Amount paid for buy orders or amount received for sell orders in quote currency (e.g. USD on the BTC/USD market). Average fill price is proceeds / quantityFilled. The total quote currency paid for a buy order is proceeds + commission. For a sell order the quote currency received is proceeds - commission
- status: string OPEN, CLOSED
-
order status (always present)
- createdAt: string (date-time)
-
timestamp (UTC) of order creation (always present)
- updatedAt: string (date-time)
-
timestamp (UTC) of last order update (optional)
- closedAt: string (date-time)
-
timestamp (UTC) when this order was closed (optional)
- orderToCancel: NewCancelConditionalOrder
-
conditional order to cancel if this order executes Note that this relationship is reciprocal.
Example
{
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
BulkCancelResult
- id: string (uuid)
- statusCode: string
- result: Order
Example
{
"id": "string (uuid)",
"statusCode": "string",
"result": {
"id": "string (uuid)",
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"limit": "number (double)",
"ceiling": "number (double)",
"timeInForce": "string",
"clientOrderId": "string (uuid)",
"fillQuantity": "number (double)",
"commission": "number (double)",
"proceeds": "number (double)",
"status": "string",
"createdAt": "string (date-time)",
"updatedAt": "string (date-time)",
"closedAt": "string (date-time)",
"orderToCancel": {
"type": "string",
"id": "string (uuid)"
}
}
}
ServicePing
- serverTime: integer (int64)
-
Server time in epoch millisecond format, rounded down to the nearest second. The same format must be used in the Api-Timestamp header of authenticated requests.
Example
{
"serverTime": "integer (int64)"
}
Subaccount
- id: string (uuid)
-
unique ID of this subaccount
- createdAt: string (date-time)
-
timestamp when this subaccount was created
Example
{
"id": "string (uuid)",
"createdAt": "string (date-time)"
}
SentTransferInfo
- toSubaccountId: string (uuid)
-
receiver account ID
- toMasterAccount: boolean
-
transfer to master account
- id: string (uuid)
-
unique ID for this transfer
- requestId: string (uuid)
-
client transfer id
- currencySymbol: string
-
currency symbol transfered
- amount: number (double)
-
amount transfered
- executedAt: string (date-time)
-
time stamp when this transfer was executed
Example
{
"toSubaccountId": "string (uuid)",
"toMasterAccount": "boolean",
"id": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"executedAt": "string (date-time)"
}
ReceivedTransferInfo
- fromSubaccountId: string (uuid)
-
sender account ID
- fromMasterAccount: boolean
-
transfer from master account
- id: string (uuid)
-
unique ID for this transfer
- requestId: string (uuid)
-
client transfer id
- currencySymbol: string
-
currency symbol transfered
- amount: number (double)
-
amount transfered
- executedAt: string (date-time)
-
time stamp when this transfer was executed
Example
{
"fromSubaccountId": "string (uuid)",
"fromMasterAccount": "boolean",
"id": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"executedAt": "string (date-time)"
}
NewTransfer
- toSubaccountId: string (uuid)
-
receiver account ID
- requestId: string (uuid)
-
client transfer id
- currencySymbol: string
-
currency symbol transfered
- amount: number (double)
-
amount transfered
- toMasterAccount: boolean
-
transfer to master account
Example
{
"toSubaccountId": "string (uuid)",
"requestId": "string (uuid)",
"currencySymbol": "string",
"amount": "number (double)",
"toMasterAccount": "boolean"
}
Withdrawal
- id: string (uuid)
-
unique ID for this withdrawal, assigned by the service (always present)
- currencySymbol: string
-
unique symbol of currency to withdraw (always present, matches the field in NewWithdrawal)
- quantity: number (double)
-
quantity to withdraw (always present, matches the field in NewWithdrawal)
- cryptoAddress: string
-
crypto address for this withdrawal (always present, matches the field in NewWithdrawal)
- cryptoAddressTag: string
-
custom message further specifying how to complete the withdrawal (optional, matches the field in NewWithdrawal)
- txCost: number (double)
-
TxCost of this withdrawal (always present)
- txId: string
-
TxID associated with this withdrawal (optional)
- status: string REQUESTED, AUTHORIZED, PENDING, COMPLETED, ERROR_INVALID_ADDRESS, CANCELLED
-
current status of this withdrawal (always present)
- createdAt: string (date-time)
-
time stamp when this withdrawal was initiated (always present)
- completedAt: string (date-time)
-
time stamp when this withdrawal was completed (optional)
- clientWithdrawalId: string (uuid)
-
client-provided identifier for idempotency (optional)
Example
{
"id": "string (uuid)",
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"txCost": "number (double)",
"txId": "string",
"status": "string",
"createdAt": "string (date-time)",
"completedAt": "string (date-time)",
"clientWithdrawalId": "string (uuid)"
}
NewWithdrawal
- currencySymbol: string
-
unique symbol of the currency to withdraw from
- quantity: number (double)
-
quantity to withdraw
- cryptoAddress: string
-
crypto address to withdraw funds to
- cryptoAddressTag: string
-
custom message further specifying how to complete the withdrawal (optional, depends on whether the cryptoAddress is sufficient for this currency)
- clientWithdrawalId: string (uuid)
-
client-provided identifier for idempotency (optional)
Example
{
"currencySymbol": "string",
"quantity": "number (double)",
"cryptoAddress": "string",
"cryptoAddressTag": "string",
"clientWithdrawalId": "string (uuid)"
}
AllowedAddress
- currencySymbol: string
-
the unique ID of the currency for this withdrawal allowed address
- createdAt: string (date-time)
-
date and time this address was added to the allowed list
- status: string ACTIVE, PENDING
-
whether this address may currently be used for withdrawals or is pending the waiting period
- activeAt: string (date-time)
-
date and time after which this address may be used for withdrawals
- cryptoAddress: string
-
the cryptographic address that is allowed for withdrawals
- cryptoAddressTag: string
-
the cryptographic address tag that is allowed for withdrawals (optional)
Example
{
"currencySymbol": "string",
"createdAt": "string (date-time)",
"status": "string",
"activeAt": "string (date-time)",
"cryptoAddress": "string",
"cryptoAddressTag": "string"
}
DeleteOrder
Payload for cancelling an existing order
- id: string (uuid)
-
order Id to be cancelled.
Example
{
"id": "string (uuid)"
}
Error
- code: string
-
error code associated with this particular error
- detail: string
-
additional information describing the error and/or the included data (optional)
- data: object
-
a set of key-value pairs containing data relevant to this particular error (optional)
Example
{
"code": "string",
"detail": "string",
"data": "object"
}