API Copilot is a powerful AI tool designed to simplify your interaction with Delta Exchange's trading APIs. It is specifically trained on Delta Exchange documentation for creating standalone trading strategies using API keys and webhook integrations via TradingView's Pinescript. It is essential to clearly specify in your prompts whether you want to trade via an API key (standalone strategies) or via webhook messages (TradingView alerts). Also, explicitly mention the programming language in which you expect the generated code.
Understanding API Copilot Rate Limits
API Copilot has a rate limit of 5 chats per day, each containing up to 5 messages, totaling 25 prompts per user per day. These limits reset every 24 hours. To get the most value from each prompt, you should prompt judiciously, thoughtfully, and with precision.
Crafting Effective Prompts
Just as you would provide detailed instructions when hiring a coder to develop your trading strategy, your prompts to API Copilot should be clear, detailed, and structured. The more precise your query, the better the AI-generated output will be.
How to Prompt Clearly:
Be Specific: Clearly state what you're trying to achieve.
Provide Context: Include relevant details such as asset type, specific API methods, or error messages.
Request Explicit Outcomes: Specify exactly what kind of response you want, whether code snippets, explanations, or step-by-step guidance.
Specify Integration Method: Explicitly mention if your query involves trading via an API key or webhook (TradingView alerts).
State Programming Language: Clearly state the programming language for code generation (e.g., Python).
Request Specificity: Clearly ask API Copilot to keep the answers focused solely on your exact query to avoid unnecessary details.
Example Prompts to Copy-Paste and Adapt
Here are structured examples you can copy, paste, and customize by adding your specific details:
1. Automated Code Generation:
Integration Method: API key
Programming Language: Python
Strategy: BTC futures trading bot
Trigger Condition: Place a limit order when BTC price moves 3% below the 24-hour average
Additional Instructions: Provide clearly commented, concise code. Keep your answer specific to this request.
2. Code Debugging:
Integration Method: API key
Programming Language: Python
Issue: Invalid signature error in market order code for BTC/USD
Request: Identify exact error location, provide corrected code, and briefly explain the fix. Keep your answer specific.
3. Error Troubleshooting:
Integration Method: API key
Error Message: "API key invalid despite correct signature and IP whitelist."
Request: Provide step-by-step troubleshooting and solution only. Be concise and specific.
4. API Documentation Queries:
Integration Method: API key
API Functionality: ETH options order placement
Request: Clearly documented API request and response examples with required parameters. Answer specifically to this requirement.
5. Step-by-Step Guidance:
Integration Method: Webhook (TradingView alerts)
Programming Language: Pinescript
Strategy Setup: Custom RSI trading strategy
Request: Detailed, step-by-step instructions for accurate webhook setup. Answer specifically to the given scenario.
Enhancing Prompt Effectiveness
To significantly enhance your prompts, consider using these detailed specifications as templates:
Detailed Prompt Templates:
Strategy Description:
Integration Method: API key
Programming Language: Python
Strategy: Automate BTC long position when 1-hour RSI crosses above 30 and exit when RSI crosses below 70.
Request: Generate precise and specific code snippet with clear comments.
Technical Specifications:
Integration Method: API key
Programming Language: Python
Technical Details: Include error handling, order retry logic, and logging.
Request: Keep the generated snippet clear and specific.
Debugging Assistance:
Integration Method: API key
Programming Language: Python
Problem: Clearly explain the error, exact line causing issues, provide corrected code snippet, and rationale.
Request: Provide a specific and concise response.
API Integration Clarity:
Integration Method: API key
Programming Language: Python
Requirements: Generate code that seamlessly integrates with Delta Exchange REST API using the 'requests' library.
Request: Clearly document each API call specifically for standalone trading strategies.
Validation and Implementation
Independently validate the AI-generated code.
Thoroughly test outputs in a sandbox before live trading.
Document your tests and adjustments clearly for future reference.
Continuous Improvement Through Feedback
Your feedback helps refine API Copilot continuously. Rate the AI-generated outputs and provide constructive feedback to improve future responses and your experience.
By adhering to these best practices, you will enhance productivity, precision, and the overall value you derive from API Copilot.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article