我想做一个自动售卖我Coinbase钱包中所有硬币的机器人。 使用API文档,我编写了以下脚本:
from coinbase.wallet.client import Client
client = Client(
'public_key',
'private_key',
'api_version')
account = client.get_primary_account()
payment_method = client.get_payment_methods()[0]
sell_price_threshold = 1000000000
# voluntary set a price too high for sell all coins automatically
sell_price = client.get_sell_price(currency='EUR')
if float(sell_price.amount) <= sell_price_threshold:
sell = account.sell(amount='acct.balance.amount',
currency="BTC, LTC, ETH, BCH",
payment_method=payment_method.id)
https://developers.coinbase.com/
如何使该功能起作用?
我应该在我的ubuntu服务器VPS上每行用那条线录音吗?如果我这样做并留下副总裁,这会在后台继续进行吗?