APIs Overview

SDKs

There are a few ways to interact with the Demex L1 chain. The simplest way would be to use one of the official SDKs here:

  1. The Demex Client which wraps node RPCs in a way that abstracts blockchain concepts and allow you to get started trading as quickly as possible (recommended).

  2. The Typescript SDK which contains lower level trading and statistic APIs for the chain.

APIs

Alternatively, there are APIs accessible for direct interaction with nodes, offering improved control and reliability.

Here are the APIs available:

  • WebSocket API: This API streams formatted data on the state of all modules, rather than exposing the raw state of the blockchain. However, transactions cannot be sent through this API. This API is ideal for applications such as trading bots, explorers, etc.

  • RPC API: This API enables the sending of transactions, and provides queries for

    • Custom (Demex) module states

    • Standard (Cosmos-SDK) module states

    • Additional off-chain data stored by API nodes running the off-chain indexing module.

    For applications that do not support gRPC, a gRPC-gateway is available, allowing the same GRPC endpoints to be accessed via REST.

  • Command Line Interface: You may also use the CLI that comes with the Demex node binary to query the blockchain or send transactions.

  • Insights API: This is a off-chain API service that is used by Demex which aggregates time-series data and statistical information.

If you are developing an extensive application or serving a large user base, it is advisable to run your own Testnet or Mainnet node for better reliability and scalability as the public nodes listed here (and in the client SDKs) have no guarantees in terms of performance or uptime.

Last updated

Was this helpful?