cbot's People
Forkers
almastro71 alex-loiseau mi-molette brycurt lafleur17 maxime-sallerin etienne0731 bglacial jorento elmrdude guiguivnl chr-js mathieu1131 fatchifa neverzyx mechareptilian teklib anonymouson-git adamayameogo cryptoflo974 cvprz maxrebar amyaas1 mandy-tecbot's Issues
get_open_position en erreur sur le bot en futures FTX
Lors de l'appel de cette fonction : ftx.get_open_position(perpSymbol)
J'ai le message d'erreur suivant :
raise BadSymbol(self.id + ' does not have market symbol ' + symbol)
ccxt.base.errors.BadSymbol: ftx does not have market symbol S
Voici mon symbol : SOL-PERP sur FTX. J'ai essayer aussi ETH-PERP, en vain.
Avez-vous déjà eu cette erreur ?
Merci par avance
An error occured 'size'
Hello,
J'ai une erreur quand je lance aligatorPerpLive.py
J'obtiens:
"An error occured 'size'"
En réalité cela provient de la classe "cBot_perp_ftx"
Je penses que l'erreur vient de la fonction fetchPositions()
Elle renvoi dans mon cas un "nested dictionnary"
{'info': {'future': 'ETH-PERP', 'size': '0.0', 'side': 'buy', 'netSize': '0.0', 'longOrderSize': '0.0', 'shortOrderSize': '0.0', 'cost': '0.0', 'entryPrice': None, 'unrealizedPnl': '0.0', 'realizedPnl': '-2.97564255', 'initialMarginRequirement': '0.1', 'maintenanceMarginRequirement': '0.03', 'openSize': '0.0', 'collateralUsed': '0.0', 'estimatedLiquidationPrice': None, 'recentAverageOpenPrice': None, 'recentPnl': None, 'recentBreakEvenPrice': None, 'cumulativeBuySize': None, 'cumulativeSellSize': None}, 'symbol': 'ETH-PERP', 'timestamp': None, 'datetime': None, 'initialMargin': None, 'initialMarginPercentage': 0.1, 'maintenanceMargin': None, 'maintenanceMarginPercentage': 0.03, 'entryPrice': None, 'notional': None, 'leverage': 10, 'unrealizedPnl': None, 'contracts': 0.0, 'contractSize': 1.0, 'marginRatio': None, 'liquidationPrice': None, 'markPrice': None, 'collateral': None, 'marginType': 'cross', 'side': 'long', 'percentage': None}
Du coup les test du type :if float(position['size']) > 0 renvoi l'erreur
Il faudrait remplacer
if float(position['size']) > 0:
par
if float(position['info']['size']) > 0:
CCXT get_open_position renvoi 'long' au lieu de 'buy'
La condition suivante ne fonctionne pas :
if ftx.get_open_position(perpSymbol)[0]['side'] == 'buy':
A remplacer par 'long' ?
if ftx.get_open_position(perpSymbol)[0]['side'] == 'long':
Idem sur les short.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.