How to connect to GraphQL API
HTTPS
Without secret
curl --location --request POST 'https://mainnet.evercloud.dev/your-project-id/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query($address: String!){\n blockchain{\n account(address:$address){\n info{\n balance(format:DEC)\n }\n }\n }\n}","variables":{"address":"0:e17ac4e77f46626579c7c4fefe35286117384c5ccfc8745c9780cdf056c378bf"}}'
With secret
curl --location --request POST 'https://mainnet.evercloud.dev/your-project-id/graphql' \
--header 'Authorization: Basic project_secret_in_base64' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query{\n blockchain{\n blocks(workchain:-1, last:1){\n edges{\n node{\n hash\n seq_no\n }\n }\n }\n }\n}","variables":{}}'
WSS
Without secret
wscat -c wss://mainnet.evercloud.dev/your-project-id/graphql -s graphql-ws
{"id":"1","type":"start","payload":{"variables":{},"extensions":{},"operationName":null,"query":"subscription{\n blocks(filter:{\n workchain_id:{\n eq:-1\n }\n }){\n seq_no\n id\n }\n}"}}
Client libraries
Last updated
Was this helpful?