Conversation
Greptile SummaryThis PR adds a new Key findings:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Agent
participant Binance
User->>Agent: Request (e.g. Place a BUY order on testnet)
Agent->>Agent: Load credentials from session
alt Public endpoint - no auth required
Agent->>Binance: GET /api/v3/exchangeInfo
Binance-->>Agent: Exchange info JSON
else API-key only endpoint (e.g. historicalTrades)
Agent->>Binance: GET /api/v3/historicalTrades<br/>Header: X-MBX-APIKEY
Binance-->>Agent: Trades JSON
else Signed endpoint for trading and account data
Agent->>Agent: Build query string + timestamp
Agent->>Agent: Sign with HMAC-SHA256 or RSA or Ed25519
Agent->>Binance: POST /api/v3/order<br/>Headers: X-MBX-APIKEY + signature param
Binance-->>Agent: Order result JSON
end
Agent-->>User: Return result in JSON format
Last reviewed commit: "fix: remove unsuppor..." |
| echo -n "symbol=BTCUSDT&side=BUY&type=MARKET&quantity=0.001×tamp=1234567890123" | \ | ||
| openssl pkeyut -pubout -in private_key.pem -outform DER | \ | ||
| openssl dgst -sha256 -sign private_key.pem | base64 | ||
| ``` | ||
|
|
||
| ### Step 3: Append Signature |
There was a problem hiding this comment.
Incorrect Ed25519 signing command
The Ed25519 example contains two errors:
openssl pkeyutis not a valid OpenSSL subcommand — the correct one isopenssl pkeyutl.- Ed25519 handles its own internal hashing (it does not pre-hash with SHA-256), so piping through
openssl dgst -sha256 -signis incorrect and will produce a wrong/unusable signature.
The correct Ed25519 signing command is:
# Example using openssl pkeyutl for Ed25519
echo -n "symbol=BTCUSDT&side=BUY&type=MARKET&quantity=0.001×tamp=1234567890123" | \
openssl pkeyutl -sign -inkey private_key.pem | base64As written, any agent following this example would produce an invalid signature and receive a -1022 Signature for this request is not valid error from Binance.
| | `/api/v3/depth` (GET) | Order book | symbol | limit, symbolStatus | No | | ||
| | `/api/v3/historicalTrades` (GET) | Old trade lookup | symbol | limit, fromId | No | | ||
| | `/api/v3/klines` (GET) | Kline/Candlestick data | symbol, interval | startTime, endTime, timeZone, limit | No | | ||
| | `/api/v3/ticker` (GET) | Rolling window price change statistics | None | symbol, symbols, windowSize, type, symbolStatus | No | |
There was a problem hiding this comment.
/api/v3/historicalTrades authentication mis-labelled
The Binance API marks /api/v3/historicalTrades as API-key authenticated — callers must include the X-MBX-APIKEY header even though no HMAC signature is required. The current table lists this endpoint as No for authentication, which would cause agents to omit the key header and receive a 401 Unauthorized error. Consider adding a third tier (e.g., API-key) to distinguish between fully-unsigned public endpoints and key-only endpoints.
| --- | ||
|
|
||
| ## Parameters | ||
|
|
There was a problem hiding this comment.
Several parameters are defined more than once in the Common Parameters section, which can cause confusion for the AI agent consuming this skill. The duplicates spotted are: symbol (lines 71 & 75), quantity (lines 86 & 101), price (lines 88 & 102), stopPrice (lines 91 & 104), orderId (lines 98 & 148), timestamp (lines 83 & 149), and limit (lines 82 & 150).
Remove all duplicate entries and keep only the most descriptive version of each.
| * **orderId**: (e.g., 1) | ||
| * **origClientOrderId**: | ||
| * **newQty**: `newQty` must be greater than 0 and less than the order's quantity. (e.g., 1) | ||
| * **cancelNewClientOrderId**: Used to uniquely identify this cancel. Automatically generated by default. |
There was a problem hiding this comment.
Malformed parameter description — missing spaces
The pegOffsetValue description has words run together without spaces, making it unreadable for both humans and agents:
Priceleveltopegthepriceto(max:100). SeePeggedOrdersInfo
| * **cancelNewClientOrderId**: Used to uniquely identify this cancel. Automatically generated by default. | |
| * **pegOffsetValue**: Price level to peg the price to (max: 100). See Pegged Orders Info (e.g., 1) |
| ### Enums | ||
|
|
||
| * **interval**: 1s | 1m | 3m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 8h | 12h | 1d | 3d | 1w | 1M | ||
| * **windowSize**: 1m ... 6d | ||
| * **type**: FULL | MINI | ||
| * **type**: MARKET | LIMIT | STOP_LOSS | STOP_LOSS_LIMIT | TAKE_PROFIT | TAKE_PROFIT_LIMIT | LIMIT_MAKER | NON_REPRESENTABLE | ||
| * **selfTradePreventionMode**: NONE | EXPIRE_TAKER | EXPIRE_MAKER | EXPIRE_BOTH | DECREMENT | NON_REPRESENTABLE |
There was a problem hiding this comment.
Credential sharing via plaintext chat is a security risk
The skill instructs users to share their Binance API key and secret as bare plaintext lines in a file or chat message:
abc123...xyz
secret123...keyThis approach has no labels to distinguish key from secret, is error-prone, and encourages users to paste live credentials directly into a chat session. The secret key in particular should never transit a chat interface unencrypted. Consider instead directing users to use environment variables (BINANCE_API_KEY / BINANCE_SECRET_KEY) or a named credentials store, and documenting that format instead.
| | Mainnet | https://api.binance.com | | ||
| | Testnet | https://testnet.binance.vision | | ||
|
|
||
| ## Required Headers | ||
| X-MBX-APIKEY: your_api_key |
There was a problem hiding this comment.
Demo environment missing from Base URLs table
SKILL.md references a third base URL (https://demo-api.binance.com) under the Authentication section, but authentication.md only lists Mainnet and Testnet. Agents using the demo environment would need to refer back to the main skill file for the URL.
| | Mainnet | https://api.binance.com | | |
| | Testnet | https://testnet.binance.vision | | |
| ## Required Headers | |
| X-MBX-APIKEY: your_api_key | |
| | Environment | URL | | |
| |-------------|-----| | |
| | Mainnet | https://api.binance.com | | |
| | Testnet | https://testnet.binance.vision | | |
| | Demo | https://demo-api.binance.com | |
New Skill Contribution
Skill Info
Checklist
Testing
Describe how you tested this skill:
Notes
Any additional context or notes for reviewers.