Aller au contenu
GET /v1/view

Call any Move view function (read-only, like eth_call)

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/aptosview-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/aptosview-api/v1/view" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/aptosview-api/v1/view", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/aptosview-api/v1/view");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/aptosview-api/v1/view",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "Return value(s) of the Move #[view] function, executed read-only against current chain state (no transaction). Numeric arguments are passed as strings, as the Aptos API expects.",
        "result": [
            1
        ],
        "source": "Aptos fullnode REST /view",
        "function": "0x1::chain_id::get",
        "arguments": [],
        "type_arguments": []
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:05.884Z",
        "request_id": "4ad462d8-b8ab-4025-b46b-e36da52b7546"
    },
    "status": "ok",
    "message": "View call executed successfully",
    "success": true
}