RawTx#

class defichain.ocean.RawTx(ocean)#
send(hex: str, maxFeeRate: float | None = None) str#

Send a raw transaction

Parameters:
  • hex (str) – (required) rawTx to submit to the network

  • maxFeeRate (float) – (optional) maximum fee rate

Returns:

“txid” (string)

Example:

>>> ocean.rawTx.send("hex")
test(hex: str, maxFeeRate: float | None = None)#

Send a raw transaction to test the mempool acceptance

Parameters:
  • hex (str) – (required) rawTx to submit to the network

  • maxFeeRate (float) – (optional) maximum fee rate

Example:

>>> ocean.rawTx.test("hex")
get(txid: str) {}#

Get a raw transaction

Parameters:

txid (str) – (required) txid of transaction to query

Returns:

json string

Example:

>>> ocean.rawTx.get("af6294e9729c6a4f31439e86374541658f35f4cc372a51e06c725429d875ac5c")