---
title: "Sui JSON-RPC API Quick Start Guide"
description: "Welcome to bex.co, the proud provider of the Sui JSON-RPC API equipped with indexer data. We are dedicated to delivering a robust, intuitive, and efficient…"
sidebar_position: 3
last_updated: 2026-08-21
---

# Quick Start Guide for Sui JSON-RPC API

Welcome to bex.co, the proud provider of the [Sui](https://sui.io/) JSON-RPC API equipped with indexer data. We are dedicated to delivering a robust, intuitive, and efficient interface for your Sui node.

* **Standardized Interface**: We furnish a standard interface supporting Sui JSON-RPC API through HTTPS for seamless data interaction.
* **Reliability Assured**: Our system consistently runs on the most recent network upgrades, guaranteeing a minimum of 99.9% uptime to maintain uninterrupted service.
* **Immediate Availability**: Experience instant connectivity with our straightforward single-line-of-code integration. We've eliminated the need for complicated setups and syncing.
* **Comprehensive Delegation**: Enjoy the freedom from DevOps work for maintaining a Sui node, as we provide a fully delegated solution.

## How to Create a bex.co Access Key

**Step 1**: Visit https://bex.co/dash/. If you're new to our platform, please complete the sign-up process.

**Step 2**: Specify a unique name for your API key, and click on '+ Create key'.

**Step 3**: After creation, click on the provided access key to copy it to your clipboard for future referencing.

**Step 4**: Incorporate the copied access key into your project as demonstrated below. Ensure you replace `<access_key>` with your personal access key.

### bex.co Sui Endpoints

| Network | HTTPS Endpoint | WebSocket Endpoint |
|---------|----------------|-------------------|
| Mainnet | `https://api.bex.co/sui/<access_key>` | `wss://api.bex.co/sui/<access_key>` |
| Testnet | `https://api.bex.co/sui/testnet/<access_key>` | `wss://api.bex.co/sui/testnet/<access_key>` |

<!-- Devnet endpoints are no longer supported. -->

For WebSocket usage, please refer to the latest Sui WebSocket guide in our documentation.

**Connection to Sui using `CURL`:**

```bash
# Sui JSON-RPC discovery request
curl -X POST https://api.bex.co/sui/<access_key> \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"rpc.discover","id":1}'
```

**Connection to Sui using TypeScript SDK:**

```typescript
const { SuiClient } = require("@mysten/sui/client");

(async () => {
  const providerUrl = "https://api.bex.co/sui/<access_key>";
  const client = new SuiClient({ url: providerUrl });
  const totalTxBlocks = await client.getTotalTransactionBlocks();
  console.log(`successfully called ${providerUrl} to getTotalTransactionBlocks. result: ${totalTxBlocks}`);
})();
```

By following these instructions, you will be equipped to effectively leverage our Sui RPC API for your development needs. Happy coding!
