Get All Markets

Retrieves all market state. Can be done via the engine (off-chain) or from on-chain contracts.

On-chain

See getAllMarkets API reference for more details.

Makes a call to the on-chain Querier contract via the SDK.

Usage

import { createVertexClient } from '@vertex-protocol/client';

const vertexClient = await createVertexClient('testnet', ...);
const res = await vertexClient.market.getAllMarkets(...);

Off-chain

See getAllEngineMarkets API reference for more details.

Makes a call to REST API > Queries > All Products via the SDK.

Usage

import { createVertexClient } from '@vertex-protocol/client';

const vertexClient = await createVertexClient('testnet', ...);
const res = await vertexClient.market.getAllEngineMarkets(...);

Last updated