The Tesseract Pro Python API
Project description
Tesseract Pro Python API
-- This project is under active development. Please do not use in production before version 1.0.0 --
Example
Get visible tools for current chart
import time
from tesseractpro import TesseractPro
tpro = TesseractPro(
api_token="Your-API-token"
)
candles = 100 # the amount of candles to fetch
chart = tpro.get_chart(
space_id="cb0c8e03-62c6-4a1c-a872-18ed1c4c8f96",
symbol="btcusdt",
timeframe=32,
start_time=int(time.time()),
end_time=int(time.time()) - (32*60*candles)
)
for tool in chart.get_tools():
print(f"Tool: {tool['id']} is {tool['type']})
Get OHLC candles for the timeframe of the current chart
import time
from tesseractpro import TesseractPro
tpro = TesseractPro(
api_token="[YOUR-API-TOKEN]"
)
candles = 100 # the amount of candles to fetch
chart = tpro.get_chart(
space_id="[SPACE-ID]",
symbol="btcusdt",
timeframe=32,
start_time=int(time.time()),
end_time=int(time.time()) - (32*60*candles)
)
print(chart.get_candles())
Fetch BTCUSDT prices
import time
from tesseractpro import TesseractPro
tpro = TesseractPro(
api_token="[YOUR-API-TOKEN]"
)
candles = 100 # the amount of candles to fetch
chart = tpro.get_chart(
space_id="[SPACE-ID]",
symbol="btcusdt",
timeframe=32,
start_time=int(time.time()),
end_time=int(time.time()) - (32*60*candles)
)
chart.on(chart.ON_PRICE, lambda data: print(data))
chart.wait_for_events()
Watch for tool updates on BTCUSDT 32min chart
import time
from tesseractpro import TesseractPro
tpro = TesseractPro(
api_token="[YOUR-API-TOKEN]"
)
candles = 100 # the amount of candles to fetch
chart = tpro.get_chart(
space_id="[SPACE-ID]",
symbol="btcusdt",
timeframe=32,
start_time=int(time.time()),
end_time=int(time.time()) - (32*60*candles)
)
chart.on(chart.ON_TOOL_UPDATE, lambda data: print(f"Updated tool {data['id']}"))
chart.wait_for_events()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tesseractpro-0.1.1.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tesseractpro-0.1.1.tar.gz.
File metadata
- Download URL: tesseractpro-0.1.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee9210ed5c86ffd2a1e1ef563ef23d93477ffd78e728041953a752d7c879c39d
|
|
| MD5 |
6d3d8f23054bd2c125394f4926a14e5f
|
|
| BLAKE2b-256 |
075793b6970076293ed1db5da4e9e3e2be5d5fab404424b46b916545d4771230
|
File details
Details for the file tesseractpro-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tesseractpro-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f82ca2c26bdbe36c230d4d9bc7b04d744f04bad930a6edcd47ba0daaf264802c
|
|
| MD5 |
80ff5645e097d13ce50a1bdd5ea59dfc
|
|
| BLAKE2b-256 |
0fb54716b324fd1b2f4023cf3cfb6e39b4752bc23a1abb7eb4e58a6e94b29d8e
|