An open API service indexing awesome lists of open source software.

https://github.com/aelfproject/chatgpt-actions

aelf's ChatGPT actions
https://github.com/aelfproject/chatgpt-actions

Last synced: 30 days ago
JSON representation

aelf's ChatGPT actions

Awesome Lists containing this project

README

          

# Project Summary

In this repo, you'll find the following for aelf Smart Contract Copilot GPT:
- **chatgpt-api/api.py**: A simple Flask program written to retrieve information from external APIs.
- **openapi.yaml**: The OpenAPI specification with details about your API so ChatGPT understands what it does.

# Prerequisites
- Python 3.7+
- [Flask](https://flask.palletsprojects.com/en/3.0.x/installation/)

# Running the application
- Setup environment
```bash
cd chatgpt-api
python3 -m venv .venv
. .venv/bin/activate
```
- Setup environmental variables
```bash
export CMC_API_KEY=
```
- Install the requirements
```bash
pip install -r requirements.txt
```
- Run
```bash
flask --app api run
```

# Endpoints

/get-chains
Get a list of supported chains.

/get-balance
Get the balance of an address in the corresponding chain.

/get-price
Get the price of a cryptocurrency.

/get-transaction-result
Get the result of a transaction in a specific chain.

/get-block-height
Get the current block height in a specific chain.

/block-by-height
Get block information by block height in a specific chain.

/get-transactions-by-address
Get transactions by address in a specific chain. Default value of page is 0.