Rpc#

class defichain.ocean.Rpc(ocean)#
call(method: str, *params: []) {}#

Call an RPC method

Parameters:
  • method (str) – (required) method of the RPC method

  • params (array) – (optinal) params to send upstream

Returns:

json string

Example:

>>> ocean.rpc.call("getblockcount")