Quick Recommendation: Public Endpoint or Dedicated Node?
Before diving into the technical details, decide which Composable RPC setup fits your stage:
- Prototyping or light testing: Use the public Composable Finance RPC endpoint. It is fine for lightweight checks, prototypes, and quick integration tests.
- Production dApp or backend: Move to authenticated endpoints or a dedicated node when you need clearer limits, analytics, and operational visibility.
- High-throughput or custom needs: A dedicated Composable Finance node gives you isolated resources, custom configuration, and predictable capacity.
If you are unsure, start with the public endpoint, measure your traffic, and then scale to authenticated or dedicated infrastructure as your usage grows. OnFinality offers both paths, so you can migrate without changing your application code.
What Is Composable Finance?
Composable Finance is a cross-chain DeFi infrastructure project focused on improving the accessibility, efficiency, and security of the blockchain industry. Its technology stack enables trustless interoperability across ecosystems such as Ethereum, Polkadot, Kusama, Cosmos, and NEAR, powered by the first cross-ecosystem implementation of IBC (Inter-Blockchain Communication).
For developers, this means Composable is not just a single chain but a network of connected chains. When you interact with Composable, you are typically querying its relay chain or one of its connected parachains. The RPC endpoints you use must reflect the specific chain you are targeting.
Composable RPC Endpoints
OnFinality provides public RPC endpoints for Composable Finance that you can use to connect wallets, dApps, dashboards, bots, and backend services without operating your own node from day one.
Public Endpoint Testing
Start with the public Composable Finance RPC endpoint for lightweight checks, prototypes, and quick integration tests. The public endpoint is rate-limited and shared, so it is not suitable for production workloads.
Authenticated API Access
Move production traffic to authenticated endpoints when you need clearer limits, analytics, and operational visibility. Authenticated endpoints are available through OnFinality's API service and provide a more stable foundation for production apps.
Standard RPC Methods
Composable Finance supports standard JSON-RPC methods for querying blocks, transactions, balances, events, and chain state. You can use HTTP and WebSocket transports, depending on your needs.
Connecting to Composable RPC
Here is a basic example of how to make a JSON-RPC call to a Composable RPC endpoint using curl:
curl -H "Content-Type: application/json" \
-d '{"id":1, "jsonrpc":"2.0", "method":"system_health", "params":[]}' \
https://composable.api.onfinality.io/public
Replace the URL with the actual public endpoint from the Composable network page if it differs. For production, use your authenticated endpoint URL.
For WebSocket subscriptions, you can use libraries like wscat or ethers.js to listen to new blocks or events.
When to Use Dedicated Composable Nodes
Production teams need more than an endpoint URL. They need observability, predictable capacity, and a path from shared RPC access to isolated infrastructure.
Request Visibility
Track usage patterns and response activity so your team can understand traffic growth before it becomes an incident. OnFinality provides analytics for authenticated endpoints, and dedicated nodes give you full visibility into your requests.
Dedicated Node Path
Use dedicated Composable Finance nodes when your workload needs isolated resources, custom configuration, and operational control. Dedicated nodes are ideal for high-throughput applications, indexers, and services that require consistent performance.
Archive and Historical Data
If your application needs historical state, consider an archive node. Archive nodes store the full history of the chain, enabling queries like eth_getLogs over long ranges. OnFinality offers archive support for many networks, including Composable.
Composable RPC vs. Other Networks
Composable Finance is unique because it bridges multiple ecosystems. When you work with Composable, you might need to interact with different chains that use different RPC standards. For example, Ethereum-based chains use eth_* methods, while Substrate-based chains use system_* and state_* methods.
Here is a quick comparison of typical RPC methods across the ecosystems Composable touches:
| Ecosystem | Common RPC Methods | Transport |
|---|---|---|
| Ethereum |
eth_blockNumber, eth_getBalance, eth_call
|
HTTP, WebSocket |
| Polkadot |
chain_getBlock, system_health, state_getStorage
|
HTTP, WebSocket |
| Cosmos |
cosmos_tx, abci_query
|
HTTP, gRPC |
| NEAR |
near_block, query
|
HTTP |
When integrating with Composable, ensure your client library matches the chain you are querying.
Integration Examples
Using ethers.js with Composable (Ethereum-compatible)
If you are interacting with an Ethereum-compatible chain within the Composable ecosystem, you can use ethers.js:
const { ethers } = require("ethers");
const provider = new ethers.JsonRpcProvider("https://composable.api.onfinality.io/public");
async function getBlockNumber() {
const blockNumber = await provider.getBlockNumber();
console.log("Current block number:", blockNumber);
}
getBlockNumber();
Using Polkadot.js with Composable (Substrate-based)
For Substrate-based chains, use @polkadot/api:
const { ApiPromise, WsProvider } = require("@polkadot/api");
const wsProvider = new WsProvider("wss://composable.api.onfinality.io/public-ws");
async function main() {
const api = await ApiPromise.create({ provider: wsProvider });
const health = await api.rpc.system.health();
console.log("Health:", health.toHuman());
await api.disconnect();
}
main();
Note: The WebSocket URL is an example; use the actual endpoint from the Composable network page.
Common Pitfalls and Troubleshooting
1. Wrong RPC Method for the Chain
Using eth_* methods on a Substrate chain will fail. Always check the chain type and use the appropriate JSON-RPC namespace.
2. Rate Limiting on Public Endpoints
Public endpoints are shared and rate-limited. If you see 429 Too Many Requests, switch to an authenticated endpoint or a dedicated node.
3. WebSocket Connection Drops
WebSocket connections can drop due to network issues or server restarts. Implement reconnection logic in your client.
4. Historical Data Gaps
If you need historical data, ensure you are using an archive node. Regular nodes may not have full history.
Choosing the Right Composable RPC Setup
Here is a decision matrix to help you choose:
| Workload | Recommended Setup | Why |
|---|---|---|
| Prototype / hackathon | Public endpoint | Free, quick to start |
| Production dApp | Authenticated endpoint | Better limits, analytics |
| High-throughput / indexing | Dedicated node | Isolated resources, custom config |
| Historical queries | Archive node | Full chain history |
OnFinality offers all these options, so you can start small and scale as needed. For pricing details, see RPC pricing.
Key Takeaways
- Composable Finance is a cross-chain DeFi project, and its RPC endpoints vary by the underlying chain.
- Start with the public endpoint for testing, but move to authenticated or dedicated nodes for production.
- Use the correct JSON-RPC methods for the chain you are querying (Ethereum vs. Substrate).
- Dedicated nodes provide isolation, observability, and custom configuration for demanding workloads.
- OnFinality supports Composable Finance with public, authenticated, and dedicated node options.
Frequently Asked Questions
What is Composable RPC?
Composable RPC refers to the Remote Procedure Call endpoints used to interact with the Composable Finance network. These endpoints allow developers to query chain data, submit transactions, and subscribe to events.
How do I get a Composable RPC endpoint?
You can use the public endpoint from OnFinality's Composable network page for testing, or sign up for an API key to get authenticated endpoints.
Is the public Composable RPC endpoint free?
Yes, the public endpoint is free to use for testing and light usage. For production, consider authenticated endpoints or dedicated nodes.
What is the difference between public and dedicated nodes?
Public nodes are shared and rate-limited, while dedicated nodes provide isolated resources, custom configuration, and better performance for production workloads.
Does OnFinality support archive nodes for Composable?
OnFinality offers archive node support for many networks. Check the supported networks page for the latest availability.
How do I choose between HTTP and WebSocket?
Use HTTP for simple queries and WebSocket for real-time subscriptions, such as new block notifications or event listening.
Can I use Composable RPC for Ethereum-based chains?
Yes, if the chain is Ethereum-compatible, you can use standard eth_* methods. For Substrate-based chains, use the appropriate Substrate methods.
What should I do if I get rate-limited?
If you hit rate limits on the public endpoint, upgrade to an authenticated endpoint or a dedicated node to get higher limits and better performance.
For more guidance on selecting an RPC provider, see our How to Choose an RPC Provider guide.
Related resources
- Composable Finance Network Page
- How to Choose an RPC Provider
- Dedicated Nodes
- RPC Pricing
- Supported Networks
Originally published at OnFinality.
Top comments (0)