Gateway
Interactions with Vertex's offchain sequencer
There are two types of actions. An Execute
involves a modification to state, and a Query
merely fetches information from state.
All actions can be sent over websocket as json payloads at WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]
Additionally, you can send executes and queries over HTTP, at POST [GATEWAY_REST_ENDPOINT]/execute
and GET/POST [GATEWAY_REST_ENDPOINT]/query
respectively. For executes, the request should be sent with a json payload, while for queries, the payload should be encoded into url query strings.
HTTP
requests must set the Accept-Encoding
to include gzip
, br
or deflate
Endpoints
Testnet:
Websocket:
wss://gateway.sepolia-test.vertexprotocol.com/v1/ws
REST:
https://gateway.sepolia-test.vertexprotocol.com/v1
Mainnet:
Websocket:
wss://gateway.prod.vertexprotocol.com/v1/ws
REST:
https://gateway.prod.vertexprotocol.com/v1
Websocket
Notes on keeping websocket connections alive:
When interacting with our API via websocket, you must send ping frames every 30 seconds to keep the websocket connection alive.
Ping / Pong frames are built into the websocket protocol and should be supported natively by your websocket library. See Ping/Pong frames for more info.
Last updated