Connected to Binance Futures API and get real-time data for available tickers.
Web Sockets DOC https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md
object BinanceSocketClientFactory {
// ......
const val TEST_URL = "stream.binancefuture.com"
const val PROD_URL = "fstream.binance.com"
}
Rest API DOC https://developers.binance.com/docs/derivatives/usds-margined-futures/general-info
object BinanceHTTPClientFactory {
// ......
const val TEST_URL = "testnet.binancefuture.com"
const val PROD_URL = "fapi.binance.com"
}
- You should be registered on Binance Crypto Exchange and create API key - Register and claim 100USD
- How to create API keys https://www.binance.com/en/support/faq/360002502072
- Create a new file
key.properties
in the root of the project - Add the following lines to the file:
api.key.testnet= [your key] api.key.live= [your key] api.secret.testnet= [your key] api.secret.live= [your key]
- Run the project
./gradlew :desktop:run
- Connect to Binance API WebSocket
- Getting all available tickers from API
- Subscribe to tickers to getting update from WebSocket
- On selecting ticker in UI get historical data and save it into local database
- Draw chart by historical data
- Simple alerts by price change (crossing, crossing up, crossing down)
- EMA Ribbon strategy for Alerts
- Real-time Chart by selected timeframe
- Timeframe picker for Chart (5m, 15m, 30m, 1h, 4h, 1d, 1m)
- Backtesting for selected period (date from - date to)
- Think about strategy RSI + MACD ?
- Calculate RSI and display for selected ticker
- Calculate MACD
- Getting all opened positions
- Display current PL
- Ability to run backtest for selected ticker + time frame + period
:common:utils
- just some useful helpers:common:database
- SQLDelight database definition:desktop
- Desktop application:feature:main
- the main screen:feature:chart
:feature:tickerlist
:feature:tradinglog
- To run, launch command:
./gradlew :desktop:run
- Or choose desktop configuration in IDE and run it.
./gradlew :desktop:packageReleaseDistributionForCurrentOS
# outputs are written to desktop/build/compose/binaries
Dmitri Chernysh
Copyright 2025 Dmitri Chernysh
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.