Prerequisites
- Node.js 18+ or Python 3.8+
- Chainworks API credentials (API URL and Auth Token)
- Basic understanding of either Socket.IO or HTTP requests
Choosing a Transport
The Chainworks API exposes the same operations over two transports:- Socket.IO keeps a persistent, bidirectional connection with low latency and real-time push (for example live price updates). Pick this for streaming or high-frequency trading.
- HTTP is stateless request and response. Pick this for simple integrations or when you cannot hold an open connection.
Installation
The Socket.IO transport needs a client library. The HTTP transport works with any HTTP client (the built-infetch in JavaScript, or requests in Python), so it needs no SDK.
- Socket.IO
- HTTP
Connecting to the API
- Socket.IO
- HTTP
Socket.IO opens a persistent connection and authenticates once during the handshake.
Your First Request
Let’s get a buy quote for a token on Ethereum:- Socket.IO
- HTTP
Response Format
Both transports return the same response shape:Success Response
Error Response
Next Steps
- Authentication - Learn about token authentication
- EVM Endpoints - Explore Ethereum, Base, and BSC endpoints
- SVM Endpoints - Explore Solana endpoints
- Playground - Test the API interactively

