Info Methods
Info methods return metadata — supported blockchains, providers, and service health.getChains
Returns a list of all blockchains supported by Rubic.| Parameter | Type | Default | Description |
|---|---|---|---|
includeTestnets | boolean | false | Include testnet blockchains in the response |
Example
ChainInterface
| Field | Type | Description |
|---|---|---|
name | BlockchainName | Blockchain identifier used in all SDK requests |
type | string | Chain type: 'evm', 'solana', 'tron', 'ton', 'bitcoin', etc. |
id | number | null | Chain ID (EVM only; null for non-EVM chains) |
proxyAvailable | boolean | Whether fee collection via Rubic proxy contracts is available |
testnet | boolean | Whether this is a testnet |
Example — get EVM chains only
Example — with testnets
getProviders
Returns all available swap providers grouped by type.| Parameter | Type | Default | Description |
|---|---|---|---|
includeTestnets | boolean | false | Include providers that only support testnets |
Example
ProvidersInterface
| Field | Type | Description |
|---|---|---|
crossChain | CrossChainProviderInterface[] | Bridge and aggregator providers |
onChain | OnChainProviderInterface[] | DEX providers |
| Field | Type | Description |
|---|---|---|
name | string | Provider identifier (e.g. 'across', 'uniswap-v3') |
chains | ProviderChainInterface[] | Blockchains this provider supports |
Example — check if a provider supports a chain pair
healthcheck
Checks whether the Rubic API is up and responsive.'I am alive' when the service is healthy.