Comments (3)
envoriment python version its been tested only on python 3.7! but there is no api class you need to define it!
could be any name your won't
example
ctrader = Ctrader(FIX_SERVER,FIX_BROKER,FIX_LOGIN,FIX_PASSWORD,FIX_CURRENCY)
ctrader.buy("EURUSD", 0.01, 1.18, 1.19)
follow full example on readme
from ejtraderCT import Ctrader
FIX_SERVER="h8.p.c-trader.cn"
FIX_BROKER="icmarkets"
FIX_LOGIN="3152339"
FIX_PASSWORD="393214"
FIX_CURRENCY="EUR"
# api defined here
api = Ctrader(FIX_SERVER,FIX_BROKER,FIX_LOGIN,FIX_PASSWORD,FIX_CURRENCY)
api.buy("EURUSD", 0.01, 1.18, 1.19)
from ejtraderct.
@traderpedroso ye I know that I can connect the server that way.
But when i call history method so this Method in ctrader.py:
def history(self, symbol, chartTF, fromDate):
return json.loads(json.dumps(self.api.Command(action="HISTORY", actionType="DATA", symbol=symbol, chartTF=chartTF, fromDate=fromDate)))
i got this error
AttributeError: 'Ctrader' object has no attribute 'api'
coz there is no api defination in the class
what mean -api- in ctrader.py ?
from ejtraderct.
@traderpedroso ye I know that I can connect the server that way. But when i call history method so this Method in ctrader.py:
def history(self, symbol, chartTF, fromDate): return json.loads(json.dumps(self.api.Command(action="HISTORY", actionType="DATA", symbol=symbol, chartTF=chartTF, fromDate=fromDate)))
i got this error
AttributeError: 'Ctrader' object has no attribute 'api'
coz there is no api defination in the class what mean -api- in ctrader.py ?
sorry its not implemented yet on readme saying its future function
from ejtraderct.
Related Issues (20)
- Get Positions only works in Debug HOT 4
- FXPRO Not Connecting HOT 5
- Problem running with Flask Application HOT 13
- Some way to "Group" orders & positions HOT 5
- STUKED WITHOUT RESPONSE HOT 6
- Library cannot subscribe to any symbol HOT 2
- ASK: Why about modify positions? HOT 2
- Session still persists after halting script or jupyter book HOT 3
- There seems to be an issue with executing orders after they have been successfully executed twice before. HOT 6
- Symbol not Subscribed HOT 2
- Even if I use api.sell(), it still place a buy order. HOT 1
- Lot size Doesn't match HOT 3
- Issues with close_all Method Not Properly Closing Positions HOT 2
- How to Subscribe to a Symbol and Receive Quotes in the Absence of Open Positions? HOT 3
- How can I get my current open equity and balance? HOT 1
- orders are messed up HOT 2
- Not able to login HOT 2
- how to download historical data from a specific date HOT 2
- Issue while creating market order with limit(take profit) and stoploss HOT 16
- Possibility of Integrating FIX API in REST API HOT 2
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.
from ejtraderct.