Skip to Content
EnDocs
Trading API
Chain Query & Broadcast

Chain Query & Broadcast

Address Balance Query

Query token balances held by an address on a specific chain.

Request Path: POST /bgw-pro/wallet/v1/account/balancesV3

Request Parameters

ParameterTypeRequiredDescription
chainstringYesChain identifier, e.g. eth, bnb, matic
addressstringYesUser wallet address
contract[]stringNoToken contract address list. Returns up to 1000 entries if omitted

Request Example

{ "chain": "eth", "address": "0x000000000000Bb1B11e5Ac8099E92e366B64c133", "contract": ["0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39"] }

Response Example

{ "code": 0, "data": { "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39": { "chain": "eth", "address": "0x000000000000Bb1B11e5Ac8099E92e366B64c133", "contract": "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39", "balance": "1.000000000000000000", "update_time": 1775358110 } }, "message": "success" }

Gas Fee Query

Query the current gas price for a specified chain, with EIP-1559 fee model support for EVM chains.

Request Path: POST /bgw-pro/chain/public/getGasPriceV1

Request Parameters

ParameterTypeRequiredDescription
chainstringYesChain identifier, e.g. eth, bnb, matic

Request Example

{ "chain": "eth" }

Response Example

{ "code": 0, "message": "success", "data": { "gasPrice": "0.117109435", "mediumGasPrice": "0.13467585025", "fastGasPrice": "0.1756641525", "eip1559": { "baseFeePerGas": "0.116719073", "maxPriorityFeePerGas": "0.000054325", "maxPriorityFeePerGasTiered": { "normal": "0.000054325", "medium": "0.001", "fast": "0.020171544" } }, "chainType": "evm" } }

Response Fields

FieldTypeDescription
gasPricestringStandard gas price (Gwei)
mediumGasPricestringMedium speed gas price
fastGasPricestringFast speed gas price
eip1559.baseFeePerGasstringEIP-1559 base fee
eip1559.maxPriorityFeePerGasstringDefault priority fee
eip1559.maxPriorityFeePerGasTiered.normalstringNormal tier priority fee
eip1559.maxPriorityFeePerGasTiered.mediumstringMedium tier priority fee
eip1559.maxPriorityFeePerGasTiered.faststringFast tier priority fee
chainTypestringChain type, e.g. evm

Transaction Broadcast

Broadcast a signed raw transaction to the chain.

Request Path: POST /bgw-pro/chain/public/send

Request Parameters

ParameterTypeRequiredDescription
chainstringYesChain identifier, e.g. eth, bnb, sol, trx
sigstringYesSigned raw transaction (hex or base64, depending on chain)
useMevProtectboolNoWhether to enable MEV protection

Request Example

{ "chain": "eth", "sig": "0xf86c808504a817c800825208940x1234...880de0b6b3a76400008025a0...", "useMevProtect": true }

Response Example

{ "code": 0, "message": "success", "data": { "txid": "0xabc123..." } }

Transaction Detail Query

Query on-chain transaction details. On success, the response is a flat transaction detail object without the { code, message, data } wrapper.

Request Path: POST /bgw-pro/chain/public/getDetail

Request Parameters

ParameterTypeRequiredDescription
chainstringYesChain identifier, e.g. eth, arbitrum, sol
txidstringYesOn-chain transaction hash

Request Example

{ "chain": "arbitrum", "txid": "0x1dd7a1610eb303084e716c71cd2b32008631b610bc5d922e272c5a049ccbc140" }

Response Example

{ "txid": "0x1dd7a1610eb303084e716c71cd2b32008631b610bc5d922e272c5a049ccbc140", "status": 1, "height": 464149490, "time": 1779115993, "from": "0x69a1ad2dc946256e8871bc75abc565c41422cef5", "to": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "value": "0", "fee": 7.02331846e-7, "feeData": { "coin": "eth", "gasPriceText": "0.020026 Gwei", "gasPrice": "0.000000000020026", "gasLimit": 49137, "gasUsed": 35071 }, "nonce": 98, "transfers": [ { "contract": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "from": "0x69a1ad2dc946256e8871bc75abc565c41422cef5", "to": "0x000000000022d473030f116ddee9f6b43ac78ba3", "value": "0", "type": "approval", "symbol": "USDC", "name": "USD Coin" } ], "data": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000000000000000000000000000000000000000000000", "symbol": "eth" }

Response Fields

FieldTypeDescription
txidstringTransaction hash
statusnumberTransaction status: 1 success, 2 failed, 0 pending (some chains); on query failure may return { status, errorMsg, txId }
heightnumberBlock height / slot
timenumberBlock timestamp (seconds)
fromstringSender address
tostringRecipient address
valuestring / numberNative token transfer amount
feenumberTransaction fee
feeDataobjectFee breakdown (structure varies by chain)
transfersarrayTransfer / approval records
symbolstringNative token symbol (EVM chains)
noncenumberTransaction nonce (EVM chains)
datastringInput data (EVM chains)
Last updated on