Giter Club home page Giter Club logo

mtemi / bybit-trading-bot-integrated-with-tradingview-webhook-alerts Goto Github PK

View Code? Open in Web Editor NEW
364.0 19.0 107.0 146 KB

Python based Trading Bot that uses TradingView.com webhook JSON alerts to place orders(buy/sell/close/manage positions/TP/SL/TS etc.) on Bybit.com.

Home Page: https://crypttops.com

Python 99.90% Shell 0.10%
trading-bot tradingview webhooks tradingview-webhooks btcusd telegram-bot telegram-bot-api telegram-api bybit-api python

bybit-trading-bot-integrated-with-tradingview-webhook-alerts's People

Contributors

crypttops avatar dependabot[bot] avatar joseeyw avatar mtemi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bybit-trading-bot-integrated-with-tradingview-webhook-alerts's Issues

Does not post open trade in bybit account

EDIT ** This is a rhel 8 server running python 3.7. It's using nginx to proxy pass port 80 to 5000.

The only code i've changed was:

https://github.com/Mtemi/Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook/blob/master/webhook-bot.py - Line 42 uncommented, line 44 commented out, Line 59 and 60 commented out, Line 63,64,65 uncommented and replaced with my server ip and port 80

https://github.com/Mtemi/Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook/blob/master/data.json -
Data changed to trading view data below

https://github.com/Mtemi/Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook/blob/master/actions.py - Line 13,14,78,79 I changed to my api secret and key

Server responds 200 and gets all data, it can access bybit account, but doesn't create an order. This is a test account with an amount in it that I am trying this bot out with.

Tradingview alert:

http://mypublicip/webhook
{"type": "limit", "side": "sell", "amount": "100", "symbol": "BTCUSD", "takeProfit": ".3", "stopLoss": ".1", "trailingStop": ".1", "leverage": "1", "key": "$mykey"}

[Alert Received]
POST Received/Updated Data: {'type': 'Limit', 'side': 'Sell', 'amount': '100', 'symbol': 'BTCUSD', 'takeProfit': '.3', 'stopLoss': '.1', 'trailingStop': '.1', 'leverage': '1', 'key': '$mykey'}
Sending: BTCUSD Limit Sell 100
Trading Amount: 100
Side: Sell
Type: Limit
Wallet Balance ----------------------------------------------------------
Wallet Balance------------------------------------------------(((( {'ret_code': 0, 'ret_msg': 'OK', 'ext_code': '', 'ext_info': '', 'result': {'BTC': {'equity': 0.00422068, 'available_balance': 0.00422068, 'used_margin': 0, 'order_margin': 0, 'position_margin': 0, 'occ_closing_fee': 0, 'occ_funding_fee': 0, 'wallet_balance': 0.00422068, 'realised_pnl': 0, 'unrealised_pnl': 0, 'cum_realised_pnl': 0, 'given_cash': 0, 'service_cash': 0}}, 'time_now': '1626490555.915240', 'rate_limit_status': 118, 'rate_limit_reset_ms': 1626490555912, 'rate_limit': 120}
0.00422068
Place Order Amount
Int Amount Percentage 1.0
Wallet Balance 0.00422068
Leverage ----------------------------------------------------------
{
"ret_code": 0,
"ret_msg": "ok",
"ext_code": "",
"result": {
"BTCUSD": {
"leverage": 1
},
"ETHUSD": {
"leverage": 50
},
"EOSUSD": {
"leverage": 50
},
"XRPUSD": {
"leverage": 50
}
},
"ext_info": null,
"time_now": "1626490556.196035",
"rate_limit_status": 110,
"rate_limit_reset_ms": 1626490556202,
"rate_limit": 120
}
Leverage Value 1
Position ----------------------------------------------------------
Position Result Value [{'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 6213467, 'risk_id': 1, 'symbol': 'BTCUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': True, 'auto_add_margin': 0, 'leverage': '1', 'effective_leverage': '1', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":1.00225,"sv2c":1.00075}', 'order_margin': '0', 'wallet_balance': '0.00422068', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 8428928856, 'position_seq': 0, 'created_at': '2021-07-16T13:57:23.517070934Z', 'updated_at': '2021-07-17T02:54:32.301913869Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 6213467, 'risk_id': 21, 'symbol': 'EOSUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 1838705740, 'position_seq': 0, 'created_at': '2021-07-16T13:57:23.520430713Z', 'updated_at': '2021-07-17T02:54:32.302620324Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 6213467, 'risk_id': 11, 'symbol': 'ETHUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 4757969973, 'position_seq': 0, 'created_at': '2021-07-16T13:57:23.516518572Z', 'updated_at': '2021-07-17T02:54:32.302168715Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 6213467, 'risk_id': 31, 'symbol': 'XRPUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 2679277714, 'position_seq': 0, 'created_at': '2021-07-16T13:57:23.518341179Z', 'updated_at': '2021-07-17T02:54:32.302538454Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}]
Position Result None
Position Take Profit 0
Position Stop Loss 0
Order ID ----------------------------------------------------------
Example Order ID 0
{
"ret_code": 0,
"ret_msg": "OK",
"ext_code": "",
"ext_info": "",
"result": [
{
"symbol": "BTCUSD",
"bid_price": "31313",
"ask_price": "31313.5",
"last_price": "31313.50",
"last_tick_direction": "ZeroPlusTick",
"prev_price_24h": "31920.00",
"price_24h_pcnt": "-0.019",
"high_price_24h": "32220.00",
"low_price_24h": "31020.00",
"prev_price_1h": "31384.00",
"price_1h_pcnt": "-0.002246",
"mark_price": "31336.94",
"index_price": "31343.16",
"open_interest": 1002735681,
"open_value": "14616.80",
"total_turnover": "87426988.91",
"turnover_24h": "93414.54",
"total_volume": 1918292437958,
"volume_24h": 2955819227,
"funding_rate": "-0.000313",
"predicted_funding_rate": "-0.00024",
"next_funding_time": "2021-07-17T08:00:00Z",
"countdown_hour": 6,
"delivery_fee_rate": "0",
"predicted_delivery_price": "0.00",
"delivery_time": ""
}
],
"time_now": "1626490561.795731"
}
Tickers [{'symbol': 'BTCUSD', 'bid_price': '31313', 'ask_price': '31313.5', 'last_price': '31313.50', 'last_tick_direction': 'ZeroPlusTick', 'prev_price_24h': '31920.00', 'price_24h_pcnt': '-0.019', 'high_price_24h': '32220.00', 'low_price_24h': '31020.00', 'prev_price_1h': '31384.00', 'price_1h_pcnt': '-0.002246', 'mark_price': '31336.94', 'index_price': '31343.16', 'open_interest': 1002735681, 'open_value': '14616.80', 'total_turnover': '87426988.91', 'turnover_24h': '93414.54', 'total_volume': 1918292437958, 'volume_24h': 2955819227, 'funding_rate': '-0.000313', 'predicted_funding_rate': '-0.00024', 'next_funding_time': '2021-07-17T08:00:00Z', 'countdown_hour': 6, 'delivery_fee_rate': '0', 'predicted_delivery_price': '0.00', 'delivery_time': ''}]
Last Price 31313.50
Position Entry Price 0
Bid Price Value Two 0.0
Order Amount 132.16215284
Order Amount in USD 132.16215284
Active Order Real Time ----------------------------------------------------------
Real time active order result {'current_page': 1, 'last_page': 1, 'data': []}
Real time active order result Intented Results {'current_page': 1, 'last_page': 1, 'data': []}
None Sell order being executed
Take Profit by 100 ----------------------------------------------------------
0.003
Multiply By Entry Price ----------------------------------------------------------
93.93900000000001
Take Profit Margin----------------------------------------------------------
31219.061
Stop Loss by 100 ----------------------------------------------------------
0.001
Multiply By Entry Price ----------------------------------------------------------
31.313000000000002
Stop Loss Margin----------------------------------------------------------
31344.313
Trailing Stop by 100 ----------------------------------------------------------
0.001
Multiply By Entry Price ----------------------------------------------------------
31.313000000000002
Trailing Stop Margin ----------------------------------------------------------
31.313000000000002
Sending Order in Sell position
skfk {'side': 'Sell', 'symbol': 'BTCUSD', 'order_type': 'Limit', 'qty': 132.16215284, 'price': None, 'time_in_force': 'PostOnly', 'take_profit': None, 'stop_loss': 31344.313, 'order_link_id': None}
None
Activating Trailing Stop
{
"ret_code": 10001,
"ret_msg": "params trailing_stop invalid",
"ext_code": "",
"ext_info": "",
"result": null,
"time_now": "1626490562.659650",
"rate_limit_status": 74,
"rate_limit_reset_ms": 1626490562658,
"rate_limit": 75
}
Sending Order in Buy position
skfk {'side': 'Buy', 'symbol': 'BTCUSD', 'order_type': 'Limit', 'qty': 132.16215284, 'price': 31219.061, 'time_in_force': 'PostOnly', 'take_profit': None, 'stop_loss': None, 'order_link_id': None}
{
"ret_code": 30031,
"ret_msg": "oc_diff[423771], new_oc[423771] with ob[0]+AB[422068]",
"ext_code": "",
"ext_info": "",
"result": null,
"time_now": "1626490562.932599",
"rate_limit_status": 98,
"rate_limit_reset_ms": 1626490562931,
"rate_limit": 100
}
Leverage ----------------------------------------------------------
{'ret_code': 0, 'ret_msg': 'ok', 'ext_code': '', 'result': {'BTCUSD': {'leverage': 1}, 'ETHUSD': {'leverage': 50}, 'EOSUSD': {'leverage': 50}, 'XRPUSD': {'leverage': 50}}, 'ext_info': None, 'time_now': '1626490563.206529', 'rate_limit_status': 101, 'rate_limit_reset_ms': 1626490563213, 'rate_limit': 120}
Change Leverage
{'ret_code': 34036, 'ret_msg': 'leverage not modified', 'ext_code': '', 'ext_info': '', 'result': None, 'time_now': '1626490563.532401', 'rate_limit_status': 73, 'rate_limit_reset_ms': 1626490563530, 'rate_limit': 75}
Leverage Saved
None Sell order being executed
Take Profit by 100 ----------------------------------------------------------
0.003
Multiply By Entry Price ----------------------------------------------------------
93.93900000000001
Take Profit Margin----------------------------------------------------------
31219.061
Stop Loss by 100 ----------------------------------------------------------
0.001
Multiply By Entry Price ----------------------------------------------------------
31.313000000000002
Stop Loss Margin----------------------------------------------------------
31344.313
Trailing Stop by 100 ----------------------------------------------------------
0.001
Multiply By Entry Price ----------------------------------------------------------
31.313000000000002
Trailing Stop Margin ----------------------------------------------------------
31.313000000000002
Sending Order in Sell position
skfk {'side': 'Sell', 'symbol': 'BTCUSD', 'order_type': 'Limit', 'qty': 132.16215284, 'price': None, 'time_in_force': 'PostOnly', 'take_profit': None, 'stop_loss': None, 'order_link_id': None}
None
Activating Trailing Stop
{
"ret_code": 10001,
"ret_msg": "params trailing_stop invalid",
"ext_code": "",
"ext_info": "",
"result": null,
"time_now": "1626490564.094602",
"rate_limit_status": 72,
"rate_limit_reset_ms": 1626490564093,
"rate_limit": 75
}
Sending Order in Buy position
skfk {'side': 'Buy', 'symbol': 'BTCUSD', 'order_type': 'Limit', 'qty': 132.16215284, 'price': None, 'time_in_force': 'PostOnly', 'take_profit': None, 'stop_loss': None, 'order_link_id': None}
{
"ret_code": 10001,
"ret_msg": "empty price",
"ext_code": "",
"ext_info": "",
"result": null,
"time_now": "1626490564.369909",
"rate_limit_status": 96,
"rate_limit_reset_ms": 1626490564369,
"rate_limit": 100
}
Leverage ----------------------------------------------------------
{'ret_code': 0, 'ret_msg': 'ok', 'ext_code': '', 'result': {'BTCUSD': {'leverage': 1}, 'ETHUSD': {'leverage': 50}, 'EOSUSD': {'leverage': 50}, 'XRPUSD': {'leverage': 50}}, 'ext_info': None, 'time_now': '1626490564.643695', 'rate_limit_status': 93, 'rate_limit_reset_ms': 1626490564650, 'rate_limit': 120}
Change Leverage
{'ret_code': 34036, 'ret_msg': 'leverage not modified', 'ext_code': '', 'ext_info': '', 'result': None, 'time_now': '1626490565.009267', 'rate_limit_status': 71, 'rate_limit_reset_ms': 1626490565008, 'rate_limit': 75}
Leverage Saved
End of WebHook Execution
127.0.0.1 - - [17/Jul/2021 02:56:05] "POST /webhook HTTP/1.0" 200 -

500 Errors and no communication with Bybit

I went as far as I can but seem to be stuck at the moment.

Everything is installed. The bot python is running. Ngrok is running and we are getting data in from the tradingview webhook every minute. I'm still not getting any activity to or from Bybit.

I'm running all of this on a Raspberry Pi 4 8 GB ram running the latest Ubuntu OS. I'm working to set this up on the Bybit test net if that is relevant.

See the replies from the terminal below.

127.0.0.1 - - [18/Jul/2021 01:05:40] "POST /webhook HTTP/1.1" 500 -
Data as Literal {'type': 'market', 'side': 'buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Data Read From File {'type': 'Market', 'side': 'Buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'takeProfit': '5', 'stopLoss': '1', 'trailingStop': '0', 'leverage': '25', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Updated Data {'type': 'market', 'side': 'buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'takeProfit': '5', 'stopLoss': '1', 'trailingStop': '0', 'leverage': '25', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
{'type': 'market', 'side': 'buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'takeProfit': '5', 'stopLoss': '1', 'trailingStop': '0', 'leverage': '25', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
[Alert Received]
POST Received/Updated Data: {'type': 'market', 'side': 'buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'takeProfit': '5', 'stopLoss': '1', 'trailingStop': '0', 'leverage': '25', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Sending: ETHUSD market buy 0.01
Trading Amount: 0.01
Side: buy
Type: market
Wallet Balance ----------------------------------------------------------
Wallet Balance------------------------------------------------(((( {'ret_code': 10003, 'ret_msg': 'invalid api_key', 'ext_code': '', 'ext_info': '', 'result': None, 'time_now': '1626588347.491405'}
[2021-07-18 01:05:47,650] ERROR in app: Exception on /webhook [POST]
Traceback (most recent call last):
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/pi/Bot/webhook-bot.py", line 50, in webhook
send_order(datas)
File "/home/pi/Bot/actions.py", line 90, in send_order
print(wallet_balance['result']['BTC']['available_balance'])
TypeError: 'NoneType' object is not subscriptable
127.0.0.1 - - [18/Jul/2021 01:05:47] "POST /webhook HTTP/1.1" 500 -
^C(Bot-QKn0Xe1W) pi@pi-desktop:~/Bot$

NoneType for property result while getting from get_wallet_balance

Traceback (most recent call last):
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/i303832/.local/share/virtualenvs/TV2BybitBOT-469t8JvM/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/Users/i303832/Documents/docs/Crypto/krypto/inBOT/TV2BybitBOT/webhook-bot.py", line 48, in webhook
send_order(datas)
File "/Users/i303832/Documents/docs/Crypto/krypto/inBOT/TV2BybitBOT/actions.py", line 96, in send_order
print(wallet_balance['result']['BTC']['available_balance'])
TypeError: 'NoneType' object is not subscriptable

Automatically Closing Previously Opened Positions

Whenever the bot tries to close a previously opened position due to an order of an opposite short/long side it is unable to close that previous position and unable to open the new position while giving the error for size. This also doesn't allow for the same position side to be added to one another. This bot can open positions fine but cannot close or add to any current positions.

Can't make trades

I'm still struggling to get this system to post a trade. Not sure what is holding me up.

See code below.

127.0.0.1 - - [20/Jul/2021 01:48:35] "POST /webhook HTTP/1.1" 500 -
Data as Literal {'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Data Read From File {'type': 'market', 'side': 'buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Updated Data {'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
{'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
[Alert Received]
POST Received/Updated Data: {'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Sending: ETHUSD market buy 0.1
Trading Amount: 0.1
Side: buy
Type: market
Wallet Balance ----------------------------------------------------------
Wallet Balance------------------------------------------------(((( {'ret_code': 0, 'ret_msg': 'OK', 'ext_code': '', 'ext_info': '', 'result': {'ETH': {'equity': 2.61628957, 'available_balance': 2.61628957, 'used_margin': 0, 'order_margin': 0, 'position_margin': 0, 'occ_closing_fee': 0, 'occ_funding_fee': 0, 'wallet_balance': 2.61628957, 'realised_pnl': 0, 'unrealised_pnl': 0, 'cum_realised_pnl': 0, 'given_cash': 0, 'service_cash': 0}}, 'time_now': '1626763770.165515', 'rate_limit_status': 118, 'rate_limit_reset_ms': 1626763770160, 'rate_limit': 120}
2.61628957
Place Order Amount
Int Amount Percentage 0.001
Wallet Balance 2.61628957
Leverage ----------------------------------------------------------
{
"ret_code": 0,
"ret_msg": "ok",
"ext_code": "",
"result": {
"BTCUSD": {
"leverage": 100
},
"ETHUSD": {
"leverage": 25
},
"EOSUSD": {
"leverage": 50
},
"XRPUSD": {
"leverage": 50
}
},
"ext_info": null,
"time_now": "1626763770.485808",
"rate_limit_status": 110,
"rate_limit_reset_ms": 1626763770496,
"rate_limit": 120
}
Leverage Value 25
Position ----------------------------------------------------------
Position Result Value [{'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 1, 'symbol': 'BTCUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '100', 'effective_leverage': '100', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.0115075,"sv2c":0.0114925}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 3872611797, 'position_seq': 0, 'created_at': '2021-07-19T13:40:14.567438091Z', 'updated_at': '2021-07-20T06:35:17.255468085Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 21, 'symbol': 'EOSUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 1252426809, 'position_seq': 0, 'created_at': '2021-07-17T14:27:36.008753308Z', 'updated_at': '2021-07-20T06:35:17.253319064Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 11, 'symbol': 'ETHUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': True, 'auto_add_margin': 0, 'leverage': '25', 'effective_leverage': '25', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.04153,"sv2c":0.04147}', 'order_margin': '0', 'wallet_balance': '2.61628957', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 2590142356, 'position_seq': 0, 'created_at': '2021-07-17T14:27:35.996668921Z', 'updated_at': '2021-07-20T06:35:17.253213024Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 31, 'symbol': 'XRPUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 1, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 1399427815, 'position_seq': 0, 'created_at': '2021-06-20T20:57:35.653496369Z', 'updated_at': '2021-07-20T06:35:17.253218425Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}]
Position Result None
Position Take Profit 0
Position Stop Loss 0
Order ID ----------------------------------------------------------
Example Order ID 0
{
"ret_code": 0,
"ret_msg": "OK",
"ext_code": "",
"ext_info": "",
"result": [
{
"symbol": "ETHUSD",
"bid_price": "1757.6",
"ask_price": "1757.7",
"last_price": "1757.60",
"last_tick_direction": "PlusTick",
"prev_price_24h": "1904.40",
"price_24h_pcnt": "-0.077084",
"high_price_24h": "1917.45",
"low_price_24h": "1720.05",
"prev_price_1h": "1748.40",
"price_1h_pcnt": "0.005261",
"mark_price": "1757.29",
"index_price": "1757.26",
"open_interest": 35665590,
"open_value": "16039.00",
"total_turnover": "213631951.07",
"turnover_24h": "139353.46",
"total_volume": 112991309973,
"volume_24h": 252864449,
"funding_rate": "0.0001",
"predicted_funding_rate": "0.0001",
"next_funding_time": "2021-07-20T08:00:00Z",
"countdown_hour": 2,
"delivery_fee_rate": "0",
"predicted_delivery_price": "",
"delivery_time": ""
}
],
"time_now": "1626763776.214818"
}
Tickers [{'symbol': 'ETHUSD', 'bid_price': '1757.6', 'ask_price': '1757.7', 'last_price': '1757.60', 'last_tick_direction': 'PlusTick', 'prev_price_24h': '1904.40', 'price_24h_pcnt': '-0.077084', 'high_price_24h': '1917.45', 'low_price_24h': '1720.05', 'prev_price_1h': '1748.40', 'price_1h_pcnt': '0.005261', 'mark_price': '1757.29', 'index_price': '1757.26', 'open_interest': 35665590, 'open_value': '16039.00', 'total_turnover': '213631951.07', 'turnover_24h': '139353.46', 'total_volume': 112991309973, 'volume_24h': 252864449, 'funding_rate': '0.0001', 'predicted_funding_rate': '0.0001', 'next_funding_time': '2021-07-20T08:00:00Z', 'countdown_hour': 2, 'delivery_fee_rate': '0', 'predicted_delivery_price': '', 'delivery_time': ''}]
Last Price 1757.60
Position Entry Price 0
Bid Price Value Two 0.0
Order Amount 4598.390548232
Order Amount in USD 4.5983905482319996
Active Order Real Time ----------------------------------------------------------
Real time active order result {'current_page': 1, 'last_page': 1, 'data': []}
Real time active order result Intented Results {'current_page': 1, 'last_page': 1, 'data': []}
[2021-07-20 01:49:36,714] ERROR in app: Exception on /webhook [POST]
Traceback (most recent call last):
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/pi/Bot/webhook-bot.py", line 50, in webhook
send_order(datas)
File "/home/pi/Bot/actions.py", line 1368, in send_order
if position_side == 'None' and data['stopLoss']=='None' and data['trailingStop']=='None':
KeyError: 'stopLoss'
127.0.0.1 - - [20/Jul/2021 01:49:36] "POST /webhook HTTP/1.1" 500 -
Data as Literal {'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Data Read From File {'type': 'market', 'side': 'buy', 'amount': '0.01', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Updated Data {'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
{'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
[Alert Received]
POST Received/Updated Data: {'type': 'market', 'side': 'buy', 'amount': '0.1', 'symbol': 'ETHUSD', 'key': 'bf110da8a214b863838dad8c7e1f0d4609a356a8460803dc6e14a2c1'}
Sending: ETHUSD market buy 0.1
Trading Amount: 0.1
Side: buy
Type: market
Wallet Balance ----------------------------------------------------------
Wallet Balance------------------------------------------------(((( {'ret_code': 0, 'ret_msg': 'OK', 'ext_code': '', 'ext_info': '', 'result': {'ETH': {'equity': 2.61628957, 'available_balance': 2.61628957, 'used_margin': 0, 'order_margin': 0, 'position_margin': 0, 'occ_closing_fee': 0, 'occ_funding_fee': 0, 'wallet_balance': 2.61628957, 'realised_pnl': 0, 'unrealised_pnl': 0, 'cum_realised_pnl': 0, 'given_cash': 0, 'service_cash': 0}}, 'time_now': '1626763829.989898', 'rate_limit_status': 119, 'rate_limit_reset_ms': 1626763829982, 'rate_limit': 120}
2.61628957
Place Order Amount
Int Amount Percentage 0.001
Wallet Balance 2.61628957
Leverage ----------------------------------------------------------
{
"ret_code": 0,
"ret_msg": "ok",
"ext_code": "",
"result": {
"BTCUSD": {
"leverage": 100
},
"ETHUSD": {
"leverage": 25
},
"EOSUSD": {
"leverage": 50
},
"XRPUSD": {
"leverage": 50
}
},
"ext_info": null,
"time_now": "1626763830.306705",
"rate_limit_status": 111,
"rate_limit_reset_ms": 1626763830317,
"rate_limit": 120
}
Leverage Value 25
Position ----------------------------------------------------------
Position Result Value [{'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 1, 'symbol': 'BTCUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '100', 'effective_leverage': '100', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.0115075,"sv2c":0.0114925}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 3872611797, 'position_seq': 0, 'created_at': '2021-07-19T13:40:14.567438091Z', 'updated_at': '2021-07-20T06:35:17.255468085Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 21, 'symbol': 'EOSUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 0, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 1252426809, 'position_seq': 0, 'created_at': '2021-07-17T14:27:36.008753308Z', 'updated_at': '2021-07-20T06:35:17.253319064Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 11, 'symbol': 'ETHUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': True, 'auto_add_margin': 0, 'leverage': '25', 'effective_leverage': '25', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.04153,"sv2c":0.04147}', 'order_margin': '0', 'wallet_balance': '2.61628957', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 2590142356, 'position_seq': 0, 'created_at': '2021-07-17T14:27:35.996668921Z', 'updated_at': '2021-07-20T06:35:17.253213024Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}, {'data': {'id': 0, 'position_idx': 0, 'mode': 0, 'user_id': 234826, 'risk_id': 31, 'symbol': 'XRPUSD', 'side': 'None', 'size': 0, 'position_value': '0', 'entry_price': '0', 'is_isolated': False, 'auto_add_margin': 1, 'leverage': '50', 'effective_leverage': '50', 'position_margin': '0', 'liq_price': '0', 'bust_price': '0', 'occ_closing_fee': '0', 'occ_funding_fee': '0', 'take_profit': '0', 'stop_loss': '0', 'trailing_stop': '0', 'position_status': 'Normal', 'deleverage_indicator': 0, 'oc_calc_data': '{"blq":0,"slq":0,"bmp":0,"smp":0,"bv2c":0.021515,"sv2c":0.021485}', 'order_margin': '0', 'wallet_balance': '0', 'realised_pnl': '0', 'unrealised_pnl': 0, 'cum_realised_pnl': '0', 'cross_seq': 1399427815, 'position_seq': 0, 'created_at': '2021-06-20T20:57:35.653496369Z', 'updated_at': '2021-07-20T06:35:17.253218425Z', 'tp_sl_mode': 'Full'}, 'is_valid': True}]
Position Result None
Position Take Profit 0
Position Stop Loss 0
Order ID ----------------------------------------------------------
Example Order ID 0
{
"ret_code": 0,
"ret_msg": "OK",
"ext_code": "",
"ext_info": "",
"result": [
{
"symbol": "ETHUSD",
"bid_price": "1757.35",
"ask_price": "1757.4",
"last_price": "1757.35",
"last_tick_direction": "MinusTick",
"prev_price_24h": "1904.40",
"price_24h_pcnt": "-0.077215",
"high_price_24h": "1917.45",
"low_price_24h": "1720.05",
"prev_price_1h": "1748.40",
"price_1h_pcnt": "0.005118",
"mark_price": "1758.74",
"index_price": "1758.71",
"open_interest": 35625756,
"open_value": "16039.00",
"total_turnover": "213631976.71",
"turnover_24h": "139354.76",
"total_volume": 112991355037,
"volume_24h": 252863173,
"funding_rate": "0.0001",
"predicted_funding_rate": "0.0001",
"next_funding_time": "2021-07-20T08:00:00Z",
"countdown_hour": 2,
"delivery_fee_rate": "0",
"predicted_delivery_price": "",
"delivery_time": ""
}
],
"time_now": "1626763836.031523"
}
Tickers [{'symbol': 'ETHUSD', 'bid_price': '1757.35', 'ask_price': '1757.4', 'last_price': '1757.35', 'last_tick_direction': 'MinusTick', 'prev_price_24h': '1904.40', 'price_24h_pcnt': '-0.077215', 'high_price_24h': '1917.45', 'low_price_24h': '1720.05', 'prev_price_1h': '1748.40', 'price_1h_pcnt': '0.005118', 'mark_price': '1758.74', 'index_price': '1758.71', 'open_interest': 35625756, 'open_value': '16039.00', 'total_turnover': '213631976.71', 'turnover_24h': '139354.76', 'total_volume': 112991355037, 'volume_24h': 252863173, 'funding_rate': '0.0001', 'predicted_funding_rate': '0.0001', 'next_funding_time': '2021-07-20T08:00:00Z', 'countdown_hour': 2, 'delivery_fee_rate': '0', 'predicted_delivery_price': '', 'delivery_time': ''}]
Last Price 1757.35
Position Entry Price 0
Bid Price Value Two 0.0
Order Amount 4597.7364758395
Order Amount in USD 4.5977364758395
Active Order Real Time ----------------------------------------------------------
Real time active order result {'current_page': 1, 'last_page': 1, 'data': []}
Real time active order result Intented Results {'current_page': 1, 'last_page': 1, 'data': []}
[2021-07-20 01:50:36,535] ERROR in app: Exception on /webhook [POST]
Traceback (most recent call last):
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/share/virtualenvs/Bot-QKn0Xe1W/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/pi/Bot/webhook-bot.py", line 50, in webhook
send_order(datas)
File "/home/pi/Bot/actions.py", line 1368, in send_order
if position_side == 'None' and data['stopLoss']=='None' and data['trailingStop']=='None':
KeyError: 'stopLoss'
127.0.0.1 - - [20/Jul/2021 01:50:36] "POST /webhook HTTP/1.1" 500 -

TypeError: string indices must be integers

{"symbol": BTCUSD, "amount": 10, "type": Market, "side": Buy, "key": "*********************"}
34.xxx.xx.xx - - [02/Feb/2021 21:35:25] "POST /webhook HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/bybot/Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook/webhook-bot.py", line 47, in webhook
if get_token() == datas['key']:
TypeError: string indices must be integers

Hi, any advice what the problem could be? taken from debug after sending test webhook from TV.

key is redacted but was generated from generate_alert_message.py

Thanks

syntax error in actions.py

Looks like it's missing the logical operator and between position_side == 'None' and data['stopLoss']!='None'

Traceback (most recent call last): File "webhook-bot.py", line 9, in <module> from actions import send_order, parse_webhook, parse__price_webhook File "/Users/brian/bots/python/webhook/webhook_bot_master/actions.py", line 2179 if position_side == 'None' data['stopLoss']!='None' and data['trailingStop']!='None': ^ SyntaxError: invalid syntax

error in actions.py, line 2179

could you check actions.py, line 2179 ?

File "/root/inthemiddle/Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook/actions.py", line 2179
if position_side == 'None' data['stopLoss']!='None' and data['trailingStop']!='None':

tks,

pippo

When running webhook-bot.py

File "C:\Users\dewald\Desktop\Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook-master\webhook-bot.py", line 9, in
from actions import send_order, parse_webhook, parse__price_webhook
File "C:\Users\dewald\Desktop\Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook-master\actions.py", line 3, in
from pybybit import Bybit
File "C:\Users\dewald\Desktop\Bybit-Auto-Trading-Bot-Ordes-placed-via-TradingView-Webhook-master\pybybit.py", line 12, in
import pandas as pd
ModuleNotFoundError: No module named 'pandas'

Invalid request : please check your timestamp

Hello .
How can i fix this error? :

Wallet balance fetch error

invalid request, please check your timestamp and recv_window param. req_timestamp: 1647859265070 server_timestamp: 1647859263888 recv_window: 5000


ERROR:websocket:error from callback <bound method Bybit._on_open of <pybybit.Bybit object at 0x000000BAD0C74970>>: Bybit._on_open() takes 1 positional argument but 2 were given

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.