Skip to content
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

how to understand if the bot is working? #15

Closed
Rocky-04 opened this issue Aug 22, 2022 · 10 comments
Closed

how to understand if the bot is working? #15

Rocky-04 opened this issue Aug 22, 2022 · 10 comments
Labels
question Further information is requested

Comments

@Rocky-04
Copy link

I can't figure out whether the bot is working successfully or not. The bot works for several hours, but there are no purchases and sales. What could be the problem?

@Rocky-04
Copy link
Author

Screenshot_15

@DogsTailFarmer DogsTailFarmer added the question Further information is requested label Aug 22, 2022
@DogsTailFarmer
Copy link
Owner

Hi! 0 buy and 0 sell orders it's malfunction state. Normal operational status is same order (min 1) for grid side and one TP. For short time after start or restart cycle only grid orders are possible, this is the grid shift mode.

@Rocky-04
Copy link
Author

Thank you. Why might there be such an error?
This is what I get when I run the program:

main.account_name: Demo - Binance
main.exchange: binance
main.client_id: 1277351242736
main.srv_version: 1.2.3
main.restore_state: True
PRICE_FILTER: {'minPrice': '0.01000000', 'maxPrice': '1000000.00000000', 'tickSize': '0.01000000'}
PERCENT_PRICE: {'multiplierUp': '5', 'multiplierDown': '0.2', 'avgPriceMins': 1}
LOT_SIZE: {'minQty': '0.00000100', 'maxQty': '900.00000000', 'stepSize': '0.00000100'}
MIN_NOTIONAL: {'minNotional': '10.00000000', 'applyToMarket': True, 'avgPriceMins': 1}
ICEBERG_PARTS: {'limit': 10}
MARKET_LOT_SIZE: {'minQty': '0.00000000', 'maxQty': '100.00000000', 'stepSize': '0.00000000'}
MAX_NUM_ORDERS: {'maxNumOrders': 200}

Base asset balance: {'asset': 'BTC', 'free': '1.04085000', 'locked': '0.00000000'}
Quote asset balance: {'asset': 'USDT', 'free': '1160.28995119', 'locked': '0.00000000'}

Init Strategy, ver: 1.2.3 + 1.2.5 + 1.2.5
Restore saved state after restart? Y:
y
22/08 10:30:39 Demo - Binance, BTC/USDT.
Round pattern, for base: 1.123456, quote: 1.25827072
Last ticker price: 21191.4
buy_amount: 0.000472, sell_amount: 0.000472
22/08 10:30:40 Trying restore saved state after restart
22/08 10:30:41 restore_strategy_state from saved state:
22/08 10:30:41 command "ok"
cycle_buy true
cycle_buy_count 0
cycle_sell_count 0
cycle_time "2022-08-22 06:11:37.616332"
cycle_time_reverse null
deposit_first 0.03
deposit_second 300.0
initial_first 0.0
initial_reverse_first 0
initial_reverse_second 0
initial_second 880.56242244
last_shift_time null
martin 1.1
order_q 12
orders []
orders_hold []
orders_save []
over_price 0.6
part_amount_first 0
part_amount_second 0
profit_first 0
profit_second 0
reverse false
reverse_hold false
reverse_init_amount 0
reverse_price null
reverse_target_amount 0
shift_grid_threshold null
status_time 1661153284.415776
sum_amount_first 0
sum_amount_second 0
sum_profit_first 0
sum_profit_second 0
tp_amount 0
tp_init "(Decimal('0'), Decimal('0'))"
tp_order "()"
tp_order_id null
tp_part_amount_first 0
tp_part_amount_second 0
tp_target 0
tp_wait_id null
Start process for .db save
Start process for Telegram
22/08 10:30:41 Restore, no orders, restart
22/08 10:30:41 Start
Send data to .db t_funds
22/08 10:30:41 For Rocky critical memory availability, end
22/08 10:30:41 Stop, waiting manual action
22/08 10:31:19 Complete 0 buy cycle and 0 sell cycle
For all cycles profit:
First: 0
Second: 0
Summary: 0E-8


Buy cycle with 0 buy and 0 sell active orders.
No hold grid orders
Over price: 0.60%
Last ticker price: 21214.33
ver: 1.2.3+1.2.5+1.2.5
From start 1:19:42

@DogsTailFarmer
Copy link
Owner

DogsTailFarmer commented Aug 22, 2022

Hi!

First - try clear start, without

Restore saved state after restart? Y:
y

next -

22/08 10:30:41 For Rocky critical memory availability, end

The strategy is focused for use on cheap VPS with limited memory and before start cycle tested availability memory, if used_memory > 70% of total - don't start.

@Rocky-04
Copy link
Author

Thanks, solved the problem. I tried to run on the main account, but a new error occurs:

main.account_name: Binance
Exception on register client: UNKNOWN, Unexpected <class 'IndexError'>: tuple index out of range

Why might there be such an error? Index pointed - 1

@DogsTailFarmer
Copy link
Owner

Hi! Reason is incomplete account setup, it's two part:

  • for server it is exchanges_wrapper/exch_srv_cfg.toml, where you place API key and account name

  • for client it's martin_binance/ms_cfg.toml, where you add account name into exchange list

The account name must be identically for account.

I update readme and add handler for this error some later. Thank's, Jerry.

@Rocky-04
Copy link
Author

Hi! 'Demo - Binance' and 'Binance' work differently. Demo makes more orders than the main account. Why is this happening?
I ran two tests at the same time and saw that the first order had a different purchase price.

TEST_2
TEST_1

@DogsTailFarmer
Copy link
Owner

Hi!

It's normal. Amount first grid order depend from step_size (trade rules for exchange/account/pair and may be different for test and real place - compare it) and some another parameters:

        if not additional_grid and not grid_update and not GRID_ONLY and PROFIT_MAX < 100:
            k_m = 1 - PROFIT_MAX / 100
            amount_first_grid = max(amount_min, (step_size * base_price / ((1 / k_m) - 1)) / base_price)

For what? It is important for the TP order to meet the specified maximum price step, no more PROFIT_MAX, the smaller the volume of the first order, the greater the price spread for the TP sale. Trading rules for the pair are requested from the exchange when the strategy is initiated.

@DogsTailFarmer
Copy link
Owner

And what is noted in the figures is not the purchase price, but the order volume in the second currency.

@DogsTailFarmer
Copy link
Owner

Hi! For free Q&A you can use discussion area in this rep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants