GithubHelp home page GithubHelp logo

btctrader / broker-api-docs Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 32.0 156 KB

The documentation for BTCTrader's white label exchange platform API. Use this documentation to access the APIs of BTCTurk other BTCTrader partners.

broker-api-docs's People

Contributors

btctraderadmin avatar emrekenci avatar ercumenteskar avatar hu53yin avatar maderkan avatar mohamedfarrag avatar sd189 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

broker-api-docs's Issues

XRP icin balance bilgisi API'ye eklenmeli

Balance bilgisi suan icin sadece BTC, ETH, ve TRY icin donuyor. XRP borsaniza yeni eklendi ve API 'de henuz yok. Bu durum bazi botlari bozucaktir. XRP kullanimini engeller. Acil eklenirse API kullanarak ta XRP islemleri yapilabilir.

yeni tasarım yeni altyapı

Ethereum eklendikten ve yeni tasarımla yeni altyapıya geçildikten sonra apinin bazı linkleri çalışmaz oldu. balance ve ticket gibi bazı bilgilere ulaşılabiliyorken, openorder gibi bazı linkler uçmuş durumda.
dokümanın güncellenmesi gerekiyor.

test coin

Merhaba, test için coin nasıl oluşturulur?

BTCTurk Api Usage with PHP

Hello. Is there any example or sample for using api with php? How can we use BtcTurk api with php for buying and selling?

code 500

[code] => 500 [message] => Emir girilemedi. Lütfen tekrar deneyiniz ve hata tekrar ederse bize ulaşınız. )
hatası alıyorum nedeni nedir?

Request Limits'de değişiklik oldu mu?

Dökümantasyona göre her 100 milisaniyede bir request göndermeye izin varken, bazen birkac requesti aralarında 1 saniye bekleyerek yolladığım halde, çok sık olmamakla birlikte bu hata mesajı geri geliyor.

<Response [409]>, The allowed number of requests has been exceeded.

Dökümantasyonun mu güncellenmesi gerekiyor bu konuda yoksa ben mi bir şeyi atlıyorum?

teşekkürler

ticker servisi eski veriyi gösteriyor

Ticker servisi üzerinden verileri güncellerken bir süre sonra sürekli eski veriyi döndürmeye başlıyor. Ticker servisini kullanmak için authorization gerekli mi?

Problem authenticating in PHP

I am trying out the API with one of your testing sites. Plain unauthenticated GETs were straight forward to accomplish. However, I have trouble sending the correct headers for an authenticated GET; I keep getting a 401 (Unauthorized - Invalid Request) . I am sending the relevant snippet (with keys removed). Any ideas would be appreciated.

<?php

$baseURL='https://btctrader-broker-btcgreece.azurewebsites.net/api/';
$APIKey='<my_API_key>';
$privateKey='<my_private_key>';

$message=$privateKey.time();
$signatureBytes = hash_hmac('sha256', $message, $privateKey, TRUE);
$signature=base64_encode($signatureBytes);

function authGet($uri) {
        $url=$GLOBALS['baseURL'].$uri;
        $nonce=time();
        $headers=array(
                'X-PCK: '.$GLOBALS['APIKey'],
                'X-Stamp: '.$nonce,
                'X-Signature: '.$GLOBALS['signature']
        );
        $ch=null;
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        $result=curl_exec($ch);
        curl_close($ch);
        return json_decode($result);
}

$r=authGet('balance');
var_dump($r);

?>

Ruby de headerlari halleden var mi?

Selamlar,

Asagidaki code btcturk html sayfasinin kodunu donuyor balance json response yerine. Ruby de sorunsuz bunu calistiran var mi?

require 'openssl'
require 'Base64'

class Btc
  URL = 'https://www.btcturk.com/api/'

  def headers
    api_key     = ENV['BTC_API_KEY']
    private_key = ENV['BTC_PRIVATE_KEY']
    timestamp   = Time.now.to_i.to_s
    message = api_key + timestamp
    signature = Base64.encode64(OpenSSL::HMAC.digest('sha256', private_key, message)).strip()

    {
      "X-PCK" => api_key,
      "X-Stamp" => timestamp,
      "X-Signature" => signature,
    }
  end

  def balance() 
    RestClient.get URL + 'balance', headers()
  end
end

invalid model hatası

alış veya satış emri verdiğimde şöyle bir hata alıyorum

[code] => 400
[message] => Emir girilemedi. Lütfen tekrar deneyiniz ve hata tekrar ederse bize ulaşınız. Hata kodu: Invalid model

yetkilendirme yapılmış bir şekilde(balance bilgileri görünüyor) post olarak .../api/exchange adresine
OrderMethod
OrderType
Price
Amount
PairSymbol

bilgilerini post ediyorum.
eksik girdiğim bir bilgi var mı acaba.

Problem with Authentication in JAVA

Hi there,
I can consume the methods with JAVA which does not require authentication (ie. "ticker").
However, the attached piece of code returns error code 401 for "balance" method.
Any help will be granted,
Best.

Balance.txt

PHP Auth Problem "Unauthorized - Invalid Request"

I have getting 401 error;
object(stdClass)#1 (2) { ["code"]=> int(401) ["message"]=> string(30) "Unauthorized - Invalid Request" }

My script is below;

`<?php

$baseURL = 'https://www.btcturk.com/api/';

$PrivateKey = '****';
$APIKey = '(Public Key)';

$message=$APIKey.time();
$signatureBytes = hash_hmac('sha256', $message, base64_decode($privateKey), TRUE);
$signature=base64_encode($signatureBytes);

$url=$baseURL.'balance';
$nonce=time();
$headers=array(
'X-PCK: '.$APIKey,
'X-Stamp: '.$nonce,
'X-Signature: '.$signature
);

$ch=null;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result=curl_exec($ch);
// echo var_dump(curl_getinfo($ch));
curl_close($ch);

$r=json_decode($result);

var_dump($r);

?>`

thanks

ohlcdata da veri hatasi

merhabalar,

DailyChangeAmount ile DailyChangePercentage datalari hatali gelmekte.

"DailyChangeAmount":3.06,"DailyChangePercentage":1260.0

hmacsha256 şifreli mesaj oluşturma

merhabalar,

ben btcturk api'ye bağlanmaya çalışıyorum ama kimlik doğrulama kısmında hmacsha256 sifreli mesaj istiyor. ben c dili ile yazıyorum api documentation kısmında nasıl yapılacağına dair örnek var ama c# ile gösterilmiş. bu şifrelemenin c dilinde yazılmış bi örneği var mı acaba? ya da siz verebilir misiniz bi örnek? teşekkürler

Api BTC ve ETH withdraw

Merhabalar;

Sitede api key oluştururken withdraw seçeneği olup olmaması soruluyor. Burdan hareketle withdraw özellğinin olduğunu varsayıyorum ama documentation'da withdraw fonksiyonunu bulamadım. Nasıl api key ile btc ve eth çekme işlemi yapabilirim yardımcı olabilir misiniz?

Teşekkürler

telefon uygulaması sorunu

güncellemeden sonra telefon uygulaması hiç açılmadı. açılır açılmaz kapanıyor, "hata oluştu" mesajı çıkıyor.
madem henüz etherium işlemleri yapılmayacak. bari play store'a eski versiyonu geri yükleyin de app'i rahatça kullanalım

Anlık Data Problemi

Merhabalar,

"Ticker method"undaki dönen data ile sitede yer alan fiyat bilgisi uyuşmuyor.Bunun real-time bir socketi var mı ? veya "api/ticker" servisinin cache sorunu çözebilir miyiz ? Anlık data almak için, bu gerekli oluyor, ya da auth olmadan real data mı gelmiyor?
alt text

Bu konuda yardımınız gerekiyor. Teşekkürler

API return codes

Dear support,

Your error messages are written in Turkish, which makes them difficult to read. Could you send me a list of return codes with English description?

Withdrawal

Hi,

When will you available "withdrawal" ability in your API? Waiting for a long time.. Since you have withdrawal mechanism in your mobile app, it shouldn't be difficult to open it to the public via your API.

Thanks,
Eray


Merhabalar,

API'nize ne zaman para cekme ozelligi getireceksiniz? Uzun bir suredir bekliyoruz. Mobil uygulamaniz para cekme ozelligi oldugu icin API olarak hazirdir diye dusunuyorum, bunu herkesle paylasmaniz zor olmasa gerek?

Tesekkurler,
Eray

"code":401,"message":"Unauthorized - Invalid Public key"

merhabalar ben api bağlanmaya çalıştığımda başlıkta yazılan geçersiz key hatasını alıyorum sürekli yardımcı olabilir misiniz? teşekkürler

`sprintf(X_PCK,"X-PCK:%s",MY_API_KEY);
sprintf(X_STAMP,"X-STAMP:'%ld'",(unsigned long)time(NULL));
sprintf(X_SIGNATURE,"X-SIGNATURE:%s",SIGNATURE);

struct curl_slist *list = NULL;

list=curl_slist_append(list,X_PCK);
list=curl_slist_append(list,X_STAMP);
list=curl_slist_append(list,X_SIGNATURE);

req=curl_easy_init();

if(req)
{

curl_easy_setopt(req,CURLOPT_URL,"https://www.btcturk.com/api/balance");

curl_easy_setopt(req, CURLOPT_HEADER,list);

curl_easy_setopt(req, CURLOPT_WRITEDATA, response);

res=curl_easy_perform(req);`

Golang Auth Problem

Hi i keep getting 401 error. Here is my code for authentication. Im pretty sure i followed instructions correctly.

 func getAccountBalance() {
    timeStamp := fmt.Sprint(int32(time.Now().Unix()))
    signature := ComputeHmac256("myPublicAPIKEY"+timeStamp, "myAPISecret")
    client := &http.Client{}
    req, _ := http.NewRequest("GET", "https://www.btcturk.com/api/balance", nil)
    req.Header.Set("X-PCK", "myPublicAPIKEY")
    req.Header.Set("X-Stamp", timeStamp)
    req.Header.Set("X-Signature", signature)

    resp, _ := client.Do(req)
    bodyBytes, _ := ioutil.ReadAll(resp.Body)
    bodyString := string(bodyBytes)
    fmt.Println(bodyString)
}

func ComputeHmac256(message string, secret string) string {
    fmt.Println(message)
    fmt.Println(secret)
    key := []byte(secret)
    h := hmac.New(sha256.New, key)
    h.Write([]byte(message))
    fmt.Println(hex.EncodeToString(h.Sum(nil)))
    return hex.EncodeToString(h.Sum(nil))
}

OHLC tradepair

The OHLC doesn't specify the tradepair...

What currency is being displayed?

Not able to give buy order with JavaScript code

My code is not working. Console output is as following;({"code":401,"message":"Unauthorized - Invalid Request"})

I will appreciate if you can help me to correct the mistake.

const request = require('request');
const sha256 = require('crypto-js/sha256');
const hmacSHA512 = require('crypto-js/hmac-sha512');
const Base64 = require('crypto-js/enc-base64');

var PublicKey = ;
var PrivateKey = ;
var nonce = Math.floor(new Date() / 1000).toString();

const hashDigest = sha256(nonce + PublicKey);
const hmacDigest = Base64.stringify(hmacSHA512( hashDigest, PrivateKey));

const options = {
url: 'https://www.btcturk.com/api/exchange',
method: 'post',
OrderMethod: 0,
OrderType: 0,
Price: 39000,
Amount: 0.0001,
PairSymbol: 'BTCTRY',

headers: {
  'X-PCK': PublicKey,
  'X-Stamp': nonce.toString(),
  'X-Signature': hmacDigest,

}
}
var req = request.post(options, function(error, response, body) {
console.log(body);
});

Order canceling is not clear

Dear support,

We have 3 limit orders created via API with canceling issue.

  1. The limit order has been created.
  2. The cancelation request has been sent.
  3. BTCTurk responded without error. Which we treat as a success -- the order has been canceled.
  4. But the order has been completed, when we expect that the order is canceled.

List of such orders:

  • id:"5249264", "datetime":"2018-03-13T17:55:12.9067653Z
  • id:"5256367", "datetime":"2018-03-14T07:55:52.5119841Z
  • id:"5256380", "datetime":"2018-03-14T07:56:31.7453566Z

Please advise, how should we treat such issue? How can we be sure whether order completed or canceled?

Alım ve Satım Post olarak neleri göndermem gerekiyor?

Merhaba,

`function authPost($uri) {
$url=$GLOBALS['baseURL'].$uri;
$nonce=time();
$headers=array(
'X-PCK: '.$GLOBALS['APIKey'],
'X-Stamp: '.$nonce,
'X-Signature: '.$GLOBALS['signature']
);

		$post = "OrderMethod=1&OrderType=1";
		$ch=null;
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($ch, CURLOPT_POST, true);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
		curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
		$result=curl_exec($ch);
		curl_close($ch);
		return json_decode($result);
}`

Fonksiyonunu kullarak alış ve satış yapmaya çalışıyorum fakat alış ve satış yaparken hangi parametreleri göndermem gerekiyor ekstra, döküman üzerinden anlayamadım. Yardımcı olursanız sevinirim.

Account Balance endpoint returns HTML instead of JSON

Requests to the Account Balance endpoint (https://www.btcturk.com/api/balance) get an HTML response instead of JSON.

Code issuing request (in Google Apps Script / JavaScript):

var ts = Date.now().toString();
var url = "https://www.btcturk.com/api/balance";

// Create and encrypt signature
var plaintext = API_KEY + ts;
var signature = Utilities.base64Encode(
    (Utilities.computeHmacSha256Signature(plaintext, API_SECRET));

// Build and make request
var options = {
    'method': 'GET',
    'headers' : {
        'X-PCK': BTCTURK_API_KEY,
        'X-Stamp': ts,
        'X-Signature': signature
    }
};

var responseJson = UrlFetchApp.fetch(url, options); 
return responseJson.toString();

The response:

<!DOCTYPE html>
<html xmlns=""http://www.w3.org/1999/xhtml"">
<head>
    <script type=""text/javascript"">
        window.location.href = window.location.protocol + '//' + window.location.host;
    </script>
</head>
<body>
    <div>Sitemizi kullanabilmeniz için kullandığınız tarayıcı ayarlarında Javascript'ı aktifleştirip siteyi yenileyiniz.</div>
</body>
</html>

Trades type (buy or sell ) is not exist in json result

.../api/trades?pairSymbol=BTCTRY

How can i know this trade is buy or sell ?

[
{
"date": 1439280491.0,
"tid": "55c9ad6b1ac4dc12b06131dc",
"price":767.47,
"amount":0.06486361
},
{
"date": 1439280491.0,
"tid": "55c9ad6b1ac4dc12b06131dc",
"price":767.47,
"amount":0.06486361
}
]

Limit sell emri "invalid model" hatası

`function cancel(){ // BTCTURK
$uri='https://www.btcturk.com/api/exchange';
$sign=hash_hmac('sha512',$uri,"#SECRET#");
$ch = curl_init($uri);
$message = "#KEY#" . time();
$signature = base64_encode(hash_hmac('sha256', $message,base64_decode("#SECRET#"),true));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-PCK:'."#KEY#","X-Stamp:".time(),"X-Signature:".$signature));
curl_setopt($ch, CURLOPT_POSTFIELDS,"OrderMethod=0&OrderType=1&Price=45280&amount=00112&amountPrecision=001&pricePrecision=00&PairSymbol=BTCTRY");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$execResult = curl_exec($ch);
$bb = json_decode($execResult, true);
return(serialize($bb));
}

print_r(cancel());echo "\n";`

Verdiği sonuç;

a:1:{s:5:"error";a:2:{s:4:"code";i:400;s:7:"message";s:106:"Emir girilemedi. Lütfen tekrar deneyiniz ve hata tekrar ederse bize ulaşınız. Hata kodu: Invalid model";}}

Autohorization Error - PHP

Hi

Th e following code is giving error
{ ["code"]=> int(401) ["message"]=> string(30) "Unauthorized - Invalid Request"}
Can you help me ?

Regards.

$baseURL=api::apiUrl;
$APIKey=api::publicKey;
$privateKey=api::privateKey;

$time = time();
$message=$privateKey.$time;
$signatureBytes = hash_hmac('sha256', $message, base64_decode($privateKey), TRUE);
$signature=base64_encode($signatureBytes);

$r=authGet('balance');
var_dump($r);

function authGet($uri) {
$url=$GLOBALS['baseURL'].$uri;
$nonce=$GLOBALS['time'];
$headers=array(
'X-PCK: '.$GLOBALS['APIKey'],
'X-Stamp: '.$nonce,
'X-Signature: '.$GLOBALS['signature']
);
echo var_dump($headers);
$ch=null;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result=curl_exec($ch);
echo var_dump(curl_getinfo($ch));
curl_close($ch);
return json_decode($result);

}

Buy Order Limit sorunu

Sunucu cevabı: {"error":{"code":400,"message":"Emir girilemedi. Lütfen tekrar deneyiniz ve hata tekrar ederse bize ulaşınız. Hata kodu: Invalid model"}}

URI: https://www.btcturk.com/api/exchange
Params: OrderMethod=0&OrderType=0&Price=1&PricePrecision=0&Amount=1&AmountPrecision=0&Total=1&TotalPrecision=0&PairSymbol=BTCTRY

veya

Params: {'OrderMethod': 0,
'OrderType': 0,
'Price': 44444,
'PricePrecision': 0,
'Amount': 1,
'AmountPrecision': 0,
'Total': 1,
'TotalPrecision': 0,
'TriggerPrice': 0,
'TriggerPricePrecision': 0,
'PairSymbol': 'BTCTRY'}

Getting part of orderbook

There is a way to set a limit on the amount of retrieved trades via

api/trades?last=COUNT

Can the same be done with the order book? I.e. retrieve the COUNT lowest asks and COUNT highest bids instead of the whole order book?

/api/orderbook?max=COUNT

ohlcdata Servisi Eski Bir Tarihi Gösteriyor

Merhaba,

https://www.btcturk.com/api/ohlcdata?last=1
ile çağırdığımda;

{
Time: "2017-10-07T00:00:00",
Open: 15446.51,
High: 15600,
Low: 15350.86,
Close: 15420,
Volume: 52.74146484,
Average: 15514.78,
DailyChangeAmount: -0.17,
DailyChangePercentage: -26.51
}

Sonucunu alıyorum. Neden güncel tarih gelmiyor?
Bende cache sorunu mu var diye postman ile de çağırdım güncel bilgiler gelmiyor.

İptal Edilen Emrin Takip Edilememesi

Merhaba,

Emir durumlarını sorgularken, openOrders'da yer almayan emirler gerçekleşmiştir diye varsayıyorum. Bu da web sitesinden manuel iptal edilmiş emri de gerçekleşmiş olarak görmeme neden olabiliyor.

Bir emrin "order ID" siyle sorarak açık mı, iptal mi, rlz mi olduğunu anlayabileceğim bir servis/yöntem var mıdır?

Teşekkürler.

ohlcdata Servisinin Sembol Bazında Çekilmesi

Merhaba,
ETH'da işlem yapabilmek için OHLCDATA servisini SEMBOL bazında alabilmem gerekiyor. Bunu ekleyebilir misiniz?

Mevcut:
https://www.btcturk.com/api/ohlcdata?last=1

[
	{
		Time: "2017-10-26T00:00:00",
		Open: 22280,
		High: 22799,
		Low: 21360,
		Close: 21640.9,
		Volume: 240.65171006,
		Average: 22155.25,
		DailyChangeAmount: -2.87,
		DailyChangePercentage: -639.1
	}
]

Talep Edilen:

[
	{
		Time: "2017-10-26T00:00:00",
		PairSymbol : "BTCTRY",
		Open: 22280,
		High: 22799,
		Low: 21360,
		Close: 21640.9,
		Volume: 240.65171006,
		Average: 22155.25,
		DailyChangeAmount: -2.87,
		DailyChangePercentage: -639.1
	},
	{
		Time: "2017-10-26T00:00:00",
		PairSymbol : "ETHTRY",
		Open: 1155.99,
		High: 1255.99,
		Low: 1055.99,
		Close: 1165.99,
		Volume: 120.240,
		Average: 22155.25,
		DailyChangeAmount: -1.00,
		DailyChangePercentage: -2.10
	}
]

Teşekkürler.

btctrader-broker-btcturk.azurewebsites.net SMS verification step not working

Error:
SMS mesajı gönderilemedi. Lütfen tekrar deneyiniz. Sorun devam ederse lütfen konuyu destek birimine bildiriniz.

Sent an email to support, here is their response:

Yardım masası olarak BTCTurk API ile ilgili teknik programlama desteği vermemekteyiz. Eğer programcı iseniz API yardım sayfamızdaki BTCTrader Github sayfasındaki linki kullanarak teknik ekibimizden Github
üzerinden destek isteyebilirsiniz.

UserTransactions servisinde ilgili emir numarası ihtiyacı

Merhaba,
Önemli bir eksikten bahsetmek istiyorum. Gerçekleşen bir emrin gerçekleşme fiyatını anlayamıyoruz (tek veya parçalı). Bunun için "UserTransactions" servisine ilgili "orderID" kolonunu ekleyemez misiniz?

Emir verirken bir REF kodu alsanız onu direk basardınız o da olurdu.
Bu konuda bir geliştirme yapabilir misiniz?

Teşekkürler.

Python authentication

I get authentication error 401 - Unauthorized: Invalid Request. I have tried to translate the codes to python. Can you guys spot what I am missing?

    def returnBalances(self):

        headers = {
            "X-PCK": self.APIKey ,
            "X-Stamp": str(int(time.time())) ,
            "X-Signature": str(self.authSignature)
        }

        try:
            ret = urllib2.urlopen(urllib2.Request('https://www.btcturk.com/api/balance', headers=headers))
        except urllib2.HTTPError as e:
            print e.code
            print e.read()
        return  json.loads(ret.read())

    def authSignature(self):
        unixTime = int(time.time())
        data = self.APIKey + str(unixTime)

        return base64.b64encode(hmac(base64.b64decode(self.Secret), data, hashlib.sha256).digest().encode('base64')[:-1])

sell limit order hatası

alış satış emirlerini post etmek için herşeyi "https://github.com/BTCTrader/broker-api-docs" göre yapmama rağmen al emirlerinde sıkıntı yaşıyorum limit order yerine market order fiyatından alış yapıyor. Aynı sorun sell limit orderda yok mesela.
buy limit order:
data={'totalPrecision': 60, 'amount': 0, 'amountPrecision': 1,
'Price': 20000, 'pricePrecision': 95, 'orderMethod': 0,
'orderType': 0, 'triggerPrice': 0, 'triggerPricePrecision': 00,
'DenominatorPrecision': 2, 'PairSymbol': 'BTCTRY'}

sell limit order:
data={'totalPrecision': 60, 'amount': 0, 'amountPrecision': 001,
'Price': 50000, 'pricePrecision': 51, 'orderMethod': 0,
'orderType': 1, 'triggerPrice': 0, 'triggerPricePrecision': 00,
'DenominatorPrecision': 2, 'PairSymbol': 'BTCTRY'}
sell limit order cevap:
[{u'price': 50000.51, u'id': u'608491', u'amount': 0.001, u'datetime': u'2017-11-13T00:52:14.937', u'type': u'SellBtc', u'pairsymbol': u'BTCTRY'}]

TypeError: Unicode-objects must be encoded before hashing

Selam ,

Python da aldıgım hata aşaıdaki gibidir nerede hata yapıyorum acaba yardım alabilrimiyim?
Hata:
self.inner.update(msg)
TypeError: Unicode-objects must be encoded before hashing>
Satır
< lv_signature = hmac.new(base64.b64decode(self.private_key), data, hashlib.sha256)>

Kod Örneğim
def authSignature(self):
unixTime = int(time.time())
data = str(self.api_key + str(unixTime))
lv_signature = hmac.new(base64.b64decode(self.private_key), data, hashlib.sha256)
signature = base64.b64encode(lv_signature.digest().encode('base64')[:-1])
return signature

Burayı aşamadığımdan ilerleyemiyorum :( yardımlarınızı rica ederim.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.