2017-07-27 5 views
-2

の間に[購入制限]が働いていない購入限度を購入しようとしています。手作業で手渡しても、動作しないようです。このラッパーを使用して[売り制限]が

https://github.com/ericsomdahl/python-bittrex/blob/master/bittrex/bittrex.py

売りリミット発注工事ではなく購入制限

from bittrex import Bittrex 
api = Bittrex('0c7a0faxxxxxx4ac5aa', 'fce8a555xxx3xxac10') 

# getting BTCBalance 
trade = 'BTC' 
pumpcurrency = raw_input('which currency would you like to pump?') 
market = '{0}-{1}'.format(trade, pumpcurrency) 

BTCbalance = api.get_balance(trade)['result']['Available'] 
print "Your balance is {0} {1}.".format(BTCbalance, trade) 

# Getting the BTC price for your pumpable currency 
cryptosummary = api.getmarketsummary(market) 
currencyprice = cryptosummary['result'][0]['Last'] 
print 'The price for {0} is {1:.8f} {2}.'.format(pumpcurrency, currencyprice, trade) 

# Amount of coins to buy 
amount = (BTCbalance*.99)/currencyprice 

# How big of a profit you want to make 
multiplier = 1+ float(raw_input("How much profit would you like to make? (input percentage as integer)"))/100 
print ("Selling at "+str(multiplier) +"x profit") 

# Buying the pump currency for BTC 
api.buy_limit('BTC-ARK', float(.1), .00000011) 
print ('Buying ' +str(amount)+" "+ pumpcurrency + ' at ' + str(currencyprice) + " each.") 

# Multiplying the price by the multiplier 
#sellprice = round(currencyprice*multiplier, 8) 

# Selling pumped for profit 
#print 'Selling {0} {1} for {2:.8f} {3}.'.format(amount, pumpcurrency, sellprice, trade) 
api.sell_limit('BTC-MYST', .1, .1) 
+1

問題が何であるかを示す良い仕事をしてください。エラーメッセージがありましたか? – Difster

+0

** MCVEベースの質問**にお問い合わせいただく方法は? StackOverflowは、ユーザーに** M **最小(効率)+ ** C **オンプレイト(自己完結型 - はい - データ付き)+ ** V **実証可能(再実行準備完了)+ * * E ** xamples(完全な例、すべての詳細+データ、再テストを可能にする)、あなたは仕事をするのに苦労します。 **最高の次のステップは、このコミュニティの練習について+上記のMCVEを修正して完成させることです**。とにかく、この偉大な知識社会を歓迎し、私たちの活発な貢献者になりましょう。 – user3666197

+0

@Difster問題は実際のAPI呼び出しにありますが、実行時やコンパイルエラーはありませんが、機能するためには購入エラーを受け取ることができません。私はすべての正しいパラメータを使用します。さらに、sell関数は問題なく動作するので、私は本当にここで止まっています。 –

答えて

0

私はBittrexの買い注文の最小50K satoshis値があり、私はあなたの答え を持っていると思います。あなたは、私が行ったように、単一のコインを使用してコードをテストする場合

https://support.bittrex.com/hc/en-us/articles/115000240791-Error-Codes-Troubleshooting-common-error-codes

その結果、それが満たされることはありません。

「DUST_TRADE_DISALLOWED_MIN_VALUE_50K_SAT」というエラーメッセージが表示されているかどうかを確認するには、api.buy_limitを印刷することをおすすめします。

関連する問題