RE: RE: [ENG/ITA] Earning HIVE Thanks to My Scripts: Bridges Arbitrage and Grid Trading
You are viewing a single comment's thread from:

RE: [ENG/ITA] Earning HIVE Thanks to My Scripts: Bridges Arbitrage and Grid Trading

Words
158
Reading
1 min
1y

Ciao! Ho provato a lanciare questo script con python, in effetti mi ha creato l'ordine (ho cercato di vendere un hive a 0.22 hbd, se ho capito bene), ma non è successo niente... Ho provato anche con prezzi maggiori, ma niente. Secondo te lo script è giusto? Se l'ordine non è accettato entro quanto tempo scade? Grazie!

from beem import Hive
from beem.account import Account
from beembase.operations import Custom_json
import json

Dati utente

username = "barnabo73"
active_key = "myactivekey" # tua chiave privata

Inizializza blockchain

hive = Hive(keys=[active_key])
account = Account(username, blockchain_instance=hive)

Parametri ordine

quantity = "1.00000"
price = "0.22"
symbol = "SWAP.HIVE" # Hive su Hive-Engine
order_type = "sell"

json_data = {
"contractName": "market",
"contractAction": "sell",
"contractPayload": {
"symbol": symbol,
"quantity": quantity,
"price": price
}
}

Prepara e firma la transazione JSON

tx = Custom_json(
**{
"required_auths": [username],
"required_posting_auths": [],
"id": "ssc-mainnet-hive",
"json": json.dumps(json_data)
}
)

Invia la transazione

broadcast_result = hive.finalizeOp(tx, username, "active")

print("Ordine piazzato:")
print(broadcast_result)

@barnabo73: Ciao! Ho provato | Ecency