API
Overview

Rubicon APIs

Rubicon has several APIs for retrieving data regarding the protocol. While you can always interact directly with the Rubicon smart contracts to get data regarding current chain state, the APIs provide a convenient way to query both current and historical data from the protocol, solving the problems typically associated with blockchain data retrieval. The APIs are powered by The Graph (opens in a new tab), and you can learn more about them in our Subgraphs section.

Hosted API

Rubicon provides a hosted API for retrieving data regarding the protocol. This API is free of charge to all user's, and aims to provide the most up-to-date information regarding the protocol. In addition to Rubicon's hosted API, users can also access data through The Graph's Hosted Service (opens in a new tab), which serves as a backup to Rubicon's own hosted hardware. Soon, Rubicon will migrate its API to the decentralized network (opens in a new tab), where users can expect even greater reliability and performance.

Deployments

Each network has its own API endpoint. Be sure to use the correct endpoint for the network you are querying.

NetworkExplorer PageGraphQL Endpoint
OptimismLink (opens in a new tab)https://api.rubicon.finance/subgraphs/name/RubiconV2_Optimism_Mainnet_Dev (opens in a new tab)
Arbitrum OneLink (opens in a new tab)https://api.rubicon.finance/subgraphs/name/RubiconV2_Arbitrum_One (opens in a new tab)
Optimism GoerliLink (opens in a new tab)https://api.rubicon.finance/subgraphs/name/RubiconV2_Optimism_Goerli (opens in a new tab)
Arbitrum GoerliLink (opens in a new tab)https://api.rubicon.finance/subgraphs/name/RubiconV2_Arbitrum_Goerli (opens in a new tab)

Python SDK

A Python library for interacting with Rubicon. Contains a growing list of utility functions for retrieving and formatting data from the Rubicon API. The SDK is open source and available on Github (opens in a new tab).