[卖出限价]时,bittrex API无效的[买入限价]

时间:2017-07-27 18:41:23

标签: python bots trading

尝试让我的购买限额订单工作,即使我手动通过它,我似乎无法让它工作。

使用此包装器: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 个答案:

答案 0 :(得分:0)

我想我已经得到了答案 在Bittrex上购买订单的最低50K satoshis值。

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

因此,如果您像我一样使用单个硬币测试您的代码,那么它将无法实现。

我建议你打印你的api.buy_limit,以检查你是否得到了'DUST_TRADE_DISALLOWED_MIN_VALUE_50K_SAT'错误信息。