Skip to main content
Query a MultiversX account through the Gateway and verify both HTTP status and Gateway response body fields.

Prerequisites

RequirementValue
Base URLhttps://rust-gateway.xoxno.com
AuthNone for public RPC reads and transaction submission
Response shapedata, error, code
Metachain shard ID4294967295

1. Read An Account

curl "https://rust-gateway.xoxno.com/address/erd1..."
Expected shape:
{
  "data": {
    "account": {
      "nonce": 42,
      "balance": "1000000000000000000"
    }
  },
  "error": "",
  "code": "successful"
}

2. Simulate A Transaction

Use /transaction/simulate before sending a transaction through any Gateway-compatible path.
curl -X POST "https://rust-gateway.xoxno.com/transaction/simulate" \
  -H "content-type: application/json" \
  -d '{
    "nonce": 42,
    "value": "0",
    "receiver": "erd1...",
    "sender": "erd1...",
    "gasPrice": 1000000000,
    "gasLimit": 50000,
    "data": "",
    "chainID": "1",
    "version": 2,
    "signature": "<hex-signature>"
  }'
The JSON above is an example payload. Replace placeholders with a transaction signed for the sender nonce.

3. Check Body-Level Errors

Gateway-compatible endpoints can return HTTP 200 while the response body carries an observer error.
function assertGatewaySuccess(body: { error?: string; code?: string }) {
  if (body.error) throw new Error(body.error);
  if (body.code && body.code !== "successful") {
    throw new Error(`gateway code: ${body.code}`);
  }
}

Verify

You have a valid quickstart result when:
  • The account request returns HTTP 200.
  • The response body has error: "".
  • data.account.nonce is present.
  • The simulation response body does not include an observer error.

Common Failure

SymptomCauseFix
HTTP 200 with non-empty errorObserver rejected the operation.Treat the body as failed and show the observer reason.
Account read returns missing dataAddress is invalid or observer cannot serve the request.Validate bech32 address and retry.
Historical query failsThe selected observer lacks the requested history.Use supported historical params or retry without the historical selector.

Next Steps