Get All Markets
Retrieves all market state. Can be done via the engine (off-chain) or from on-chain contracts.
On-chain
Makes a call to the on-chain Querier contract via the SDK.
Usage
import { createVertexClient } from '@vertex-protocol/client';
const vertexClient = await createVertexClient('arbitrumTestnet', ...);
const res = await vertexClient.market.getAllMarkets(...);
Off-chain
Makes a call to REST API > Queries > All Products via the SDK.
Usage
import { createVertexClient } from '@vertex-protocol/client';
const vertexClient = await createVertexClient('arbitrumTestnet', ...);
const res = await vertexClient.market.getAllEngineMarkets(...);
Last updated