(Core) Account API

GET Account Info #

GET /v2/newbridge/account

Returns a JSON structure with details of one account’s address in bridged network.

API parameters #

Required #

NameInTypeDescriptionEnum
directionquerystringSpecify NewBridge network direction.new2eth eth2new new2heco heco2new new2bsc bsc2new
ethereum_recipient_addressquerystringReciving account on ethereum in new2eth direction. Must be address starting with 0x. The key of name can be changed to hecochain_recipient_address or bschain_recipient_address
newchain_recipient_addressquerystringReciving account on ethereum in eth2new direction. Can be address starting with NEW or 0x.
curl -v https://replace-api-domain.ext/newbridge/account?ethereum_recipient_address=0xad61cc6653B62b7C05Bd2F593Bc49d22Fb901A9c&direction=new2eth

Response 200 #

{
  "ethereum_recipient_address": "0xad61cc6653B62b7C05Bd2F593Bc49d22Fb901A9c",
  "newchain_recipient_raw_address": "",
  "direction": "new2eth",
  "newchain_deposit_address": "NEW17zLJnGFnhi9b3yPUanjiieXknCirQhNwWE1",
  "newchain_deposit_raw_address": "0x5741E7e542828DF38A888bcc9b8f9500e4331420"
}
NameTypeDescription
ethereum_recipient_addressstringReceiving address in on ethereum for new2eth direction. The name can be changed to hecochain_recipient_address or bschain_recipient_address.
newchain_recipient_addressstringReceiving address in on newchain for eth2new direction.
newchain_recipient_raw_addressstringReceiving address in 0x on newchain for eth2new direction.
directionstringNewBridge network direction
ethereum_deposit_addressstringDeposit address on ethereum for eth2new direction. The name can be changed to hecochain_deposit_address or bschain_deposit_address.
newchain_deposit_addressstringDeposit address on newchain for new2eth direction.
newchain_deposit_raw_addressstringDeposit address in 0x on newchain for new2eth direction.

Error Codes #

StatusCodeDescriptionParams
400account_not_foundAcount was not found
400address_is_in_invalid_formatRequested address format is not valid{ “type” => “newchain_address” } or { “type” => “ethereum_address” }
429too_many_requestsToo many requests have been made to the api.
500internal_server_errorInternal server error
503service_unavailableService is temporary unavailable
(Core) Account API was last edited on 2021-05-17 @a593cf1 : update newbridge api v2