agusalex / ghostfolio-sync Goto Github PK
View Code? Open in Web Editor NEWSync Ghostfolio with IBKR
Sync Ghostfolio with IBKR
Hi,
I tried your container, i rebuilt it for ARM, and I receive following error.
Not sure how to proceed?
Many thanks,
T
[sysadmin@rocky-4gb-fsn1-rc-1 ghostfolio-sync]$ podman run -e GHOST_TOKEN=$GHOST_TOKEN -e IBKR_TOKEN=$IBKR_TOKEN -e IBKR_QUERY=$IBKR_QUERY localhost/trefex/ghostfolio-sync
[2024-07-07 22:10:00] Starting ghostfolio-sync Docker...
[2024-07-07 22:10:00] Crontab Not Present running one time now
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 115, in parse_data_element
attrs = dict(
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 116, in <genexpr>
parse_element_attr(Class, k, v)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 156, in parse_element_attr
Type = Class.__annotations__[name]
KeyError: 'issuerCountryCode'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/app/src/main.py", line 22, in <module>
ghost.sync_ibkr()
File "/usr/app/src/SyncIBKR.py", line 71, in sync_ibkr
query: FlexQueryResponse = parser.parse(response)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 53, in parse
parsed = parse_element(root)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 85, in parse_element
return parse_data_element(elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 125, in parse_data_element
contained_elements = {child.tag: parse_element(child) for child in elem}
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 125, in <dictcomp>
contained_elements = {child.tag: parse_element(child) for child in elem}
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 80, in parse_element
return parse_element_container(elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 101, in parse_element_container
instances = tuple(parse_data_element(child) for child in elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 101, in <genexpr>
instances = tuple(parse_data_element(child) for child in elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 125, in parse_data_element
contained_elements = {child.tag: parse_element(child) for child in elem}
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 125, in <dictcomp>
contained_elements = {child.tag: parse_element(child) for child in elem}
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 83, in parse_element
return parse_element_container(elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 101, in parse_element_container
instances = tuple(parse_data_element(child) for child in elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 101, in <genexpr>
instances = tuple(parse_data_element(child) for child in elem)
File "/usr/local/lib/python3.9/site-packages/ibflex/parser.py", line 121, in parse_data_element
raise FlexParserError(msg)
ibflex.parser.FlexParserError: Trade has no attribute 'issuerCountryCode'
[2024-07-07 22:10:07] Starting sync
[2024-07-07 22:10:07] Fetching Query
[2024-07-07 22:10:07] Parsing Query```
Hi team,
I did all the steps, creating an flex query on Interactive Brokers and enabled the Flex Web Service
I put all the information as your instructions and I'm getting this error:
[2023-09-06 10:24:10] Starting ghostfolio-sync Docker...
[2023-09-06 10:24:10] Crontab Not Present running one time now
Traceback (most recent call last):
File "/usr/app/src/main.py", line 11, in <module>
ibkr_tokens = os.environ.get("IBKR_TOKEN").split(",")
AttributeError: 'NoneType' object has no attribute 'split'
Can you help me understand what i'm doing wrong?
Thank you
I'm trying to create this container with docker compose but not succeeding because we it needs the bearer token as an env variable. Would it be possible to supply the ghostfolio user key instead and the script would then fetch the bearer token?
hi there, I'm trying get this to work with Ghostfolio 2.12.0
. It seems like few things have changed? Also from the IBKR side?
here's what I get when I try and run the container:
[2023-10-18 16:55:36] Starting ghostfolio-sync Docker...
[2023-10-18 16:55:36] Crontab Not Present running one time now
Traceback (most recent call last):
File "/usr/app/src/main.py", line 22, in <module>
ghost.sync_ibkr()
File "/usr/app/src/SyncIBKR.py", line 74, in sync_ibkr
account_id = self.create_or_get_IBKR_accountId()
File "/usr/app/src/SyncIBKR.py", line 253, in create_or_get_IBKR_accountId
accounts = self.get_account()
File "/usr/app/src/SyncIBKR.py", line 250, in get_account
raise Exception(response)
Exception: <Response [502]>
[2023-10-18 16:55:37] Starting sync
[2023-10-18 16:55:37] Fetching Query
[2023-10-18 16:55:37] Parsing Query
[2023-10-18 16:55:39] Fetching Query
,"MIG":"Migranet","MIININGNFT": (bazillion characters in here so had to cut it) return this.prismaService.marketData.deleteMany(
[2023-10-18 16:55:39] Failed creating
[2023-10-18 16:55:39] Failed to retrieve account ID closing now
[2023-10-18 16:55:39] End sync
gghostfolio-sync exited with code 0
Hi @agusalex
I managed to fix the lib, but now I get the following when trying to connect to self hosted ghostfolio.
Would you know what could be the issue here?
[sysadmin@rocky-4gb-fsn1-rc-1 ghostfolio-sync]$ podman run -e GHOST_TOKEN=$GHOST_TOKEN -e IBKR_TOKEN=$IBKR_TOKEN -e IBKR_QUERY=$IBKR_QUERY -e GHOST_HOST=127.0.0.1:3333 localhost/trefex/ghostfolio-sync[2024-07-08 16:15:25] Starting ghostfolio-sync Docker...
[2024-07-08 16:15:25] Crontab Not Present running one time now
[2024-07-08 16:15:32] Starting sync
[2024-07-08 16:15:32] Fetching Query
[2024-07-08 16:15:32] Parsing Query
[2024-07-08 16:15:32] Finding IBKR account
[2024-07-08 16:15:32] No connection adapters were found for '127.0.0.1:3333/api/v1/account'
[2024-07-08 16:15:32] Creating IBKR account
[2024-07-08 16:15:32] No connection adapters were found for '127.0.0.1:3333/api/v1/account'
[2024-07-08 16:15:32] Failed to retrieve account ID closing now
[2024-07-08 16:15:32] End sync```
Many thanks
T
Hey,
Getting an error trying to sync between IBKR and self-hosted ghostfolio.
Traceback (most recent call last):
File "/usr/app/src/main.py", line 22, in <module>
ghost.sync_ibkr()
File "/usr/app/src/SyncIBKR.py", line 69, in sync_ibkr
response = client.download(self.ibkrtoken, self.ibkrquery)
File "/usr/local/lib/python3.9/site-packages/ibflex/client.py", line 114, in download
stmt_access = request_statement(token, query_id)
File "/usr/local/lib/python3.9/site-packages/ibflex/client.py", line 142, in request_statement
raise ResponseCodeError(
Request
docker run -e GHOST_TOKEN="token "-e IBKR_TOKEN=token -e IBKR_QUERY=Ghostfolio -e GHOST_HOST=localhost agusalex/ghostfolio-sync
Hello,
I'm new to self hosting. I'm trying to set up ghostfolio-sync. This is the log i get.
[2024-02-07 18:14:49] Starting ghostfolio-sync Docker...
[2024-02-07 18:14:49] Crontab Not Present running one time now
[2024-02-07 18:14:56] Starting sync
[2024-02-07 18:14:56] Fetching Query
[2024-02-07 18:14:56] Parsing Query
[2024-02-07 18:14:56] unsupported operand type(s) for +=: 'decimal.Decimal' and 'NoneType'
[2024-02-07 18:14:56] Failed create: {"message":["property accountType should not exist"],"error":"Bad Request","statusCode":400}
Request
docker run -e GHOST_HOST=localhost -e GHOST_TOKEN=YOUR_GHOST_TOKEN -e IBKR_TOKEN=IBKR-TOKEN -e IBKR_QUERY=IBKR-QUERY agusalex/ghostfolio-sync
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.