binance-price-watch
Visual Studio Code Marketplace page
中文文档
Description
binance-price-watch is a Visual Studio Code extension that displays cryptocurrency contract prices using the Binance API.
It's designed for developers and traders who want to keep track of cryptocurrency prices directly in their coding environment.
Features
- Real-time Price Display: Monitor the latest prices of your selected cryptocurrencies.
- Real-time Display of Profit and Profit Rate: Calculate and display profit and profit rate based on the configured buy price and current price.
- Customizable Monitoring: Configure which coins to monitor and set precision for price display.
- Polling Interval: Set how frequently the plugin fetches the latest price data.
- Focus Update: Optionally update data only when the editor is in focus.
- Quick Configuration: Easily access and modify settings through VSCode's command palette.
- Hide/Show Coins: Temporarily hide specific coins from the status bar by clicking the eye icon.
Installation
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar.
- Search for binance-price-watch.
- Click the Install button.
Configuration
After installing the extension, you can configure it by adding the following settings in your settings.json
{
"binance-price-watch.enable": true,
"binance-price-watch.symbols": [
{
"symbol": "btcusdt", // Required: Trading pair symbol
"abbr": "btc", // Optional: Coin abbreviation, defaults to removing 'usdt'
"precision": 2, // Optional: Number of decimal places
"buyPrice": 0, // Optional: Opening price
"direction": "up", // Optional: Opening direction, 'up' for long, 'down' for short
"leverage": 0, // Optional: Leverage multiplier
"cost": 0, // Optional: Cost in USDT. Profit is shown when hovering over the price. If not set, only profit rate will be displayed.
"amount": 0 // Optional: Amount of the cryptocurrency. Takes priority over 'cost' when calculating profit.
}
],
"binance-price-watch.updateInterval": 1500, // Optional: Update interval in milliseconds
"binance-price-watch.api": "https://api4.binance.com/api/v3/ticker/price", // Optional: API URL
"binance-price-watch.updateOnFocus": true, // Optional: Update only when editor is focused
"binance-price-watch.showEyeButton": true // Optional: Show/hide the eye button for toggling coin visibility
}
Example Configuration
Here’s a sample configuration to monitor Bitcoin and Ethereum
{
"binance-price-watch.symbols": [
{
"symbol": "btcusdt",
"precision": 2,
"abbr": "btc",
"buyPrice": 10,
"direction": "up",
"leverage": 10,
"cost": 10
},
{
"symbol": "ethusdt",
"precision": 2
}
]
}
Usage
Once configured, the plugin will display the prices of the specified cryptocurrencies in the status bar. You can monitor multiple trading pairs and calculate and display profit and profit rate in real-time based on the configured buy price. Profit will be shown when hovering over the price.
You can quickly access and modify the configuration through VSCode's command palette (Cmd/Ctrl + Shift + P) by typing "Binance Price Watch".
Each coin display in the status bar has an eye icon that allows you to temporarily hide/show that specific coin. This is useful when you want to focus on specific coins without modifying your configuration.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or bugs.
Repository
For the source code and more information, visit the GitHub repository.