> ## Documentation Index
> Fetch the complete documentation index at: https://skip-connect.mintlify.site/connect/llms.txt
> Use this file to discover all available pages before exploring further.

> Connect Validator Quickstart

# Quickstart

<Info>
  The following instructions assumes you are running a single validator full node with a remote instance of Connect. If you are not running a full node, you do not need to run Connect.
</Info>

This document will guide you through setting up and running Connect, as well as configuring your node to receive data from Connect.

## Installation

### Using Curl

```bash theme={null}
curl -sSL https://raw.githubusercontent.com/skip-mev/connect/main/scripts/install.sh | sudo bash
```

### From GitHub Releases

Head over to our [GitHub Releases](https://github.com/skip-mev/connect/releases) page and download the binary that matches your machine's architecture.

### From Source

To install from source, you'll need [Git](https://git-scm.com/) and [Go](https://go.dev/).

Enter the commands below to install the binary.

```shell theme={null}
git clone git@github.com:skip-mev/connect.git
cd connect
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
make install
```

## Verify Installation

Let's check Connect is properly installed on your machine.
You should see the version printed in your terminal after running the following command:

```shell theme={null}
connect version
```

## Run Connect Sidecar

<Tabs>
  <Tab title="General">
    This tab provides general instructions for starting the Connect sidecar.
    If you are running one of the chains listed in the tabs above, please refer to those instructions.

    To run Connect, which starts the service on the default port of `8080`, enter the following command:

    ```shell theme={null}
    connect --market-map-endpoint="<YOUR_NODE_GRPC_URL>:<YOUR_NODE_GRPC_PORT>"
    ```
  </Tab>

  <Tab title="dYdX">
    <AccordionGroup>
      <Accordion title="dYdX v7">
        **The required version for Connect with dYdX v7 is `v1.0.13`.**

        First, please ensure you've received your **API keys** for the relevant decentralized provider nodes. If you have not received API keys, please reach out to the provider team in the relevant communication channels.

        Next, place your API keys under their corresponding URLs in the following file and save it to your system. **Keep the file path handy** as we will pass it into a flag when running Connect.

        We will also supply an edited configuration for the `dydx_migration_api` which facilitates graceful migration from dydx's `x/prices` to `x/marketmap`.

        For the `dydx_migration_api` provider, **make sure to fill in the URL for the REST endpoint and gRPC endpoint of your node** (in that order). The migration API will *not* work unless the REST API endpoint is the **first** endpoint in the endpoints list.

        ```json oracle.json theme={null}
        {
            "providers": {
            "dydx_migration_api": {
            "api": {
            "endpoints": [
        {
            "url": "http://<YOUR NODE REST API ENDPOINT>"
        },
        {
            "url": "<YOUR NODE GRPC ENDPOINT>:<YOUR NODE GRPC PORT>"
        }
            ]
        }
        },
            "raydium_api": {
            "api": {
            "endpoints": [
        {
            "url": "https://solana.polkachu.com",
            "authentication": {
            "apiKeyHeader":"x-api-key",
            "apiKey":"API KEY"
        }
        },
        {
            "url": "https://connect-solana.kingnodes.com",
            "authentication": {
            "apiKeyHeader":"x-api-key",
            "apiKey":"API KEY"
        }
        },
        {
            "url": "https://solana.lavenderfive.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://solana-rpc.rhino-apis.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://dydx.helius-rpc.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        }
            ]
        }
        },
            "uniswapv3_api-ethereum": {
            "api": {
            "endpoints": [
        {
            "url": "https://ethereum.lavenderfive.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://ethereum.polkachu.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://connect-eth.kingnodes.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://ethereum-rpc.rhino-apis.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        }
            ]
        }
        },
            "uniswapv3_api-base": {
            "api": {
            "endpoints": [
        {
            "url": "https://base-rpc.rhino-apis.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://connect-base.kingnodes.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://base.lavenderfive.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        },
        {
            "url": "https://base.polkachu.com",
            "authentication": {
            "apiKeyHeader": "x-api-key",
            "apiKey": "API KEY"
        }
        }
            ]
        }
        }
        }
        }
        ```

        With the `oracle.json` file path, enter the following command to run Connect.

        ```shell theme={null}
        connect \
        --marketmap-provider dydx_migration_api \
        --oracle-config path/to/oracle.json
        ```
      </Accordion>

      <Accordion title="dYdX v6">
        **The required version for Connect with dYdX v6 is `v1.0.13`.**

        First, please ensure you've received your **API keys** for the relevant decentralized provider nodes. If you have not received API keys, please reach out to the provider team in the relevant communication channels.

        Next, place your API keys under their corresponding URLs in the following file and save it to your system. **Keep the file path handy** as we will pass it into a flag when running Connect.

        We will also supply an edited configuration for the `dydx_migration_api` which facilitates graceful migration from dydx's `x/prices` to `x/marketmap`.

        For the `dydx_migration_api` provider, **make sure to fill in the URL for the REST endpoint and gRPC endpoint of your node** (in that order). The migration API will *not* work unless the REST API endpoint is the **first** endpoint in the endpoints list.

        ```json oracle.json theme={null}
        {
          "providers": {
            "dydx_migration_api": {
              "api": {
                "endpoints": [
                  {
                    "url": "http://<YOUR NODE REST API ENDPOINT>"
                  },
                  {
                    "url": "<YOUR NODE GRPC ENDPOINT>:<YOUR NODE GRPC PORT>"
                  }
                ]
              }
            },
            "raydium_api": {
              "api": {
                "endpoints": [
                  {
                    "url": "https://solana.polkachu.com",
                    "authentication": {
                      "apiKeyHeader":"x-api-key",
                      "apiKey":"API KEY"
                    }
                  },
                  {
                    "url": "https://connect-solana.kingnodes.com",
                    "authentication": {
                      "apiKeyHeader":"x-api-key",
                      "apiKey":"API KEY"
                    }
                  },
                  {
                    "url": "https://solana.lavenderfive.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://solana-rpc.rhino-apis.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://dydx.helius-rpc.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  }
                ]
              }
            },
            "uniswapv3_api-ethereum": {
              "api": {
                "endpoints": [
                  {
                    "url": "https://ethereum.lavenderfive.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://ethereum.polkachu.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://connect-eth.kingnodes.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://ethereum-rpc.rhino-apis.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  }
                ]
              }
            },
            "uniswapv3_api-base": {
              "api": {
                "endpoints": [
                  {
                    "url": "https://base-rpc.rhino-apis.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://connect-base.kingnodes.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://base.lavenderfive.com",
                    "authentication": {
                      "apiKeyHeader": "x-api-key",
                      "apiKey": "API KEY"
                    }
                  },
                  {
                    "url": "https://base.polkachu.com",
                    "authentication": {
                    "apiKeyHeader": "x-api-key",
                    "apiKey": "API KEY"
                    }
                  }
                ]
              }
            }
          }
        }
        ```

        With the `oracle.json` file path, enter the following command to run Connect.

        ```shell theme={null}
        connect \
        --marketmap-provider dydx_migration_api \
        --oracle-config path/to/oracle.json
        ```
      </Accordion>

      <Accordion title="dYdX v5">
        **The required version for Connect with dYdX v5 is `v1.0.5`.**

        First, please ensure you've received your API keys for Raydium markets. If you have not received API keys, please reach out to the team in the relevant channels.

        Next, place your API keys under their corresponding URLs in the following file and save it to your system. Keep the file path handy as we will pass it into a flag when running Connect.

        ```json oracle.json theme={null}
        {
           "providers": {
              "raydium_api": {
                 "api": {
                    "endpoints": [
                       {
                          "url": "https://solana.polkachu.com",
                          "authentication": {
                             "apiKeyHeader": "x-api-key",
                             "apiKey": "API KEY"
                          }
                       },
                       {
                          "url": "https://connect-solana.kingnodes.com",
                          "authentication": {
                             "apiKeyHeader": "x-api-key",
                             "apiKey": "API KEY"
                          }
                       },
                       {
                          "url": "https://solana.lavenderfive.com",
                          "authentication": {
                             "apiKeyHeader": "x-api-key",
                             "apiKey": "API KEY"
                          }
                       },
                       {
                          "url": "https://solana-rpc.rhino-apis.com",
                          "authentication": {
                             "apiKeyHeader": "x-api-key",
                             "apiKey": "API KEY"
                          }
                       },
                       {
                          "url": "https://dydx.helius-rpc.com",
                          "authentication": {
                             "apiKeyHeader": "x-api-key",
                             "apiKey": "API KEY"
                          }
                       }
                    ]
                 }
              }
           }
        }
        ```

        With your dYdX node's REST API endpoint and the `oracle.json` file path, enter the following command to run Connect.

        ```shell theme={null}
        connect \
            --marketmap-provider dydx_api \
            --market-map-endpoint https://<dydx-node REST API endpoint> \
            --oracle-config path/to/oracle.json
        ```
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Neutron">
    **The required Connect version for the Neutron chain is `v1.0.12`.**

    To run Connect, which starts the service on the default port of `8080`, enter the following command:

    ```shell theme={null}
    connect --market-map-endpoint="<YOUR_NODE_GRPC_URL>:<YOUR_NODE_GRPC_PORT>"
    ```
  </Tab>

  <Tab title="Stargaze">
    **The required version for Connect with Stargaze is `v1.0.12`.**

    You need to configure a custom API endpoint for use with the Osmosis provider, `https://rest.osmosis-1.interchain-apis.com`.
    Set the following `oracle.json` configuration file. **Keep the file path handy** as we will pass it into a flag when running Connect.

    ```json oracle.json theme={null}
    {
      "providers": {
        "osmosis_api": {
          "api": {
            "endpoints": [
              {"url": "https://rest.osmosis-1.interchain-apis.com"}
            ]
          }
        }
      }
    }
    ```

    With the `oracle.json` file path, enter the following command to run Connect.

    ```shell theme={null}
    connect \
    --market-map-endpoint="<YOUR_NODE_GRPC_URL>:<YOUR_NODE_GRPC_PORT>" \
    --oracle-config path/to/oracle.json
    ```
  </Tab>

  <Tab title="Warden">
    **The required Connect version for the Warden chain is `v1.0.12`.**

    To run Connect, which starts the service on the default port of `8080`, enter the following command:

    ```shell theme={null}
    connect --market-map-endpoint="<YOUR_NODE_GRPC_URL>:<YOUR_NODE_GRPC_PORT>"
    ```
  </Tab>

  <Tab title="Initia">
    **The required Connect version for the Initia chain is `v1.0.12`.**

    To run Connect, which starts the service on the default port of `8080`, enter the following command:

    ```shell theme={null}
    connect --market-map-endpoint="<YOUR_NODE_GRPC_URL>:<YOUR_NODE_GRPC_PORT>"
    ```
  </Tab>
</Tabs>

### Verify Connect

To verify Connect is working, run the following command:

```shell theme={null}
curl 'http://localhost:8080/connect/oracle/v2/prices' | jq .
```

The output of the command should look similar to this:

```json theme={null}
{
  "prices": {
    "ATOM/USD": "920650000",
    "BITCOIN/USD": "3980283250000",
    "DYDX/USD": "273682500",
    "ETHEREUM/BITCOIN": "5842000",
    "ETHEREUM/USD": "232550500000",
    "POLKADOT/USD": "638800000",
    "SOLANA/USD": "8430350000"
  },
  "timestamp": "2024-01-23T01:15:09.776890Z"
}

```

## Run Application Node

In order for the application to get prices from Connect, we need to add the following lines under the `[oracle]` heading in the `app.toml`.

Remember to change the `oracle_address` value to the address of your Connect sidecar.

```toml app.toml theme={null}
# ... other sections

[oracle]
enabled = "true" # if you are not running a full node, set this to "false"
oracle_address = "<YOUR_CONNECT_SIDECAR>:8080"
client_timeout = "250ms"
metrics_enabled = "true"
interval = "1500ms"
price_ttl = "10s"
```

Once your `app.toml` is configured, you may start your node as normal.

## Additional Steps

Using a remote signer? Have a distributed validator setup? Check out the [advanced setups](advanced-setups) to learn how to properly configure your validator infrastructure.
