A Step-by-Step Guide to Setting up an Ocean API

Mar 13, 2023

Over the past few weeks, DeFiChain Ocean nodes have encountered occasional service disruptions. The community's developers are actively working to address this issue. Meanwhile, community members can either (1) use a custom Ocean API hosted by other members or (2) create their own Ocean API.

This article will provide a step-by-step guide on how to set up your own Ocean API.

How to Set Up Ocean API?

Step 1: Download the following yaml file and add it to your project directory: https://github.com/JellyfishSDK/jellyfish/blob/main/apps/whale-api/docker-compose.yml

Step 2: Make the following edits to the yaml file:


Step 3: Run the whale API yaml file in the CLI.

When you run the above yaml, the following happens:

  • A DeFiChain node will be set up for you (let it sync with the Mainnet for a few hours first so that it can obtain a copy of DeFiChain)
  • The Whale indexer will be set up, and it will query DeFiChain via the DeFiChain node to obtain the state of the chain. It will then update its internal database
  • With this, you will then be able to make queries directly to your very own Ocean endpoints

DeFiChain

Decentralized finance enabled on Bitcoin. A blockchain dedicated to fast, intelligent and transparent financial services, accessible by everyone.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.