Code Monkey home page Code Monkey logo

tosdatabridge's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tosdatabridge's Issues

premarket price data

not really an issue, just wondering if your code supports pulling premarket price data

Setup: can't find serv file

I am trying to run the tosdb-setup.bat x64 and it keeps telling me it can't find the tos-databridge-serv-x64.exe yet I see it in there
asdasda

asdasdsadsad

Potential Options Paradise

This is a fantastic library, works great and gives the data needed. There is a lot of potential here when working with options. Is it possible to get strikes and expirations for a symbol? That would be incredibly useful for populating the right items into add_items.

I also know that it has been mentioned in the past, but is there anyway to set the time? The thinkback feature of TOS is very powerful and gives access to a ton of info from the past. If not, do you have any ideas how to implement it?

Cannot build with C++ 17/20

The client I'm using has the "C++ Language Standard" set to C++ 20, but I cannot include/build due to the identifier errors in "containers.hpp" The errors will not occur if the standard is set to C++ 14.
The code was compiled using the "fixes-v142" (most recent) branch.

Capture

Thank you

Cannot init tosdb

Following the python instructions on Linux ubuntu 18.

# import the top-level package (1)
import tosdb

# the dll path directly from the top-level package (1)
tosdb.init(dllpath="/home/user/code/TOSDataBridge/bin/Release/x64/tos-databridge-0.9-x64.dll")

# the relative root(of the dll path) from the top-level package (1)
tosdb.init(root="../bin")

Im getting the error AttributeError: module 'tosdb' has no attribute 'init'

Tutorial clarification

Hi, I tried going through the tutorial you provided. I could follow until the last portion, where I bumped into a definition error which d is not defined. I tried looking through myself and indeed, d was not defined apriori, but then is used as part of the loop code. Tks!

Missing Topic (java)?

Was hoping to get profit and loss for a current position with this but it seems that the "P_L_PERCENT" topic is not available? Is that due to TOS or the Bridge please?

Thank you.

Level-2 Data

Is there any way to get a stream of the level-2 data from ToS? I don't see it in the documentation but I'm unsure if I'm missing it or if that feature just hasn't been built out.

Cannot import tosdb.py

I have followed the installation step and have successfully started up the TOSDataBridge Windows service, and now I am trying to get the python part going.

When I try to install it: (CMD shell with admin access. New install of Windows + python 3.10 newly installed. Nothing else installed.)
python setup.py install

The version of TOSDataBridge I tried is v0.8.

I get the cannot import error
00

Any advice on how should I solve this? Thank you!

No errors - no connection

Hi there,

I've tried to start the bridge service via 'SC start TOSDataBridge' but cannot seem to connect. Any ideas how I can troubleshoot? I don't have anti virus on my machine.

capture

How do I get results/outputs from TOS studies/strategies?

Hey, I managed to setup your library following the tutorial and it connects successfully to my TOS. I am using python to follow the tutorials and figure out how the library works from your screen shots. I was wondering how can I get the service to get alerts/results/outputs from my studies/strategies running on TOS on a a specific ticker?

Issues with finding binaries

hi, im fairly new to programming so please bare with me. im trying to run the tosdb-setup.bat file in cmd and i keep getting "Can't find "C:\TOSBridge\bin\Release\x64\tos-databridge-serv-x64.exe", exiting setup...". ive checked that location to make sure the file is in there and it is so im not sure what's going on here. ive whitelisted the folder and have been following along with the instructions you've provided so any suggestions would be much appreciated.

Service couldn't start

Hi @jeog,

Thanks for the library, it looks very helpful.
One problem I had is that I couldn't start its service.

Attached is a screenshot of TOSDataBridge on a fresh install of Windows 7 SP1.

untitled

Is there any way to debug this error?

Thanks!

TypeError: 'OHLC' object is not iterable

I'm trying to figure out how to use the intervalize module and having a little trouble making the data work. I tried ohlc.TOSDB_OpenHighLowCloseIntervals(block2, 12, poll_sec=1) to test some data retrieval and could get the data but can't unpack it as a tuple so I'm not sure how to use it. I'm interested in maybe writing values to a CSV file after formatting them properly, but not sure how to access individual values.

Maybe I don't need to use this class at all though. How do you schedule periodic fetching of data in your python script? I'm looking into the schedule module. I'd like to read in ohlc every 1, 5, 15, 60 mins for example. Any pointers you have would be greatly appreciated.

EDIT: I was able to get the periodic repetition I wanted using the schedule module. So my only question is how to access the data returned by the "intervalize" module? Or is it advised just to run .get() on a vanilla data block at periodic intervals and access / manipulate the data that way?

Is this able to run on MacOS/Linux? (Python client)

Hi,

The README is a bit unclear about the requirements

Requirements

  • Windows for the core implementation. (The python interface is available to any system running python3.)
  • TDAmeritrade's ThinkOrSwim(TOS) platform that exposes DDE functionality (the Window's verion)
  • VC++ 2012 Redistributable (included)

It states that the python version can run on any system but needs TOS windows version

Am I seeing something not right?

stream_snapshot_from_marker is returning None

A few days ago stream_snapshot_from_marker started returning None for me, and it was working correctly before. Is anyone else experiencing this issue? The standard get() works fine, but I'm scared of missing transactions using while(runflag): get(...).

Here's some test code which generates None for me via stream_snapshot_from_marker() but the proper transactions via get(). I'm running this via python 3 32-bit but on Windows 10 64-bit.

import timer
from timeit import default_timer
buffer = []
tosdb.init(root='C:\TOSDataBridge-master\\bin')
block = tosdb.TOSDB_DataBlock(10000, True)
block.add_items('/ES')
block.add_topics('LASTX', 'BIDX', 'ASKX', 'LAST_SIZE')
time.sleep(3)  # allow block time to load the cache
buffer.append(block.get('/ES', 'BIDX', date_time=True,
                        indx=0))  # update marker
time.sleep(5)  # wait perhaps for transactions to occur
timer = 0
while (timer < 5):  # get transactions for 5 seconds
    #     data = block.get('/ES', 'BIDX', date_time=True) # this works
    data = block.stream_snapshot_from_marker(  # this returns None
        '/ES', 'BIDX', date_time=True, beg=0)
    print(data)  # => prints None
    buffer.append(data)
    timer = default_timer()
tosdb.clean_up()
print(buffer)
# => [('2499.75 G', TOSDB_DateTime(micro=97104, sec=34, min=57,
#        hour=20, day=22, month=9, year=2017)), None, None, None,...]

Pull Pos Qty from TOS

Hello,

I've successfully connected to TOSDB and have integrated Custom quotes into my python code. I would like to also add "Pos Qty" from the marketwatch/quotes tab as well. It can be added to the table as a column but is not a Custom Quote. It is a Porfolio type instead. It may also go by the name "POSITION_QTY". In the meta_enum.py file, I have looked through the possible topics by looking into dir(cls) on line 124. I do not see anything like Pos Qty as a possible topic. I would like to be able to import data from TOS showing me my share sizes for each stock in the Marketwatch/quotes section. Is this possible using TOSDB?

All zeroes in topic/items of block

bridge.txt
Hi: I am trying to connect to TOS using the TOSDataBridge.
I have installed the engine and got it running on a Window 10 work station running x64.
I have the TOS platform running,
I installed the tosdb python library on the same machine along with python V 3.9.0
I attempted to exercise the system by running code similar to the example python code provided.
I am able to see the connection all the way to the TOS platform.
But when I attempt to display blocks for items/topics, I get all zeroes.
I am accessing the TOS platform after trading hours. Do I need to do some setup on the TOS platform?

Thanks!
Joseph Flores---------------------------------------------------------

Here is the output:
C:\Users\J\scripts\bridge>python bridge.py

  • Using Module(s) D:/TOS/TOSDataBridge-master/bin\Release\x64\tos-databridge-0.9-x64.dll
    D:/TOS/TOSDataBridge-master/bin\Release\x64/_tos-databridge-x64.dll
  • Last Update: Thu Oct 15 11:05:05 2020
  • Process ID: 12864
  • Succesfully Connected to Service\Engine
  • Succesfully Connected to TOS
    Connected: True
    State: 2 True
    Block Limit: 10
    Block Limit: 20
    Active Blocks: 0
    ASK
    ASK
    ['ASK', 'BID', 'LAST', 'VOLUME']
    Block topics: ['ASK', 'BID', 'LAST', 'VOLUME']
    Block items: ['QQQ', 'SPY']
    Block topics precached: []
    Block items precached: []
    Block info: {'Name': 'b0c38fdee10f4d44b7bae822e400eaf9', 'Items': ['QQQ', 'SPY'], 'Topics': ['ASK', 'BID', 'LAST', 'VOLUME'], 'ItemsPreCached': [], 'TopicsPreCached': [], 'Size': 10000, 'DateTime': 'Enabled', 'Timeout': 2000}
    Block:
    ASK BID LAST VOLUME
    QQQ 0.000000 0.000000 0.000000 0
    SPY 0.000000 0.000000 0.000000 0

Total_frame: dict_keys(['QQQ', 'SPY'])
Total_frame (last): ('0.000000', TOSDB_DateTime(micro=0, sec=0, min=0, hour=0, day=0, month=1, year=1900))
Total_frame (volume): ('0', TOSDB_DateTime(micro=0, sec=0, min=0, hour=0, day=0, month=1, year=1900))

  • Closing Blocks
  • Disconnecting From Service \ Engine
  • Closing Module(s) D:\TOS\TOSDataBridge-master\bin\Release\x64\tos-databridge-0.9-x64.dll
    D:\TOS\TOSDataBridge-master\bin\Release\x64_tos-databridge-x64.dll

Service don't start

Hi!

I can't run the service. My actions:

  1. tosdb-setup.bat x64
  2. SC start TOSDataBridge
  3. SC query TOSDataBridge

Result: STATE : 1 STOPPED.

I can't start it even manually through the "services.msc".

When I try to install with "tosdb-setup.bat x64 xzvf" (xzvf is my current user with admin privileges, the only one user in the system) and then "SC start TOSDataBridge". After this command in Task Manager appears for a while and then disappears the process "tos-databridge-serv-x64.exe" and after it disappears in console I have error:

[SC] StartService: error: 1053:
The service did not respond to the start or control request in a timely fashion.

Tried to set up in service options "Allow Service to Interact with Desktop"... Nothing helps :(

machine: Windows 7 64bit, Python 3 x64.

Cannot get CUSTOM data

Hey,

I am trying to get my CUSTOM study data returned but it kept failing so I setup another CUSTOM field according to your tutorial just to test and make sure I wasnt doing anything wrong but still I dont get anything returned. https://github.com/jeog/TOSDataBridge/blob/master/README_DETAILS.md#custom-topics

I keep getting this error.

`+ Using Module(s) C:\TOSDataBridge\bin\Release\x64\tos-databridge-0.9-x64.dll
C:\TOSDataBridge\bin\Release\x64/_tos-databridge-x64.dll

  • Last Update: Thu Sep 26 19:21:45 2019
  • Process ID: 19376
  • Succesfully Connected to Service\Engine
  • Succesfully Connected to TOS
    Sleeping for 10 second
    Traceback (most recent call last):
    File "a:/git/Harmonic Patterns/TOSTest.py", line 89, in
    tosStudyData()
    File "a:/git/Harmonic Patterns/TOSTest.py", line 78, in tosStudyData
    val = block.get("SPY", "CUSTOM9", date_time=False)
    File "C:\python37\lib\site-packages\tosdb_win.py", line 636, in get
    raise TOSDB_DataError("data not available at this index yet " +
    tosdb._common.TOSDB_DataError: data not available at this index yet (disable check_indx to avoid this error)
  • Closing Blocks
  • Disconnecting From Service \ Engine
  • Closing Module(s) C:\TOSDataBridge\bin\Release\x64\tos-databridge-0.9-x64.dll
    C:\TOSDataBridge\bin\Release\x64/_tos-databridge-x64.dll`

I put the check_index flag as False just to test it out and I dont get any data in there but an empty list.

String Data Size Limit

Is there a way to adjust the maximum string data size, so that I can access a larger string custom quotes?

I have been working on accessing data through the custom quotes. I have been successful, however I am limited by the 40 character limit of the STR_DATA_SZ constant. My custom quote data is therefore prematurely truncated. TOS is able to export much larger strings, which I have verified with excel RTD functions.
Would I have to change TOSDB_STR_DATA_SZ in tos_databridge.h and recompile?

Thank you.

Limit on number of items

I getting errors like this:

library function [TOSDB_AddItem] returned error code [-29,ERROR_DECREMENT_BASE(-4)]

after accessing a significant number of items, for example:

  1. create 10 blocks with 500 items each and 4 topics per item
  2. wait for 100 data points in the block
  3. get data
  4. close 10 blocks

If I do the above steps 3 times, the system starts to fail and gives me the decrement or increment errors for almost every item added. They are definitely valid items, because if I restart the entire computer I can then run the items. Just restarting the service does not fix the issue.

Obviously that is a ton of items, just curious if you have seen this behavior and if you there is a fix.

What I can do when teh TOSDataBridge no start?

What I can do when teh TOSDataBridge no start?
Example:

C:\TOSDataBridge>SC start TOSDataBridge

NOMBRE_SERVICIO: TOSDataBridge
TIPO : 10 WIN32_OWN_PROCESS
ESTADO : 2 START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
CÓD_SALIDA_WIN32 : 0 (0x0)
CÓD_SALIDA_SERVICIO: 0 (0x0)
PUNTO_COMPROB. : 0x0
INDICACIÓN_INICIO : 0x7d0
PID : 7516
MARCAS :

C:\TOSDataBridge>SC query TOSDataBridge

NOMBRE_DE_SERVICIO: TOSDataBridge
TIPO : 10 WIN32_OWN_PROCESS
ESTADO : 1 STOPPED
CÓDIGO_DE_SALIDA_DE_WIN32 : 0 (0x0)
CÓDIGO_DE_SALIDA_DEL_SERVICIO: 0 (0x0)
PUNTO_DE_CONTROL : 0x0
ESPERA : 0x0

Failed to connect

I am getting the following message using python:
Failed to Connect to TOS

Do you have any steps on how to debug this?

Thanks!

Encounter errors when attempting to run the java example (TimeAndSales) and the bridge test

I've also run through the troubleshooting tips to ensure everything was configured properly:

io.github.jeog.tosdatabridge.TOSDataBridge$CLibException: CLib call [TOSDB_AddTopic] failed; ERROR_DECREMENT_BASE(-2)
at io.github.jeog.tosdatabridge.DataBlock.addTopic(DataBlock.java:329)
at Test.testBlock1(Test.java:175)
at Test.main(Test.java:72)
*** DONE (FAILURE) ***

Failure to import tosdb module

Hi.

Strangely after upgrade to python 3.6. I am unable to run the script with the failure that tosdb module is not found. I have managed to import and run it previously. Is there some compatibility issues with 3.6? Or suggest next steps to troubleshoot as the script managed to run previously.

download data

Hi
i want to download all data history of some symbol it's possible with your script ?
or possible to modified to do that?
thanks

data not being pulled

so i was following the tutorial and was able to get everything setup with no problems and the connections be successful.
but when it came to printing the data, i can't get it to pull the data from TOS. went through all the troubleshooting steps and everything seems to be in check.

Untitled

tried running ToS as administrator but that makes the ToS connection fail even though its remains on the same session as the databridge. below are the logs.

Untitled2

client:
DATE / TIME Process ID Thread ID Log TAG Severity Description

Mon May 13 15:55:29 2019 [23355] 11476 12680 IPC LOW connected to engine, client: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe
Mon May 13 15:55:30 2019 [540341] 11476 12680 ENGINE HIGH error code returned from engine: -22

engine:
DATE / TIME Process ID Thread ID Log TAG Severity Description

Mon May 13 15:55:16 2019 [370447] 9404 11328 STARTUP LOW is_service == true
Mon May 13 15:55:16 2019 [371447] 9404 11328 STARTUP LOW lpCmdLn args: --spawned --service
Mon May 13 15:55:16 2019 [381449] 9404 11328 STARTUP LOW entering RunMainCommLoop

service:
DATE / TIME Process ID Thread ID Log TAG Severity Description

Mon May 13 15:55:16 2019 [332447] 6992 10980 STARTUP LOW lpCmdLn:
Mon May 13 15:55:16 2019 [333448] 6992 10980 STARTUP LOW argc: 0 custom_session: -1 admin_pos: 0 no_service_pos: 0
Mon May 13 15:55:16 2019 [334448] 6992 4864 ADMIN LOW successfully registered control handler
Mon May 13 15:55:16 2019 [334448] 6992 4864 STATE LOW SERVICE_START_PENDING
Mon May 13 15:55:16 2019 [334448] 6992 4864 STARTUP LOW start tos-databridge-engine.exe (AS A SERVICE)
Mon May 13 15:55:16 2019 [335448] 6992 4864 SPAWN LOW (4) set session id: 1 (this may may fail during (6) 'CreateProcessAsUser')
Mon May 13 15:55:16 2019 [358447] 6992 4864 STATE LOW SERVICE_RUNNING

Tick Strategy

I was able to get a signal from a strategy using the custom quote, however I have a strategy that is on a 50 tick chart that I would like to send a signal from. It seems custom quote only allows minute strategies. Is there a workaround to send a signal from a tick chart to a python program?

Fail to run test codes for Java

I tried 3 tests. Except the last one, others are not success. You may know what the problem is.

  1. TimeAndSales runs failed on both dlls. The error message for tos-databridge-0.9-x64.dll is "Failed to Connect to TOS(CONN_ENGINE)". The error message for _tos-databridge-x64.dll is "TOSDataBridge Exception: library not loaded", where I tried to change the dll file name in order to avoid some name problems.

  2. TOSDataBridgeTest has a link problem to native lab with _tos-databridge-x64.dll

directory: \data\finance\lib\tosdatabridge\x64, name: _tos-databridge-x64
TOSDataBridge.init(..) failed to load library: java.lang.UnsatisfiedLinkError: Error looking up function 'TOSDB_Connect': The specified procedure could not be found.

java.lang.UnsatisfiedLinkError: Error looking up function 'TOSDB_Connect': The specified procedure could not be found.

at com.sun.jna.Function.<init>(Function.java:245)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:542)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:528)
at com.sun.jna.Library$Handler.invoke(Library.java:228)
at com.sun.proxy.$Proxy0.TOSDB_Connect(Unknown Source)
at io.github.jeog.tosdatabridge.TOSDataBridge.connect(TOSDataBridge.java:164)

EXCEPTION: LibraryNotLoaded
io.github.jeog.tosdatabridge.TOSDataBridge$LibraryNotLoaded: library not loaded
at io.github.jeog.tosdatabridge.TOSDataBridge.init(TOSDataBridge.java:141)
at com.norvar.testcenter.trials.TOSDataBridgeTest.main(TOSDataBridgeTest.java:73)
io.github.jeog.tosdatabridge.TOSDataBridge$LibraryNotLoaded: library not loaded
at io.github.jeog.tosdatabridge.TOSDataBridge.init(TOSDataBridge.java:148)
at com.norvar.testcenter.trials.TOSDataBridgeTest.main(TOSDataBridgeTest.java:73)

*** DONE (FAILURE) ***

  1. TOSDataBridgeTest can run with tos-databridge-0.9-x64.dll a few steps, but got an error. The message is as follows.

directory: \data\finance\lib\tosdatabridge\x64, name: tos-databridge-0.9-x64
NOT CONNECTED
block limit: 10
double block limit
block limit: 20
block count: 0

CREATE BLOCK 1...
Block: b4a90404-9e1c-48bd-b7eb-6ec8a585da11
using datetime: false
timeout: 2000
block size: 100000
Successfully created block: b4a90404-9e1c-48bd-b7eb-6ec8a585da11
Add items: [/ZN, /ES]
Block: b4a90404-9e1c-48bd-b7eb-6ec8a585da11
item(pre-cache): /ZN
item(pre-cache): /ES

Item pre-cache looks good: [/ZN, /ES]
Successfully caught exception from adding NULL_TOPIC: io.github.jeog.tosdatabridge.TOSDataBridge$InvalidItemOrTopic: 'NULL_TOPIC' is not a valid Topic
Successfully caught exception from adding null topic: java.lang.NullPointerException: null topic enum
Successfully caught exception from adding empty item string: io.github.jeog.tosdatabridge.TOSDataBridge$InvalidItemOrTopic: invalid item string length: 0
Successfully caught exception from adding too large item string: io.github.jeog.tosdatabridge.TOSDataBridge$InvalidItemOrTopic: invalid item string length: 256
Add Topics: [LASTX, LAST_SIZE, LAST, CUSTOM1]
EXCEPTION: CLibException
io.github.jeog.tosdatabridge.TOSDataBridge$CLibException: CLib call [TOSDB_AddTopic] failed; ERROR_DECREMENT_BASE(-2)
io.github.jeog.tosdatabridge.TOSDataBridge$CLibException: CLib call [TOSDB_AddTopic] failed; ERROR_DECREMENT_BASE(-2)

at io.github.jeog.tosdatabridge.DataBlock.addTopic(DataBlock.java:329)
at com.norvar.testcenter.trials.TOSDataBridgeTest.testBlock1(TOSDataBridgeTest.java:181)
at com.norvar.testcenter.trials.TOSDataBridgeTest.main(TOSDataBridgeTest.java:78)

*** DONE (FAILURE) ***

Thanks

Xuefeng

Current futures contracts not displaying correct data

Thanks for the excellent work on this library.

I noticed tonight that overnight futures data doesn't seem to report the correct price (sometimes returning all zeros, sometimes returning wrong data). Maybe this isn't a bug and it's a consequence of the data stream, but wanted to share my note.

Tonight calling /ES data returned LAST: 2921.75. When querying /CL I'm getting LAST: 73.56. These are returning data but not sure why they're so out of date.

FWIW, today is the first time I've run the software, so I shouldn't have a cache or anything stored locally.

EDIT: I'm running this overnight from the USA.

EDIT2: I’ve tested this during normal trading hours and I’m getting the same result. Even if I explicitly write the contract month and year in (full symbol) the data isn’t current. Equities and ETFs update as expected. I noticed that when entering the symbol /ES it is returned in the results as X_ES, and /CL is returned as X_CL. Perhaps it’s a character issue?

setup.py install errors on Python 3.10

Going to try to fix this manually but just passing it on — on a fresh Windows 10/Python 3.10 install I get the following when running setup.py:

C:\Users\-----\Documents\Python\TOSDataBridge\python>python setup.py install
C:\Users\-----\Documents\Python\TOSDataBridge\python\setup.py:23: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.core import setup as _setup
running install
running build
pulling constants from C:\Users\Patrick\Documents\Python\TOSDataBridge\python\..\include\tos_databridge.h
  tos_databridge.h:190: TOSDB_CONN_NONE 0
  tos_databridge.h:191: TOSDB_CONN_ENGINE 1
  tos_databridge.h:192: TOSDB_CONN_ENGINE_TOS 2
  tos_databridge.h:194: TOSDB_INTGR_BIT 0x80
  tos_databridge.h:195: TOSDB_QUAD_BIT 0x40
  tos_databridge.h:196: TOSDB_STRING_BIT 0x20
  tos_databridge.h:197: TOSDB_TOPIC_BITMASK 0xe0
  tos_databridge.h:198: TOSDB_STR_DATA_SZ 40
  tos_databridge.h:199: TOSDB_MAX_STR_SZ 0xff
  tos_databridge.h:200: TOSDB_MAX_NSTRS 1000
  tos_databridge.h:201: TOSDB_DEF_TIMEOUT 2000
  tos_databridge.h:202: TOSDB_DEF_PAUSE 100
  tos_databridge.h:204: TOSDB_MIN_TIMEOUT 1500
  tos_databridge.h:206: TOSDB_BLOCK_ID_SZ 63
  tos_databridge.h:208: TOSDB_MAX_BLOCK_SZ 16777216
  tos_databridge.h:212: TOSDB_ERROR_BAD_INPUT -1
  tos_databridge.h:213: TOSDB_ERROR_BAD_INPUT_BUFFER -2
  tos_databridge.h:214: TOSDB_ERROR_NOT_CONNECTED -3
  tos_databridge.h:215: TOSDB_ERROR_TIMEOUT -4
  tos_databridge.h:216: TOSDB_ERROR_BLOCK_ALREADY_EXISTS -5
  tos_databridge.h:217: TOSDB_ERROR_BLOCK_DOESNT_EXIST -6
  tos_databridge.h:218: TOSDB_ERROR_BLOCK_CREATION -7
  tos_databridge.h:219: TOSDB_ERROR_BLOCK_SIZE -8
  tos_databridge.h:220: TOSDB_ERROR_BAD_TOPIC -9
  tos_databridge.h:221: TOSDB_ERROR_BAD_ITEM -10
  tos_databridge.h:222: TOSDB_ERROR_BAD_SIG -11
  tos_databridge.h:223: TOSDB_ERROR_IPC -12
  tos_databridge.h:224: TOSDB_ERROR_IPC_MSG -13
  tos_databridge.h:225: TOSDB_ERROR_CONCURRENCY -14
  tos_databridge.h:226: TOSDB_ERROR_ENGINE_NO_TOPIC -15
  tos_databridge.h:227: TOSDB_ERROR_ENGINE_NO_ITEM -16
  tos_databridge.h:228: TOSDB_ERROR_SERVICE -17
  tos_databridge.h:229: TOSDB_ERROR_GET_DATA -18
  tos_databridge.h:230: TOSDB_ERROR_GET_STATE -19
  tos_databridge.h:231: TOSDB_ERROR_SET_STATE -20
  tos_databridge.h:232: TOSDB_ERROR_DDE_POST -21
  tos_databridge.h:233: TOSDB_ERROR_DDE_NO_ACK -22
  tos_databridge.h:234: TOSDB_ERROR_SHEM_BUFFER -23
  tos_databridge.h:235: TOSDB_ERROR_UNKNOWN -24
  tos_databridge.h:237: TOSDB_ERROR_DECREMENT_BASE -25
pulling topic enum from C:\Users\Patrick\Documents\Python\TOSDataBridge\python\..\include\tos_databridge.h
  tos_databridge.h:418: topic enum BEGIN
  tos_databridge.h:505: topic enum END
auto-generating C:\Users\Patrick\Documents\Python\TOSDataBridge\python\tosdb\_tosdb.py
  checking C:\Users\Patrick\Documents\Python\TOSDataBridge\python\tosdb\_tosdb.py
    fatal: auto-generated C:\Users\Patrick\Documents\Python\TOSDataBridge\python\tosdb\_tosdb.py could not be imported !
    fatal: cannot import name 'Mapping' from 'collections' (C:\Program Files\Python310\lib\collections\__init__.py)

The import Mapping from collections issue looks like a common 3.10 problem but it's not immediately clear to me why _tosdb.py doesn't import.

As a side note, I obviously haven't played with this yet but it's cool of you to release it. Thanks!

No module named 'tosdb' ERROR

I continue to get a ModuleNotFoundError when importing tosdb, tried pip install as well with no avail, any suggestions?

Msbuild.exe

Anyone have any issues like this or know how to fix it. I've added msbuild to PATH but it doesn't help. Ive been working on this for 3 months so any help would be appreciated.

Building wheels for collected packages: qdldl
Anyone have any issues like this or know how to fix it. I've added msbuild to PATH but it doesn't help. Ive been working on this for 3 months so any help would be appreciated.

Building wheels for collected packages: qdldl

Building wheel for qdldl (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1

╰─> [45 lines of output]

  running bdist_wheel

  running build

  running build_ext

  -- Selecting Windows SDK version  to target Windows 10.0.22000.

  CMake Error at CMakeLists.txt:4 (project):

    Failed to run MSBuild command:



      MSBuild.exe



    to get the value of VCTargetsPath:



      Microsoft (R) Build Engine version 4.8.4161.0

      [Microsoft .NET Framework, version 4.0.30319.42000]

      Copyright (C) Microsoft Corporation. All rights reserved.



      Build started 2/7/2022 6:14:21 PM.

      Project "C:\User\person\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" on node 1 (default targets).

      C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

      Done Building Project "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.



      Build FAILED.



      "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default target) (1) ->

        C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.



          0 Warning(s)

          1 Error(s)



      Time Elapsed 00:00:01.03





    Exit code: 1







  -- Configuring incomplete, errors occurred!

  See also "C:/Users/me/AppData/Local/Temp/pip-install-pe0bzhgh/qdldl_73a587d1bfe74c41b89f0c64ea14a15f/c/build/CMakeFiles/CMakeOutput.log".

  Microsoft (R) Build Engine version 4.8.4161.0

  [Microsoft .NET Framework, version 4.0.30319.42000]

  Copyright (C) Microsoft Corporation. All rights reserved.



  MSBUILD : error MSB1009: Project file does not exist.

  Switch: qdldlamd.vcxproj

  building 'qdldl' extension

  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for qdldl

Running setup.py clean for qdldl

Failed to build qdldl

Installing collected packages: qdldl, osqp, cvxpy, mapping

Running setup.py install for qdldl ... error

error: subprocess-exited-with-error

× Running setup.py install for qdldl did not run successfully.

│ exit code: 1

╰─> [45 lines of output]

  running install

  running build

  running build_ext

  -- Selecting Windows SDK version  to target Windows 10.0.22000.

  CMake Error at CMakeLists.txt:4 (project):

    Failed to run MSBuild command:



      MSBuild.exe



    to get the value of VCTargetsPath:



      Microsoft (R) Build Engine version 4.8.4161.0

      [Microsoft .NET Framework, version 4.0.30319.42000]

      Copyright (C) Microsoft Corporation. All rights reserved.



      Build started 2/7/2022 6:14:25 PM.

      Project "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" on node 1 (default targets).

      C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

      Done Building Project "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.



      Build FAILED.



      "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default target) (1) ->

        C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.



          0 Warning(s)

          1 Error(s)



      Time Elapsed 00:00:00.62





    Exit code: 1







  -- Configuring incomplete, errors occurred!

  See also "C:/Users/me/AppData/Local/Temp/pip-install-pe0bzhgh/qdldl_73a587d1bfe74c41b89f0c64ea14a15f/c/build/CMakeFiles/CMakeOutput.log".

  Microsoft (R) Build Engine version 4.8.4161.0

  [Microsoft .NET Framework, version 4.0.30319.42000]

  Copyright (C) Microsoft Corporation. All rights reserved.



  MSBUILD : error MSB1009: Project file does not exist.

  Switch: qdldlamd.vcxproj

  building 'qdldl' extension

  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: legacy-install-failure

× Encountered error while trying to install package.

╰─> qdldl

note: This is an issue with the package mentioned above, not pip.

hint: See above for output from the failure.
Building wheel for qdldl (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1

╰─> [45 lines of output]

  running bdist_wheel

  running build

  running build_ext

  -- Selecting Windows SDK version  to target Windows 10.0.22000.

  CMake Error at CMakeLists.txt:4 (project):

    Failed to run MSBuild command:



      MSBuild.exe



    to get the value of VCTargetsPath:



      Microsoft (R) Build Engine version 4.8.4161.0

      [Microsoft .NET Framework, version 4.0.30319.42000]

      Copyright (C) Microsoft Corporation. All rights reserved.



      Build started 2/7/2022 6:14:21 PM.

      Project "C:\User\person\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" on node 1 (default targets).

      C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

      Done Building Project "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.



      Build FAILED.



      "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default target) (1) ->

        C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.



          0 Warning(s)

          1 Error(s)



      Time Elapsed 00:00:01.03





    Exit code: 1







  -- Configuring incomplete, errors occurred!

  See also "C:/Users/me/AppData/Local/Temp/pip-install-pe0bzhgh/qdldl_73a587d1bfe74c41b89f0c64ea14a15f/c/build/CMakeFiles/CMakeOutput.log".

  Microsoft (R) Build Engine version 4.8.4161.0

  [Microsoft .NET Framework, version 4.0.30319.42000]

  Copyright (C) Microsoft Corporation. All rights reserved.



  MSBUILD : error MSB1009: Project file does not exist.

  Switch: qdldlamd.vcxproj

  building 'qdldl' extension

  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for qdldl

Running setup.py clean for qdldl

Failed to build qdldl

Installing collected packages: qdldl, osqp, cvxpy, mapping

Running setup.py install for qdldl ... error

error: subprocess-exited-with-error

× Running setup.py install for qdldl did not run successfully.

│ exit code: 1

╰─> [45 lines of output]

  running install

  running build

  running build_ext

  -- Selecting Windows SDK version  to target Windows 10.0.22000.

  CMake Error at CMakeLists.txt:4 (project):

    Failed to run MSBuild command:



      MSBuild.exe



    to get the value of VCTargetsPath:



      Microsoft (R) Build Engine version 4.8.4161.0

      [Microsoft .NET Framework, version 4.0.30319.42000]

      Copyright (C) Microsoft Corporation. All rights reserved.



      Build started 2/7/2022 6:14:25 PM.

      Project "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" on node 1 (default targets).

      C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

      Done Building Project "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.



      Build FAILED.



      "C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj" (default target) (1) ->

        C:\Users\me\AppData\Local\Temp\pip-install-pe0bzhgh\qdldl_73a587d1bfe74c41b89f0c64ea14a15f\c\build\CMakeFiles\3.22.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.



          0 Warning(s)

          1 Error(s)



      Time Elapsed 00:00:00.62





    Exit code: 1







  -- Configuring incomplete, errors occurred!

  See also "C:/Users/me/AppData/Local/Temp/pip-install-pe0bzhgh/qdldl_73a587d1bfe74c41b89f0c64ea14a15f/c/build/CMakeFiles/CMakeOutput.log".

  Microsoft (R) Build Engine version 4.8.4161.0

  [Microsoft .NET Framework, version 4.0.30319.42000]

  Copyright (C) Microsoft Corporation. All rights reserved.



  MSBUILD : error MSB1009: Project file does not exist.

  Switch: qdldlamd.vcxproj

  building 'qdldl' extension

  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: legacy-install-failure

× Encountered error while trying to install package.

╰─> qdldl

note: This is an issue with the package mentioned above, not pip.

hint: See above for output from the failure.

Cannot connect to ThinkorSwim

Hi there,

I tried both 0.5, 0.6 and 0.7 (the latest version). I could get TOSDataBridge service to run, but cannot connect to ThinkorSwim. I used the latest ThinkorSwim version.

Please help!

image

Mac & Linux

Great package! Any plans to port this to mac or linux?

Andrew

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.