Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/api-guides/_meta.en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"api-overview": "Overview",
"orders": "Orders",
"subgraphs": "Subgraphs",
"rubi-py": "Python SDK"
Expand Down
1 change: 1 addition & 0 deletions pages/api-guides/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"api-overview": "Overview",
"orders": "Orders",
"subgraphs": "Subgraphs",
"rubi-py": "Python SDK"
Expand Down
36 changes: 36 additions & 0 deletions pages/api-guides/api-overview.en.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Overview
pageTitle: API Overview
description: Overview of Rubicon APIs/SDKs
---

import { Callout } from "/components/Callout";

# Rubicon APIs

Rubicon provides various APIs for accessing protocol data. Rather than manually engaging with [Rubicon smart contracts](/protocol/deployments) for chain state info, these APIs allow for easy querying of current and past data, bypassing standard blockchain data retrieval hurdles. Powered by [The Graph](https://thegraph.com/), additional details on these APIs can be found in our [Subgraphs](/api-guides/subgraphs/subgraphs) section.

## Hosted API

Rubicon offers a free hosted API for protocol data. This API, supplemented by [The Graph's Hosted Service](https://thegraph.com/hosted-service) as a backup, aims to deliver the latest protocol information. In the near future, Rubicon will transition its API to the [decentralized network](https://thegraph.com/explorer) for enhanced reliability and performance.

### Deployments
<Callout type="warning" emoji="⚠️">
Each network has its own API endpoint. Be sure to use the correct endpoint for the network you are querying.
</Callout>


| Network | Explorer Page | GraphQL Endpoint |
|-------------------|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| `Optimism` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-optimism-mainnet) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Optimism_Mainnet_Dev |
| `Arbitrum One` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-arbitrum-one) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Arbitrum_One |
| `Optimism Goerli` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-optimism-goerli) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Optimism_Goerli |
| `Arbitrum Goerli` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-arbitrum-goerli) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Arbitrum_Goerli |

## 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](https://github.com/RubiconDeFi/rubi-py).

- [SDK Docs](https://rubi.readthedocs.io/en/latest/)
- [Python SDK Package](https://pypi.org/project/rubi/)
- [Python SDK Github Repo](https://github.com/RubiconDeFi/rubi-py)
36 changes: 36 additions & 0 deletions pages/api-guides/api-overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Overview
pageTitle: API Overview
description: Overview of Rubicon APIs/SDKs
---

import { Callout } from "/components/Callout";

# Rubicon APIs

Rubicon provides various APIs for accessing protocol data. Rather than manually engaging with [Rubicon smart contracts](/protocol/deployments) for chain state info, these APIs allow for easy querying of current and past data, bypassing standard blockchain data retrieval hurdles. Powered by [The Graph](https://thegraph.com/), additional details on these APIs can be found in our [Subgraphs](/api-guides/subgraphs/subgraphs) section.

## Hosted API

Rubicon offers a free hosted API for protocol data. This API, supplemented by The Graph's Hosted Service as a backup, aims to deliver the latest protocol information. In the near future, Rubicon will transition its API to the decentralized network for enhanced reliability and performance.

### Deployments
<Callout type="warning" emoji="⚠️">
Each network has its own API endpoint. Be sure to use the correct endpoint for the network you are querying.
</Callout>


| Network | Explorer Page | GraphQL Endpoint |
|-------------------|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| `Optimism` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-optimism-mainnet) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Optimism_Mainnet_Dev |
| `Arbitrum One` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-arbitrum-one) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Arbitrum_One |
| `Optimism Goerli` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-optimism-goerli) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Optimism_Goerli |
| `Arbitrum Goerli` | [Link](https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconv2-arbitrum-goerli) | https://api.rubicon.finance/subgraphs/name/RubiconV2_Arbitrum_Goerli |

## 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](https://github.com/RubiconDeFi/rubi-py).

- [SDK Docs](https://rubi.readthedocs.io/en/latest/)
- [Python SDK Package](https://pypi.org/project/rubi/)
- [Python SDK Github Repo](https://github.com/RubiconDeFi/rubi-py)