-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/orderly #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 22 commits
67c12e4
00bb87a
6ce2fe6
d405bb9
53e0d98
04e2674
774121c
50c6e68
26eb5f1
badeb5f
ce8a719
bd92a3e
f07fc8e
b2696bf
bbe0040
259d57c
32e5dce
de1e4fc
b27aee1
3a626f3
ee59516
0c6ba9e
316f063
b22e3dc
eb6b81e
39bd5ec
b44254a
0c7e602
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| exchange: orderly_perpetual | ||
| trading_pair: BTC-USDC | ||
| order_amount_quote: 20 | ||
| bid_spread_levels: [0.0005] | ||
| ask_spread_levels: [0.0005] | ||
| order_refresh_time: 10 | ||
| max_inventory: 0.002 # 200 usd | ||
| max_price_adjustment: 0.001 # 10 bps | ||
| leverage: 100 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| exchange: orderly_perpetual | ||
| trading_pair: BTC-USDC | ||
| order_amount_quote: 20 | ||
| bid_spread_levels: [0.0005] | ||
| ask_spread_levels: [0.0005] | ||
| order_refresh_time: 10 | ||
| max_inventory: 0.002 # 200 usd | ||
| max_price_adjustment: 0.001 # 10 bps | ||
| leverage: 100 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify that 100x leverage is intentional and document associated risks. The leverage value of 100 is extremely high and represents significant liquidation risk. Confirm this is:
Consider adding a risk warning in accompanying documentation. 🏁 Script executed: #!/bin/bash
# Examine the file and surrounding context
echo "=== File content: conf/scripts/pmm_kodiak_example.yml ==="
cat conf/scripts/pmm_kodiak_example.yml
echo -e "\n=== Search for other leverage values in the repository ==="
rg -i 'leverage' --type yaml -C 3
echo -e "\n=== Search for risk management or documentation files ==="
fd -e md -e txt -e rst | head -20 | xargs grep -l -i 'risk\|leverage' 2>/dev/null
echo -e "\n=== Check for other example or config files ==="
fd -e yml -e yaml | grep -E '(example|config|kodiak|pmm)' | head -20Length of output: 20635 🏁 Script executed: #!/bin/bash
echo "=== File content: conf/scripts/pmm_kodiak_example.yml ==="
cat conf/scripts/pmm_kodiak_example.yml
echo -e "\n=== Search for leverage values across YAML files ==="
rg -i 'leverage' --type yaml -C 2
echo -e "\n=== Search for documentation mentioning risk or leverage ==="
fd -type f \( -name "*.md" -o -name "*.txt" -o -name "*.rst" \) | xargs grep -l -i 'leverage\|risk' 2>/dev/null || echo "No matches found"
echo -e "\n=== List YAML/YML files that might be config or example related ==="
fd -type f \( -name "*.yml" -o -name "*.yaml" \) | head -30Length of output: 16638 🏁 Script executed: #!/bin/bash
# Search for leverage validation in the strategy and connector code
echo "=== Search for leverage validation or constraint checking ==="
rg -n 'leverage' --type py -C 3 | grep -iE '(valid|constraint|check|range|max|min|error)' | head -40
echo -e "\n=== Look for perpetual market making strategy files ==="
fd -type f -name "*perpetual*market*making*" --type f
echo -e "\n=== Search for orderly connector leverage handling ==="
fd -type f -path "*orderly*" -name "*.py" | head -20
echo -e "\n=== Check if leverage is validated before submission to exchange ==="
rg -n 'def.*leverage' --type py -A 5 | head -50Length of output: 10409 🏁 Script executed: #!/bin/bash
# Find orderly perpetual connector files
echo "=== Orderly perpetual connector files ==="
find . -path "*orderly*perpetual*" -name "*.py" | grep -v __pycache__ | grep -v test
echo -e "\n=== Search for set_leverage in orderly connector ==="
find . -path "*orderly*perpetual*" -name "*.py" -exec grep -l "set_leverage" {} \;
echo -e "\n=== Look for leverage validation or constraint checking in orderly ==="
find . -path "*orderly*perpetual*" -name "*.py" -exec grep -n "leverage" {} + | grep -iE "(valid|range|check|between|1.*50|max)" | head -20Length of output: 1271 🏁 Script executed: #!/bin/bash
# Extract the set_leverage method implementation
echo "=== set_leverage method in orderly_perpetual_derivative.py ==="
rg -A 30 'def set_leverage' hummingbot/connector/derivative/orderly_perpetual/orderly_perpetual_derivative.py
echo -e "\n=== Look for any validation or range checks ==="
rg -B 5 -A 10 'leverage' hummingbot/connector/derivative/orderly_perpetual/orderly_perpetual_derivative.py | grep -iE '(valid|range|check|error|exception|1.*50|between)' -A 2 -B 2 | head -40Length of output: 806 🏁 Script executed: #!/bin/bash
# Get the full _set_trading_pair_leverage method
echo "=== Full _set_trading_pair_leverage implementation ==="
rg -B 5 -A 50 'async def _set_trading_pair_leverage' hummingbot/connector/derivative/orderly_perpetual/orderly_perpetual_derivative.py
echo -e "\n=== Check for any leverage constraints in constants ==="
rg 'leverage' hummingbot/connector/derivative/orderly_perpetual/orderly_perpetual_constants.py | head -20Length of output: 2370 Reduce leverage from 100 to valid range (1-50) per Orderly Perpetual API constraints. The value 100 violates the Orderly Perpetual API's documented maximum leverage of 50 ("Integer between 1 to 50" per orderly_swagger.yml). The connector's 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Dummy Cython header file for build system compatibility |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Dummy Cython file for build system compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate configuration files with identical content.
This file is identical to
conf/scripts/Kodiak_btc.yml. Having two separate files with the same configuration creates maintenance burden and potential for drift. Clarify the purpose of both files—if they serve different use cases, document those differences clearly; otherwise, consolidate into a single example file.🤖 Prompt for AI Agents