Developer's Guide - API

Overview

Bittrex provides a simple and powerful REST API to allow you to programatically perform nearly all actions you can from our web interface. All requests use the application/json content type and go over https. The base url is https://bittrex.com/api/{version}/. All requests are GET requests and all responses come in a default response object with the result in the result field. Always check the success flag to ensure that your API call succeeded.

We are currently restricting orders to 500 open orders and 200,000 orders a day. We reserve the right to change these settings as we tune the system. If you are affected by these limits as an active trader, please visit https://support.bittrex.com and open a support ticket.

For websocket implementations, refer to our documentation and code samples on github: https://github.com/Bittrex/bittrex.github.io 

If you have any questions, feedback or recommendation for API support you can post a question in our support center.

Getting Started

General

We provide a simple RESTful API. All calls are GETs and should be called via https. We will support n-1 versions of the API. The current stable and supported version of our RESTful API is v1.1. The endpoints have a standard format as follows:

https://bittrex.com/api/{version}/{method}?param=value

Authentication

In the spirit of keeping things simple, we offer an easy to manage API Key authentication method. You can have multiple API keys, each with their own level of rights. To manage your API keys please go to Settings > Manage API Keys.

Note

You MUST have 2FA enabled to create an API key for your own safety.

  • Read Info - You can only view the balances, orders, and other details of the account
  • Withdraw - We allow you to programatically withdraw any currency to an address you provide. This can be used to quick arbitrage exchanges or move money into cold storage after thresholds.
  • Trade Limit - This allows the API key to place LIMIT buy and sell orders

For this version, we use a standard HMAC-SHA512 signing. Append apikey and nonce to your request and calculate the HMAC hash and include it under an apisign header. Note: the nonce is not respected right now but will be enforced later.


$apikey='xxx';
$apisecret='xxx'; 
$nonce=time(); 
$uri='https://bittrex.com/api/v1.1/market/getopenorders?apikey='.$apikey.'&nonce='.$nonce; 
$sign=hash_hmac('sha512',$uri,$apisecret); 
$ch = curl_init($uri); 
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign)); 
$execResult = curl_exec($ch); 
$obj = json_decode($execResult);

API Reference

Our APIs are broken into three distinct groups

  • Public - Public information available without an API key
  • Market - For programmatic trading of crypto currencies
  • Account - For managing your account

 

Public API

/public/getmarkets

Used to get the open and available trading markets at Bittrex along with other meta data.

Parameters
None

Request

https://bittrex.com/api/v1.1/public/getmarkets

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"MarketCurrency" : "LTC",
			"BaseCurrency" : "BTC",
			"MarketCurrencyLong" : "Litecoin",
			"BaseCurrencyLong" : "Bitcoin",
			"MinTradeSize" : 0.01000000,
			"MarketName" : "BTC-LTC",
			"IsActive" : true,
			"Created" : "2014-02-13T00:00:00"
		}, {
			"MarketCurrency" : "DOGE",
			"BaseCurrency" : "BTC",
			"MarketCurrencyLong" : "Dogecoin",
			"BaseCurrencyLong" : "Bitcoin",
			"MinTradeSize" : 100.00000000,
			"MarketName" : "BTC-DOGE",
			"IsActive" : true,
			"Created" : "2014-02-13T00:00:00"
		}
    ]
}
	
/public/getcurrencies

Used to get all supported currencies at Bittrex along with other meta data.

Parameters
None

Request

https://bittrex.com/api/v1.1/public/getcurrencies

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"Currency" : "BTC",
			"CurrencyLong" : "Bitcoin",
			"MinConfirmation" : 2,
			"TxFee" : 0.00020000,
			"IsActive" : true,
			"CoinType" : "BITCOIN",
			"BaseAddress" : null
		}, {
			"Currency" : "LTC",
			"CurrencyLong" : "Litecoin",
			"MinConfirmation" : 5,
			"TxFee" : 0.00200000,
			"IsActive" : true,
			"CoinType" : "BITCOIN",
			"BaseAddress" : null
		}
    ]
}
	
/public/getticker

Used to get the current tick values for a market.

Parameters

Parameter Required Description
market required a string literal for the market (ex: BTC-LTC)

Request

https://bittrex.com/api/v1.1/public/getticker

Response:


{
	"success" : true,
	"message" : "",
	"result" : {
		"Bid" : 2.05670368,
		"Ask" : 3.35579531,
		"Last" : 3.35579531
	}
}
	
/public/getmarketsummaries

Used to get the last 24 hour summary of all active markets.

Parameters
None

Request

https://bittrex.com/api/v1.1/public/getmarketsummaries

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"MarketName" : "BTC-888",
			"High" : 0.00000919,
			"Low" : 0.00000820,
			"Volume" : 74339.61396015,
			"Last" : 0.00000820,
			"BaseVolume" : 0.64966963,
			"TimeStamp" : "2014-07-09T07:19:30.15",
			"Bid" : 0.00000820,
			"Ask" : 0.00000831,
			"OpenBuyOrders" : 15,
			"OpenSellOrders" : 15,
			"PrevDay" : 0.00000821,
			"Created" : "2014-03-20T06:00:00",
			"DisplayMarketName" : null
		}, {
			"MarketName" : "BTC-A3C",
			"High" : 0.00000072,
			"Low" : 0.00000001,
			"Volume" : 166340678.42280999,
			"Last" : 0.00000005,
			"BaseVolume" : 17.59720424,
			"TimeStamp" : "2014-07-09T07:21:40.51",
			"Bid" : 0.00000004,
			"Ask" : 0.00000005,
			"OpenBuyOrders" : 18,
			"OpenSellOrders" : 18,
			"PrevDay" : 0.00000002,
			"Created" : "2014-05-30T07:57:49.637",
			"DisplayMarketName" : null
		}
    ]
}
	
/public/getmarketsummary

Used to get the last 24 hour summary of a specific market.

Parameters

Parameter Required Description
market required a string literal for the market (ex: BTC-LTC)

Request

https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-ltc

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"MarketName" : "BTC-LTC",
			"High" : 0.01350000,
			"Low" : 0.01200000,
			"Volume" : 3833.97619253,
			"Last" : 0.01349998,
			"BaseVolume" : 47.03987026,
			"TimeStamp" : "2014-07-09T07:22:16.72",
			"Bid" : 0.01271001,
			"Ask" : 0.01291100,
			"OpenBuyOrders" : 45,
			"OpenSellOrders" : 45,
			"PrevDay" : 0.01229501,
			"Created" : "2014-02-13T00:00:00",
			"DisplayMarketName" : null
		}
    ]
}
	
/public/getorderbook

Used to get retrieve the orderbook for a given market.

Parameters

Parameter Required Description
market required a string literal for the market (ex: BTC-LTC)
type required buy, sell or both to identify the type of orderbook to return

Request

https://bittrex.com/api/v1.1/public/getorderbook?market=BTC-LTC&type=both

Response


{
	"success" : true,
	"message" : "",
	"result" : {
		"buy" : [{
				"Quantity" : 12.37000000,
				"Rate" : 0.02525000
			}
		],
		"sell" : [{
				"Quantity" : 32.55412402,
				"Rate" : 0.02540000
			}, {
				"Quantity" : 60.00000000,
				"Rate" : 0.02550000
			}, {
				"Quantity" : 60.00000000,
				"Rate" : 0.02575000
			}, {
				"Quantity" : 84.00000000,
				"Rate" : 0.02600000
			}
		]
	}
}
	
/public/getmarkethistory

Used to retrieve the latest trades that have occured for a specific market.

Parameters

Parameter Required Description
market required a string literal for the market (ex: BTC-LTC)

Request

https://bittrex.com/api/v1.1/public/getmarkethistory?market=BTC-DOGE

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"Id" : 319435,
			"TimeStamp" : "2014-07-09T03:21:20.08",
			"Quantity" : 0.30802438,
			"Price" : 0.01263400,
			"Total" : 0.00389158,
			"FillType" : "FILL",
			"OrderType" : "BUY"
		}, {
			"Id" : 319433,
			"TimeStamp" : "2014-07-09T03:21:20.08",
			"Quantity" : 0.31820814,
			"Price" : 0.01262800,
			"Total" : 0.00401833,
			"FillType" : "PARTIAL_FILL",
			"OrderType" : "BUY"
		}, {
			"Id" : 319379,
			"TimeStamp" : "2014-07-09T02:58:48.127",
			"Quantity" : 49.64643541,
			"Price" : 0.01263200,
			"Total" : 0.62713377,
			"FillType" : "FILL",
			"OrderType" : "SELL"
		}, {
			"Id" : 319378,
			"TimeStamp" : "2014-07-09T02:58:46.27",
			"Quantity" : 0.35356459,
			"Price" : 0.01263200,
			"Total" : 0.00446622,
			"FillType" : "PARTIAL_FILL",
			"OrderType" : "BUY"
		}
	]
}
	

 

Market API

/market/buylimit

Used to place a buy order in a specific market. Use buylimit to place limit orders. Make sure you have the proper permissions set on your API keys for this call to work.

Parameters

Parameter Required Description
market required a string literal for the market (ex: BTC-LTC)
quantity required the amount to purchase
rate required the rate at which to place the order

Request

https://bittrex.com/api/v1.1/market/selllimit?apikey=API_KEY&market=BTC-LTC&quantity=1.2&rate=1.3

Response


{
	"success" : true,
	"message" : "",
	"result" : {
			"uuid" : "614c34e4-8d71-11e3-94b5-425861b86ab6"
		}
}
	
/market/selllimit

Used to place an sell order in a specific market. Use selllimit to place limit orders. Make sure you have the proper permissions set on your API keys for this call to work.

Parameters

Parameter Required Description
market required a string literal for the market (ex: BTC-LTC)
quantity required the amount to purchase
rate required the rate at which to place the order

Request

https://bittrex.com/api/v1.1/market/selllimit?apikey=API_KEY&market=BTC-LTC&quantity=1.2&rate=1.3

Response - Returns you the order uuid


{
	"success" : true,
	"message" : "",
	"result" : {
			"uuid" : "614c34e4-8d71-11e3-94b5-425861b86ab6"
		}
}
	
/market/cancel

Used to cancel a buy or sell order.

Parameters

Parameter Required Description
uuid required uuid of buy or sell order

Request

https://bittrex.com/api/v1.1/market/cancel?apikey=API_KEY&uuid=ORDER_UUID

Response - Returns you the order uuid


{
    "success" : true,
    "message" : "",
    "result" : null
}
	
/market/getopenorders

Get all orders that you currently have opened. A specific market can be requested.

Parameters

Parameter Required Description
market optional a string literal for the market (ie. BTC-LTC)

Request

https://bittrex.com/api/v1.1/market/getopenorders?apikey=API_KEY&market=BTC-LTC

Response - Returns you the order uuid


{
	"success" : true,
	"message" : "",
	"result" : [{
			"Uuid" : null,
			"OrderUuid" : "09aa5bb6-8232-41aa-9b78-a5a1093e0211",
			"Exchange" : "BTC-LTC",
			"OrderType" : "LIMIT_SELL",
			"Quantity" : 5.00000000,
			"QuantityRemaining" : 5.00000000,
			"Limit" : 2.00000000,
			"CommissionPaid" : 0.00000000,
			"Price" : 0.00000000,
			"PricePerUnit" : null,
			"Opened" : "2014-07-09T03:55:48.77",
			"Closed" : null,
			"CancelInitiated" : false,
			"ImmediateOrCancel" : false,
			"IsConditional" : false,
			"Condition" : null,
			"ConditionTarget" : null
		}, {
			"Uuid" : null,
			"OrderUuid" : "8925d746-bc9f-4684-b1aa-e507467aaa99",
			"Exchange" : "BTC-LTC",
			"OrderType" : "LIMIT_BUY",
			"Quantity" : 100000.00000000,
			"QuantityRemaining" : 100000.00000000,
			"Limit" : 0.00000001,
			"CommissionPaid" : 0.00000000,
			"Price" : 0.00000000,
			"PricePerUnit" : null,
			"Opened" : "2014-07-09T03:55:48.583",
			"Closed" : null,
			"CancelInitiated" : false,
			"ImmediateOrCancel" : false,
			"IsConditional" : false,
			"Condition" : null,
			"ConditionTarget" : null
		}
	]
}

	

 

Account API

/account/getbalances

Used to retrieve all balances from your account.

Parameters
None

Request

https://bittrex.com/api/v1.1/account/getbalances?apikey=API_KEY 

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"Currency" : "DOGE",
			"Balance" : 0.00000000,
			"Available" : 0.00000000,
			"Pending" : 0.00000000,
			"CryptoAddress" : "DLxcEt3AatMyr2NTatzjsfHNoB9NT62HiF",
			"Requested" : false,
			"Uuid" : null

		}, {
			"Currency" : "BTC",
			"Balance" : 14.21549076,
			"Available" : 14.21549076,
			"Pending" : 0.00000000,
			"CryptoAddress" : "1Mrcdr6715hjda34pdXuLqXcju6qgwHA31",
			"Requested" : false,
			"Uuid" : null
		}
	]
}
	
/account/getbalance

Used to retrieve the balance from your account for a specific currency.

Parameters

Parameter Required Description
currency required a string literal for the market (ie. BTC-LTC)

Request

https://bittrex.com/api/v1.1/account/getbalance?apikey=API_KEY&currency=BTC

Response


{
	"success" : true,
	"message" : "",
	"result" : {
		"Currency" : "BTC",
		"Balance" : 4.21549076,
		"Available" : 4.21549076,
		"Pending" : 0.00000000,
		"CryptoAddress" : "1MacMr6715hjds342dXuLqXcju6fgwHA31",
		"Requested" : false,
		"Uuid" : null
	}
}
	
/account/getdepositaddress

Used to retrieve or generate an address for a specific currency. If one does not exist, the call will fail and return ADDRESS_GENERATING until one is available.

Parameters

Parameter Required Description
currency required a string literal for the market (ie. BTC-LTC)

Request

https://bittrex.com/api/v1.1/account/getdepositaddress?apikey=API_KEY&currency=VTC

Response


{
	"success" : true,
	"message" : "",
	"result" : {
		"Currency" : "VTC",
		"Address" : "Vy5SKeKGXUHKS2WVpJ76HYuKAu3URastUo"
	}
}
	
/account/withdraw

Used to withdraw funds from your account. Note: please account for txfee.

Parameters

Parameter Required Description
currency required a string literal for the market (ie. BTC-LTC)
quantity required the quantity of coins to withdraw
address required the address where to send the funds
paymentid optional used for CryptoNotes/BitShareX/Nxt/XRP and any other coin that has a memo/message/tag/paymentid option

Request

https://bittrex.com/api/v1.1/account/withdraw?apikey=API_KEY&currency=EAC&quantity=20.40&address=EAC_ADDRESS

Response


{
	"success" : true,
	"message" : "",
	"result" : {
			"uuid" : "68b5a16c-92de-11e3-ba3b-425861b86ab6"
	}
}
	
/account/getorder

Used to retrieve a single order by uuid.

Parameters

Parameter Required Description
uuid required the uuid of the buy or sell order

Request

https://bittrex.com/api/v1.1/account/getorder&uuid=0cb4c4e4-bdc7-4e13-8c13-430e587d2cc1

Response


{
	"success" : true,
	"message" : "",
	"result" : {
		"AccountId" : null,
		"OrderUuid" : "0cb4c4e4-bdc7-4e13-8c13-430e587d2cc1",
		"Exchange" : "BTC-SHLD",
		"Type" : "LIMIT_BUY",
		"Quantity" : 1000.00000000,
		"QuantityRemaining" : 1000.00000000,
		"Limit" : 0.00000001,
		"Reserved" : 0.00001000,
		"ReserveRemaining" : 0.00001000,
		"CommissionReserved" : 0.00000002,
		"CommissionReserveRemaining" : 0.00000002,
		"CommissionPaid" : 0.00000000,
		"Price" : 0.00000000,
		"PricePerUnit" : null,
		"Opened" : "2014-07-13T07:45:46.27",
		"Closed" : null,
		"IsOpen" : true,
		"Sentinel" : "6c454604-22e2-4fb4-892e-179eede20972",
		"CancelInitiated" : false,
		"ImmediateOrCancel" : false,
		"IsConditional" : false,
		"Condition" : "NONE",
		"ConditionTarget" : null
	}
}
	
/account/getorderhistory

Used to retrieve your order history.

Parameters

Parameter Required Description
market optional a string literal for the market (ie. BTC-LTC). If omitted, will return for all markets

Request

https://bittrex.com/api/v1.1/account/getorderhistory

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"OrderUuid" : "fd97d393-e9b9-4dd1-9dbf-f288fc72a185",
			"Exchange" : "BTC-LTC",
			"TimeStamp" : "2014-07-09T04:01:00.667",
			"OrderType" : "LIMIT_BUY",
			"Limit" : 0.00000001,
			"Quantity" : 100000.00000000,
			"QuantityRemaining" : 100000.00000000,
			"Commission" : 0.00000000,
			"Price" : 0.00000000,
			"PricePerUnit" : null,
			"IsConditional" : false,
			"Condition" : null,
			"ConditionTarget" : null,
			"ImmediateOrCancel" : false
		}, {
			"OrderUuid" : "17fd64d1-f4bd-4fb6-adb9-42ec68b8697d",
			"Exchange" : "BTC-ZS",
			"TimeStamp" : "2014-07-08T20:38:58.317",
			"OrderType" : "LIMIT_SELL",
			"Limit" : 0.00002950,
			"Quantity" : 667.03644955,
			"QuantityRemaining" : 0.00000000,
			"Commission" : 0.00004921,
			"Price" : 0.01968424,
			"PricePerUnit" : 0.00002950,
			"IsConditional" : false,
			"Condition" : null,
			"ConditionTarget" : null,
			"ImmediateOrCancel" : false
		}
	]
}
	
/account/getwithdrawalhistory

Used to retrieve your withdrawal history.

Parameters

Parameter Required Description
currency optional a string literal for the currecy (ie. BTC). If omitted, will return for all currencies

Request

https://bittrex.com/api/v1.1/account/getwithdrawalhistory?currency=BTC

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"PaymentUuid" : "b52c7a5c-90c6-4c6e-835c-e16df12708b1",
			"Currency" : "BTC",
			"Amount" : 17.00000000,
			"Address" : "1DeaaFBdbB5nrHj87x3NHS4onvw1GPNyAu",
			"Opened" : "2014-07-09T04:24:47.217",
			"Authorized" : true,
			"PendingPayment" : false,
			"TxCost" : 0.00020000,
			"TxId" : null,
			"Canceled" : true,
			"InvalidAddress" : false
		}, {
			"PaymentUuid" : "f293da98-788c-4188-a8f9-8ec2c33fdfcf",
			"Currency" : "XC",
			"Amount" : 7513.75121715,
			"Address" : "XVnSMgAd7EonF2Dgc4c9K14L12RBaW5S5J",
			"Opened" : "2014-07-08T23:13:31.83",
			"Authorized" : true,
			"PendingPayment" : false,
			"TxCost" : 0.00002000,
			"TxId" : "b4a575c2a71c7e56d02ab8e26bb1ef0a2f6cf2094f6ca2116476a569c1e84f6e",
			"Canceled" : false,
			"InvalidAddress" : false
		}
	]
}	
	
/account/getdeposithistory

Used to retrieve your deposit history.

Parameters

Parameter Required Description
currency optional a string literal for the currecy (ie. BTC). If omitted, will return for all currencies

Request

https://bittrex.com/api/v1.1/account/getdeposithistory?currency=BTC 

Response


{
	"success" : true,
	"message" : "",
	"result" : [{
			"PaymentUuid" : "554ec664-8842-4fe9-b491-06225becbd59",
			"Currency" : "BTC",
			"Amount" : 0.00156121,
			"Address" : "1K37yQZaGrPKNTZ5KNP792xw8f7XbXxetE",
			"Opened" : "2014-07-11T03:41:25.323",
			"Authorized" : true,
			"PendingPayment" : false,
			"TxCost" : 0.00020000,
			"TxId" : "70cf6fdccb9bd38e1a930e13e4ae6299d678ed6902da710fa3cc8d164f9be126",
			"Canceled" : false,
			"InvalidAddress" : false
		}, {
			"PaymentUuid" : "d3fdf168-3d8e-40b6-8fe4-f46e2a7035ea",
			"Currency" : "BTC",
			"Amount" : 0.11800000,
			"Address" : "1Mrcar6715hjds34pdXuLqXcju6QgwHA31",
			"O
			pened" : "2014-07-03T20:27:07.163",
			"Authorized" : true,
			"PendingPayment" : false,
			"TxCost" : 0.00020000,
			"TxId" : "3efd41b3a051433a888eed3ecc174c1d025a5e2b486eb418eaaec5efddda22de",
			"Canceled" : false,
			"InvalidAddress" : false
		}
    ]
}	
	
Was this article helpful?
7 out of 17 found this helpful
Have more questions? Submit a request