Skip to content

Instantly share code, notes, and snippets.

View jsgaston's full-sized avatar
😍
Out sick

jsgaston jsgaston

😍
Out sick
View GitHub Profile
else:
if len(strongBuy_list1)!=0:
f=c.shape
g=f[0]-1
cc=c[g]
CC = float(round((cc) , 4))
print("el close es:",CC)
tpl=cc+((1.5)*datr1d)
#sls=cc+((1.5)*datr1d)
#tps=cc-((1.5)*datr1d)
order_buy=client.futures_create_order(
symbol=symbolo,
side='BUY',
type='MARKET',
quantity=cantidad,
#reduceOnly=True
)
order_Buy_ID=order_buy['orderId']
print(order_buy)
precio=order_buy['price']
if client.futures_position_information(symbol=symbolo)[-1]['positionAmt'] == '0.00000':
time.sleep(2)
client.futures_cancel_all_open_orders(symbol=symbolo)
if client.futures_position_information(symbol=symbolo)[-1]['positionAmt'] == '0.00000':
time.sleep(2)
client.futures_cancel_all_open_orders(symbol=symbolo)
client.futures_cancel_all_open_orders(symbol=symbolo)
client.futures_create_order(symbol=symbolo,side='SELL', type="MARKET", quantity=cantidad, redueOnly='True')
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 27 00:28:36 2021
@author: tu madre es una foca
"""
#from selectors import EpollSelector
#import tradingview_ta
API_KEY = 'here you insert the key'
API_SECRET = 'here you inster the secret key'
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 27 00:28:36 2021
@author: tu madre es una foca
"""
#from selectors import EpollSelector
#import tradingview_ta