-
Notifications
You must be signed in to change notification settings - Fork 9
Add basic binance based loans as a new strategy #277
Description
Here's a draft for creating a GitHub issue requesting support for integrating Binance lending as a strategy in Mr. Market:
Title: Add Support for Binance Lending as a Strategy
Description:
I would like to request a new feature for Mr. Market: support for Binance Lending as a trading/investment strategy. This feature would enable users to automatically lend their assets through Binance's Flexible Savings, Locked Savings, or other lending products to earn passive income.
Feature Details:
-
Objective:
- Automate the process of lending assets on Binance to generate interest.
- Allow users to configure their preferred lending options, such as asset type, lending amount, and product type (e.g., Flexible Savings or Locked Savings).
- Handle deposits and track amounts deposited by the user from an external wallet.
-
API Integration:
-
Utilize the Binance API endpoints for lending:
/sapi/v1/lending/daily/product/list: To fetch available lending products./sapi/v1/lending/daily/position: To manage Flexible Savings./sapi/v1/lending/project/list: To manage Locked Savings.
-
Use CCXT to handle deposits and save the data to a new table in the database.
-
-
User Input/Configuration:
- Add a configuration option in the strategy file or UI (if applicable) where users can specify:
- The asset they want to lend (e.g., BTC, ETH, USDT).
- The amount to lend.
- Whether to use Flexible Savings or Locked Savings.
- A target interest rate or auto-renew preference (if applicable).
- Add a configuration option in the strategy file or UI (if applicable) where users can specify:
-
Behavior:
- Periodically check for available lending opportunities using Binance's API.
- Lend the specified amount of the selected asset automatically.
- Notify the user of successful lending transactions or issues.
-
Example Workflow:
- User selects BTC and specifies an amount of 0.01 to be lent using Flexible Savings.
- The strategy uses the Binance API to check available products.
- The script subscribes the amount and logs the transaction details.
Technical Requirements:
- Ensure proper handling of Binance API keys and secrets (use environment variables or secure storage).
- Implement robust error handling to manage API errors, rate limits, or asset unavailability.
- Comply with Binance's API documentation and terms of service.
References:
Additional Notes:
This feature would expand Mr. Market's functionality by adding a low-risk, income-generating strategy that complements existing trading strategies. Let me know if you need more details or assistance with testing!
This issue request should provide a clear, actionable framework for the repository maintainers or contributors to implement the feature. It must include docs and tests