Smart Trading Bot Architecture.
Task: implementation of the fastest possible calculation and opening of an order on the ByBit exchange
Data preparation
Parsing all tokens on the ByBit exchange (spot / futures, separately), the list is updated every 5 minutes by cron.
Connecting via socket to each coin and collecting real-time ticks (order book changes) and trades.
Sending all this to Victoria Metrics, data up to 5 minutes – stored in RAM
Separately for spot, separately for futures we collect the current order book independently by ticks
Data calculation for the trade
Calculating the price change dynamics by VOLUME.
For this, we calculate the average price for asks (for opening a long) in equivalent volumes:
1,000$, 5,000$ (step in the form of an array to be set in the settings)
Comparing with the average value of trades over the last 60 and 300 seconds
Comparing with the average value of asks (for the same volume) from the order book history.
As a result, we get an array [price_difference_60s]
1000$ - 5.86%
5000$ - 6.12%
We check if at a volume of 1000$ the delta in price is less than 10% (PRICE_CHANGE_DELTA_60S = 10), then we continue the logic/purchase.
Calculating slippage data to determine size.
Using the specified constant (MAX_SLIPPAGE_PERCENT = 5) we add asks line by line until we reach the required limit of >5%
Multiplying volume by price in the order book to calculate the available volume in the order book considering the maximum slippage.
Using the variable from the config (MAX_POSITION_SIZE_IN_USD = 10000) for the final size calculation. For example, in the order book, the available volume at the ask is 8500$ with slippage <5%, so this is our position size of 8500$, if the available volume >10000$, then our position size will be 10,000$ (taken from MAX_POSITION_SIZE_IN_USD)
Opening a trade
Sending limit orders via websocket and through the REST API at the ask price +5% (taken from MAX_SLIPPAGE_PERCENT) and the IOC (immediate or cancel) parameter.
Along with the order, a stop loss/take profit is set at 33% of the size for growth +10%, +20%, +30%
The stop loss is set at -10% from the first ask in the order book.
Passing order orderLinkId and "smpType": "CancelTaker" for the correct operation of the script when running in parallel on multiple servers.
It is important to think through the reconnection, retries, logs, and alerts system
Warm_up_mode, send a “fake” order to the exchange every 30 seconds to maintain activity.
System for generating JA3 fingerprints
The task is not simple, requires full involvement, so if you have a couple of hours a day - it is not suitable. A person with full immersion in the issue is needed.
-
295 Good day.
I can easily create a bot according to your requirements.
Although there is already a ready-made product, here are the specifications:
Expected profit per month: 90⋅0.7%=63% 90 cdot 0.7% = 63% 90⋅0.7%=63% (without considering compound interest).
Taking into account compound interest (if the profit is reinvested): Total profitability=(1+0.7100)90−1≈86.8%text{Total profitability} = left(1 + frac{0.7}{100}right)^{90} – 1 approx 86.8%Total profitability=(1+1000.7)90−1≈86.8%
That is, theoretically, the bot can provide a profitability of ~86.8% per month with 60% accuracy of signals and 3 trades per day.
3. Factors affecting actual profitability
Signal accuracy: Actual accuracy may be lower due to market noise, forecasting errors, or price spikes. The code includes a spike detection mechanism (is_spike) that reduces the number of false entries.
-
198 Hello! I will create a real-time collection of spot/futures pairs from ByBit, ticks/trades via WS, storing 5 minutes in memory and streaming to VictoriaMetrics. I will reconstruct the order books "by ticks" and calculate the VOLUME-weighted price for $1k/$5k with a comparison of 60/300s and order book history. Entry logic: delta threshold, slippage calculation ≤5%, size up to $10k; execution — limit IOC with a markup of up to 5%, immediate TP 3×(10/20/30%) and SL −10%, orderLinkId + smpType: CancelTaker. I will implement retries/reconnects, logs/alerts, "warming up" connections — without gray JA3 bypasses (I work through official SDK/keepalive/testnet to avoid risks according to ToS). Deadline: 6–9 working days with full immersion. Budget: $2,500–$3,200 in stages, without dumping; I will fix T&M/milestones. A couple of clarifications: do you already have VictoriaMetrics deployed or should I set it up myself? I need API keys (testnet+prod) with Trade/Read-Only permissions and a list of exact volumes (array) for calculations.
-
Одного не могу понять, кто родил мысль что можно открыть сотню сокет соединений с одного ip. А тут для всех монет, для спота и фьючов! Это уже как миф ходит, все мечтают и не могут.
-
Current freelance projects in the category C & C++
Reverse engineering of console utilities for querying SSD controllers (Flash ID)1. Purpose of the work Extraction of the application programming interface (API) for interaction with SSD/NVMe controllers from the provided set of console utilities (Phison, Silicon Motion, Realtek, Maxiotek, Marvell, JMicron, etc.). The result should be working code in C/C++… C & C++, Desktop Apps ∙ 7 days 4 hours back ∙ 6 proposals |
Development of a Minecraft Java Seed Map / Seed Viewer for the websiteDevelopment of Minecraft Java Seed Map / Seed Viewer for the websiteProject Description A browser-based tool Minecraft Java Seed Map / Seed Viewer needs to be developed, which will work on our website and allow the user to enter a seed from Minecraft Java Edition and view an… C & C++, HTML & CSS ∙ 7 days 11 hours back ∙ 15 proposals |
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x)
22 USD
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x) on the identical hardware platform (ESP32 + SX1268, 2W) based on the criteria of range, throughput, link stability, and power consumption. Conduct tests with… C & C++, C# ∙ 11 days 18 hours back ∙ 2 proposals |