The documentation for BitTurk.com website
Our API base url https://api.bitturk.com/v1/
Please use the issues on this github project to ask questions and report bugs.
- All requests are limited to 20 requests per 1 second.
- If you make more consequent unauthorized requests your API key will be blocked
You can check API connection with ping url
GET
[https://api.bitturk.com/v1/ping]
Current server time
GET
[https://api.bitturk.com/v1/time]
GET
[https://api.bitturk.com/v1/exchangeinfo]
GET
[https://api.bitturk.com/v1/ticker]
GET
[https://api.bitturk.com/v1/orderbook?Pair=BTCTRY]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
GET
[https://api.bitturk.com/v1/transactions?Pair=BTCTRY]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
All API calls related to a user account require authentication.
You need to provide 3 parameters to authenticate a request:
- "X-ApiKey": API key
- "X-Nonce": Nonce
- "X-Signature": Signature
You can create the API key from [https://bitturk.com/api] page in your exchange account. You should logged in to create API keys.
Nonce is a regular integer number. It must be increasing with every request you make.
A common practice is to use unix time for that parameter.
Signature is a HMAC-SHA256 encoded message. The HMAC-SHA256 code must be generated using a private key that contains a timestamp and your API key
Example (C#):
var timeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0));
var unixTime = (long)timeSpan.TotalSeconds;
string message = yourAPIKey + unixTime;
using (HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(yourAPISecret)))
{
byte[] signatureBytes = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
string Signature = Convert.ToBase64String(signatureBytes));
}
After creating the parameters, you have to send them in the HTML Header of your request with their name
Example (C#):
client.DefaultRequestHeaders.Add("X-ApiKey", yourAPIKey);
client.DefaultRequestHeaders.Add("X-Nonce", unixTime.ToString());
client.DefaultRequestHeaders.Add("X-Signature", Signature);
Example (PHP):
$now = time();
$PlainText = yourAPIKey.$now;
$HMACKey = yourAPISecret;
$Hashed = hash_hmac('sha256', $PlainText, $HMACKey, true);
$Signature = base64_encode($Hashed);
Warning: Your IP address can be blocked if you make too many unauthorized requests. Make sure you implement the authentication method properly.
GET
[https://api.bitturk.com/v1/userwallet?Symbol=BTC]
Symbol
parameter: BTC
, ETH
, XRP
, LTC
, NEO
, XMR
, DASH
, TRY
GET
[https://api.bitturk.com/v1/usertransactions?Pair=BTCTRY&Offset=0&Limit=10&Sort=asc]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
Sort
parameter: asc
, desc
GET
[https://api.bitturk.com/v1/userclosedorders?Pair=BTCTRY&Offset=0]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
GET
[https://api.bitturk.com/v1/useropenorders?Pair=BTCTRY]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
GET
[https://api.bitturk.com/v1/userordercancel?Pair=BTCTRY&OrderId=1234]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
OrderId
parameter: You can get Order Id from Open Order list api
GET
[https://api.bitturk.com/v1/userordercreate?Pair=BTCTRY&Price=0.1&Lot=1.0&Type=buy]
Pair
parameter: You can get available pair from [https://api.bitturk.com/v1/exchangeinfo]
Type
parameter: buy
, sell