Skip to content

Commit

Permalink
added btcturk
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jul 9, 2017
1 parent 57114ab commit 00fbe13
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 150 deletions.
76 changes: 1 addition & 75 deletions ccxt.es5.js

Large diffs are not rendered by default.

74 changes: 0 additions & 74 deletions ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -3364,80 +3364,6 @@ var btctrader = {
return this.fetch (url, method, headers, body);
},
}
/*
You need to provide 3 parameters to authenticate a request:
"X-PCK": API key
"X-Stamp": Nonce
"X-Signature": Signature
API key
You can create the API key from the Account > API Access page in your exchange account.
Nonce
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
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#):
string message = yourAPIKey + unixTimeStamp;
using (HMACSHA256 hmac = new HMACSHA256(Convert.FromBase64String( yourPrivateKey )))
{
byte[] signatureBytes = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
string X-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-PCK", yourAPIKey);
client.DefaultRequestHeaders.Add("X-Stamp", stamp.ToString());
client.DefaultRequestHeaders.Add("X-Signature", signature);
Warning: Your IP address can be blocked if you make too many unauthorized requests. Make sure you implement the authentication method properly.
Account Balance (Requires Authentication)
POST .../api/cancelOrder
id: order ID
POST .../api/buy
IsMarketOrder: 1 for market order, 0 for limit order
Type: must be set as "BuyBtc"
For market orders:
Price: Price field will be ignored for market orders. Market orders get filled with different prices until your order is completely filled. There is a 5% limit on the difference between the first price and the last price. İ.e. you can't buy at a price more than 5% higher than the best sell at the time of order submission
Amount: Amount field will be ignored for buy market orders. The amount will be calculated according to the total value that you send.
Total: The total amount you will spend with this order. You will buy from different prices until your order is filled as described above
For limit orders:
Price: Order price
Amount": Order amount
Total: Will be ignored for limit orders.
POST .../api/sell
Params:
IsMarketOrder: 1 for market order, 0 for limit order
Type: must be set as "SelBtc"
Price: Price field will be ignored. Market orders get filled with different prices until your order is completely filled. There is a 5% limit on the difference between the first price and the last price. İ.e. you can't sell at a price less than 5% lower than the best buy at the time of order submission
Amount: The total amount you will sell with this order. You will sell at different prices until your order is filled as described above
Total: Total field will be ignored. The total amount will depent on the amount value you send.
Price: Order price
Amount": Order amount
Total: Will be ignored for limit orders.
*/

//-----------------------------------------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@
"BTCChina",
"BTC-e",
"BTCe",
"BTCTrader",
"btctrader.com",
"btc-trade.com.ua",
"BTC Trade UA",
"BTCTurk",
"btcturk.com",
"BTCX",
"btc-x",
"bter",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
'Environment :: Console'
],

keywords = 'algotrading altcoin altcoins api arbitrage backtesting bitcoin bot btc crypto cryptocurrency currency market darkcoin dash digital doge dogecoin e-commerce eth ether ethereum exchange exchanges framework invest investing investor library light litecoin ltc marketdata merchandise merchant minimal order orderbook book price pricedata pricefeed private public ripple strategy toolkit trade trader trading volume xbt xrp zec zerocoin 1Broker 1BTCXE ANX ANXPro bit2c.co.il Bit2C BitBay BitBays Bitcoin.co.id Bitfinex bitlish BitMarket BitMEX Bitso Bitstamp Bittrex BlinkTrade BTCC BTCChina BTC-e BTCe btc-trade.com.ua BTCTradeUA BTCX btc-x bter Bter.com BX.in.th ccex C-CEX cex CEX.IO ChileBit chilebit.net coincheck CoinMate Coinsecure DSX dsx.uk EXMO FoxBit foxbit.exchange FYB-SE FYB-SG GDAX Gemini HitBTC Huobi itBit jubi.com Kraken LiveCoin Liqui liqui.io luno mercado MercadoBitcoin mercadobitcoin.br OKCoin OKCoin.com OKCoin.cn Paymium Poloniex QuadrigaCX QUOINE SouthXchange SurBitcoin surbitcoin.com TheRockTrading UrduBit urdubit.com Vaultoro VBTC vbtc.exchange vbtc.vn VirWoX YoBit Zaif',
keywords = 'algotrading altcoin altcoins api arbitrage backtesting bitcoin bot btc crypto cryptocurrency currency market darkcoin dash digital doge dogecoin e-commerce eth ether ethereum exchange exchanges framework invest investing investor library light litecoin ltc marketdata merchandise merchant minimal order orderbook book price pricedata pricefeed private public ripple strategy toolkit trade trader trading volume xbt xrp zec zerocoin 1Broker 1BTCXE ANX ANXPro bit2c.co.il Bit2C BitBay BitBays Bitcoin.co.id Bitfinex bitlish BitMarket BitMEX Bitso Bitstamp Bittrex BlinkTrade BTCC BTCChina BTC-e BTCe BTCTrader btctrader.com btc-trade.com.ua BTCTradeUA BTCTurk btcturk.com BTCX btc-x bter Bter.com BX.in.th ccex C-CEX cex CEX.IO ChileBit chilebit.net coincheck CoinMate Coinsecure DSX dsx.uk EXMO FoxBit foxbit.exchange FYB-SE FYB-SG GDAX Gemini HitBTC Huobi itBit jubi.com Kraken LiveCoin Liqui liqui.io luno mercado MercadoBitcoin mercadobitcoin.br OKCoin OKCoin.com OKCoin.cn Paymium Poloniex QuadrigaCX QUOINE SouthXchange SurBitcoin surbitcoin.com TheRockTrading UrduBit urdubit.com Vaultoro VBTC vbtc.exchange vbtc.vn VirWoX YoBit Zaif',

packages = find_packages ()
)

0 comments on commit 00fbe13

Please sign in to comment.