geniusyield / strategy-executor

Trading Strategy Executor Framework for the Genius Yield DEX.
https://www.geniusyield.co/
Apache License 2.0
5 stars 2 forks source link

Hummingbot & Third party integrations #45

Open 4TT1L4 opened 1 month ago

4TT1L4 commented 1 month ago

TODO:

We don't necessary need to use Hummingbot, but we should have a look what tools might be available and which ones are easy to integrate.

DOCS:

HalukG commented 1 month ago

Requirements for hummingbot spot connector:

# Hummingbot Spot Connector Integration Report

## Required Endpoints

### Public REST Endpoints

- **GET ACTIVE MARKETS**: Endpoint to get the list of active trading pairs (tokens info).
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/markets`

- **GET ORDERBOOK SNAPSHOT**: Endpoint to get the order book snapshot.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/order-books/{market-id}`

- **PING ENDPOINT**: Endpoint returning a low amount of information, serving as a ping endpoint.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/settings`

### Private REST Endpoints

- **GET ACCOUNT BALANCE**: Endpoint to get the current account balance.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/balances/{address}`

- **GET OPEN ORDERS**: Endpoint to get active orders.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/order-books/{market-id}`

- **CREATE ORDERS**: Endpoint to create new orders.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/orders` (POST)

- **CANCEL ORDER BY exchange_order_id**: Endpoint to cancel an order by its exchange-generated order ID.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/orders` (DELETE)

### Authentication

- **AUTHENTICATION**: Class that provides the logic for the web assistant to correctly configure authenticated requests to the exchange (private endpoints). It should be a subclass of `AuthBase`.
 - **Implementation Status**: Implemented
 - **Example**: `GeniusYieldAuth`

### Rate Limits

- **Rate Limits**: Documentation of the rate limits applied for each endpoint and global limits for each IP/connection.
 - **Implementation Status**: Implemented

## Optional Endpoints

### Public REST Endpoints

- **\[TR\] MINIMUM NOTIONAL SIZE**: Endpoint to get trading rules, including minimum notional size.
 - **Implementation Status**: Not implemented

- **\[TR\] MINIMUM ORDER SIZE**: Endpoint to get trading rules, including minimum order size.
 - **Implementation Status**: Not implemented

- **\[TR\] MINIMUM PRICE**: Endpoint to get trading rules, including minimum price.
 - **Implementation Status**: Not implemented

- **\[TR\] ORDER INCREMENT**: Endpoint to get trading rules, including order increment.
 - **Implementation Status**: Not implemented

- **SERVER TIME**: Endpoint to get the server time.
 - **Implementation Status**: Implemented
 - **Endpoint**: `/v0/settings`

### Private REST Endpoints

- **GET ORDER STATUS BY client order id**: Endpoint to get the order status by the client-provided order ID.
 - **Implementation Status**: Not implemented

- **GET ORDER STATUS BY exchange_order_id**: Endpoint to get the order status by the exchange-generated order ID.
 - **Implementation Status**: Not implemented

- **GET TRADES HISTORY BY ORDER ID**: Endpoint to get the trades history for a specific order.
 - **Implementation Status**: Not implemented

- **GET TRADES HISTORY BY TIMESTAMPS**: Endpoint to get the trades history for a given time range.
 - **Implementation Status**: Not implemented

- **CREATE ORDERS with client_order_id**: Endpoint to create new orders with a client-provided order ID.
 - **Implementation Status**: Not implemented

- **CANCEL ORDER BY client order id**: Endpoint to cancel an order by the client-provided order ID.
 - **Implementation Status**: Not implemented
HalukG commented 1 month ago

Hummingbot Spot Connector Integration Report

This report compares our internal BOT API schema with the Hummingbot required API endpoints.

Required Endpoints

Public REST Endpoints

  1. GET ACTIVE MARKETS Hummingbot Endpoint: /v0/markets
    • Bot API: /v0/markets
    • Description: Returns the list of markets information supported by GeniusYield DEX.

Comparison:

  1. GET ORDERBOOK SNAPSHOT Hummingbot Endpoint: /v0/order-books/{market-id}
    • Bot API: /v0/order-books/{market-id}
    • Description: Get order book for a specific market.

Comparison:

  1. PING ENDPOINT Hummingbot Endpoint: /v0/settings
    • Bot API: /v0/settings
    • Description: Get server settings such as network, version, and revision.

Comparison:

Private REST Endpoints

  1. GET ACCOUNT BALANCE Hummingbot Endpoint: /v0/balances/{address}}
    • Bot API: /v0/balances/{address}
    • Description: Get token balances of an address.

Comparison:

  1. GET OPEN ORDERS Hummingbot Endpoint: /v0/order-books/{market-id}
    • Bot API: /v0/order-books/{market-id}
    • Description: Get open orders for a specific market.

Comparison:

  1. CREATE ORDERS Hummingbot Endpoint: /v0/orders (POST)
    • Bot API: /v0/orders (POST)
    • Description: Create an order.

Comparison:

  1. CANCEL ORDER BY EXCHANGE ORDER ID Hummingbot Endpoint: /v0/orders (DELETE)
    • Bot API: /v0/orders (DELETE)
    • Description: Cancel order(s).

Comparison:

Summary

Based on this comparison, current Bot API schema can be used to build the Hummingbot Spot connector with minor adjustments for field mappings