Setting up Restish

Guide for Interacting with Mynth API using RestishCopied!

Introduction

Restish is a command-line tool designed for interacting with RESTful APIs. It provides an intuitive interface for making HTTP requests and formatting responses, making it easier to work with APIs directly from the terminal. Restish simplifies the process of sending requests and handling responses, which is particularly useful for developers and engineers who frequently interact with APIs.

This guide will help you set up and use Restish to interact with the Mynth API. The Mynth API allows you to access various features and functionalities of the Mynth platform programmatically. With Restish, you can perform tasks such as retrieving user accounts, building swaps, sending transactions using babel fees, and more, all through simple command-line commands.

First, you’ll need to install Restish. For Linux systems, you can run the following:

curl -s https://raw.githubusercontent.com/MynthAI/bash/main/install.sh \
  | bash -s -- danielgtaylor/restish linux-amd64

For other systems, you can refer to the official Restish installation instructions.

Verify that Restish works by running:

restish --version

After Restish is installed, you can configure it with Mynth API:

restish api configure mynth https://www.mynth.ai

Select Save and exit. After it’s set up, you’re ready to interact with Mynth! You can test it out by querying for the price of ADA:

restish mynth get-api-prices-ada -rf body.contents.price

This should show you the current market price of ADA/USD.